Reputation: 185
requestUserTokenForDeveloperToken return error
if (@available(iOS 11.0, *)) {
[self.cloudServiceController requestUserTokenForDeveloperToken:developerToken completionHandler:^(NSString * _Nullable userToken, NSError * _Nullable error) {
NSLog(@"userToken error - %@", error);
}];
}
Error:
Error Domain=SKErrorDomain Code=7 "(null)" UserInfo={NSUnderlyingError=0x1c105e870 {Error Domain=SSErrorDomain Code=109 "(null)" UserInfo={NSUnderlyingError=0x1c105e180 {Error Domain=SSErrorDomain Code=109 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store, SSErrorHTTPStatusCodeKey=401}}}}}
How can I solve this problem? Thx!
Upvotes: 1
Views: 753
Reputation: 185
I solved the problem, the problem was in the developer token, it was not properly created. I recreated the token using this utility https://github.com/pelauimagineering/apple-music-token-generator and it all worked ;)
Upvotes: 2