Hello @Riddhi_k,
In that sysdiagnose, we have found errors around this timestamp: 2021-12-10 11:09:34.065637+0530
.
The AppleMusicDemo
app was requesting a user token, and failed to get one.
Our server teams were able to track down the root cause of this specific issue:
InvalidJwtException: JWT (claims->{"exp":1639201169.270057,"iss":"REDACTED_TEAM_ID","admin":true,"sub":"REDACTED_FIRST_NAME"}) rejected due to invalid claims. Additional details: [No Issued At (iat) claim present.]
So it seems like the error you encountered trying to get a user token was due to an incorrectly generated developer token, which as you know, is generated as a JSON Web Token.
Here are a few resources I can suggest:
I would urge you to seriously consider this second option, as MusicKit for Swift makes it considerably easier to integrate your app with Apple Music.
For example, you will no longer have to generate your own developer token, as we have added built-in support for Automatic Developer Token Generation in MusicKit for Swift.
Not only that, but you won't even have to think about decorating any URLRequest with either the developer token, nor the user token, since MusicKit for Swift takes care of that for your app, and automatically retries requests as appropriate if any token is somehow invalid (e.g. expired).
To learn more about MusicKit for Swift, please check out these additional resources:
I hope this helps.
Best regards,