Failed to fetch user token error: An unknown error occurred
Return code is 0 too which seems strange as well.
I've generated a JWT using swift run generateToken <team-id> <key-id> from the SwiftJWTExample package:
JSON Web Token:
"<token here>"
Header:
{"typ":"JWT","alg":"ES256","kid":"..."}
Payload:
{"iss":"...","iat":...,"exp":...}
Signature:
...
And have checked my team id and key id. I've enabled App groups for the extension and the main target, and Siri for the main target, and am running on an iOS 14 device, compiled with Xcode beta.
Hope you can help me out!
Thanks for reporting this issue related to the API that allows getting a user token for MusicKit.
Regarding @LemonSpike's latest question, without an active Apple Music subscription, you can only access unpersonalized content from Apple Music API, i.e. data with a URL that contains /catalog in the path. Any personalized content from Apple Music API, i.e. content accessible via a URL that contains /me in the path requires having an active Apple Music subscription.
Aside from that, we are aware of a regression in iOS 14 that can lead to applications getting invalid user tokens from SKCloudServiceController; we are working on addressing this regression and expect to include this fix with an upcoming version of iOS.
Thanks again for your feedback.
Best regards,