1

I need to be able to retrieve user-specific data from Apple Music. After some searching, it seems the moethod to do this is requestUserTokenForDeveloperToken:

Returns a user token that you use to access personalized Apple Music content.

However, the example given there is in Swift or Objective-C. I'm not experienced enough to figure out if this code is "portable" to another language like Python.

Is it possible?

zerohedge
  • 3,185
  • 4
  • 28
  • 63

1 Answers1

-1

Please be attention:

- (void)requestUserTokenForDeveloperToken:(NSString *)developerToken 
                        completionHandler:(void (^)(NSString *userToken, NSError *error))completionHandler;

This is a Objective-C interface, you can also switch language in there(The Language drop-down there shows all the languages):

enter image description here

Then there will shows the Swift interface now:

func requestUserToken(forDeveloperToken developerToken: String, 
    completionHandler: @escaping (String?, Error?) -> Void)

Apple only provide the two language types API for developers, there is no python(other) language interface there.


From your:

But even if I write it in Swift, on a non-Apple machine, that wouldn’t help, is all I’m asking.

You check the API doc in the right sidebar, will find:

SDKs

iOS 11.0+
tvOS 11.0+

Framework

StoreKit

The API is available in iOS and tvOS SDKs, Apple do not run those SDKs on the non-apple machine.

aircraft
  • 25,146
  • 28
  • 91
  • 166