SKCloudServiceController's requestPersonalizationToken returns invalid token in iOS 14

Already filed a bug report about this (FB8082757) but posting here incase anyone knows a workaround.

Since iOS 14 Beta 2, the requestPersonalizationToken(forClientToken:completionHandler:) returns an invalid token and prevents any personalised Apple Music API requests from working.

Last reproduced on iOS 14 (18A5319i) on an iPhone X.

Steps to reproduce:
  1. Generate a valid MusicKit Developer Token.

  2. Use SKCloudServiceController's requestPersonalizationToken(forClientToken:completionHandler:) function to get a user token.

  3. Perform an Apple Music API request that specifically requires a user token, for example fetching Recommendations (developer.apple.com/documentation/applemusicapi/recommendations).

  4. Apple Music API callback will fail with a 403 error code and error as Invalid authentication.

This happens only on iOS 14. All iOS versions before that including the latest iOS 13 do not exhibit this issue.
Looks like that method is deprecated. Have you tried requestUserToken(forDeveloperToken:completionHandler:) instead?
I am getting the same result as the OP using requestUserToken(forDeveloperToken:completionHandler:)
Hello @Tanmay007 and @laszloxgergely, 

Thanks for reporting this issue related to the API that allows getting a user token for MusicKit.

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, 
SKCloudServiceController's requestPersonalizationToken returns invalid token in iOS 14
 
 
Q