#swiftui #iosdev #musickit
UPDATE!
As of WWDC 2021, this is no longer required. Apple have now added the ability to automatically create developer and user tokens. WOOO!
In this video I show you how to generate the JWT (JSON Web Token) that you need for MusicKit within your app. I think Apple expects us to perform this on our own servers and pass them along to the app.
If your music player app doesn't have a server side component (Firebase, iCloud, Vapor, etc) you're in a bit of a pickle. Even with regular app updates, users stuck on an older version of your app will not be able to use the Apple Music features in it once the token expires :(
So the easiest (and least secure way) is to generate these tokens on the device. All you need to do is follow this video, and run your generate token code anytime the JWT is due to a refresh! Heck, run it every time you launch your app if you like.
(Apple should really fix this)
00:00 - Intro
00:29 - New Project
01:38 - Install Swift-JWT Package
02:00 - Generate token with Swift-JWT
03:25 - Outro
Apple docs relating to MusicKit tokens
https://developer.apple.com/documenta...
Stackoverflow answer that helped me out!
https://stackoverflow.com/a/56630546/...
🧑💻 Kitura/IBM SwiftJWT package
https://github.com/Kitura/Swift-JWT
---------------------
Want to chat or ask questions about Swift or a career in software development?
Discord
/ discord
Patreon - Get my book and code created on this channel!
/ beaunouvelle
Play tabletop games? I made a music and sound effects app for you called Summoning Stone.
https://apps.apple.com/app/apple-stor...
------------------
#swiftui #iosdeveloper #swiftuitutorial
Watch video How to Make a JWT (JSON Web Token) for Apple's MusicKit online without registration, duration hours minute second in high quality. This video was added by user Get Swifty 01 January 1970, don't forget to share it with your friends and acquaintances, it has been viewed on our site 4,719 once and liked it 67 people.