apple-musickit

Error using SKCloudServiceController API to check Apple Music capabilities

本小妞迷上赌 提交于 2019-12-11 06:29:55
问题 I am using this code to try to check a devices Apple Music capabilities: SKCloudServiceController *controller = [SKCloudServiceController new]; [controller requestCapabilitiesWithCompletionHandler:^(SKCloudServiceCapability capabilities, NSError * _Nullable error) { if (error != nil) { NSLog(@"Error getting SKCloudServiceController capabilities: %@", error); } else if (capabilities & SKCloudServiceCapabilityMusicCatalogPlayback) { NSLog(@"YES SUBSCRIBED!!!!"); } else { NSLog(@"NOT SUBSCRIBED!

401 error when accessing MusicKit API via node.js

故事扮演 提交于 2019-12-08 05:08:24
问题 I'm trying to access the MusicKit API but it keeps returning a 401 unauthorized error. I can't figure this out. I have this code to generate a Developer Token: const privateKey = fs.readFileSync("resources/AuthKey.p8").toString(); const teamId = "MYTEAMID"; const keyId = "MYKEYID"; const options = { algorithm: "ES256", expiresIn: "180d", issuer: "MYTEAMID", // your 10-character Team ID, obtained from your developer account header: { alg: "ES256", kid: "MYKEYID", // your MusicKit Key ID }, };

Having trouble with MusicKit sample app provided by Apple

社会主义新天地 提交于 2019-12-08 03:30:18
问题 I am trying to build "Adding Content to Apple Music”, Music Kit sample app provided by Apple, on Xcode 9 beta 3. However I am having 4 errors like this : three “Ambiguous use of 'play()’” errors and one “Ambiguous use of 'pause()’” Please tell me how to fix this if you already solved this problem. func beginPlayback(itemCollection: MPMediaItemCollection) { musicPlayerController.setQueue(with: itemCollection) //Ambiguous use of 'play()’ musicPlayerController.play() } func beginPlayback(itemID:

Lookup song by ISRC in Apple Music/iTunes

自作多情 提交于 2019-12-08 02:43:20
问题 I'm developing an iOS application which retrieves a song ISRC from an external source. I then need to use Apple's MusicKit SDK to get the song in Apple Music/iTunes, using the ISRC. Is it possible to do this? The Song resource type has the ISRC in the song attributes which is returned whn you do a GET request for a song, but the request uses the Apple Music song ID to perform the lookup. So can I query Apple Music for a song, using the ISRC instead? Also happy to look it up on the iTunes

I am try to get user token for apple music API, i have already generated valid developer token from python terminal commands

China☆狼群 提交于 2019-12-07 02:27:13
问题 I am using first time apple music api in my IOS app. I have already generate developer token with the help of python commands. i am getting error every time when request for the user token "An error occurred when requesting user token: The operation couldn’t be completed. (SKErrorDomain error 7.)" my developer token look like as "esfd.................................................................................Mpo" if #available(iOS 11.0, *) { SKCloudServiceController().requestUserToken

Having trouble with MusicKit sample app provided by Apple

♀尐吖头ヾ 提交于 2019-12-06 21:44:38
I am trying to build "Adding Content to Apple Music”, Music Kit sample app provided by Apple, on Xcode 9 beta 3. However I am having 4 errors like this : three “Ambiguous use of 'play()’” errors and one “Ambiguous use of 'pause()’” Please tell me how to fix this if you already solved this problem. func beginPlayback(itemCollection: MPMediaItemCollection) { musicPlayerController.setQueue(with: itemCollection) //Ambiguous use of 'play()’ musicPlayerController.play() } func beginPlayback(itemID: String) { musicPlayerController.setQueue(with: [itemID]) //Ambiguous use of 'play()’

Lookup song by ISRC in Apple Music/iTunes

非 Y 不嫁゛ 提交于 2019-12-06 06:32:32
I'm developing an iOS application which retrieves a song ISRC from an external source. I then need to use Apple's MusicKit SDK to get the song in Apple Music/iTunes, using the ISRC. Is it possible to do this? The Song resource type has the ISRC in the song attributes which is returned whn you do a GET request for a song, but the request uses the Apple Music song ID to perform the lookup. So can I query Apple Music for a song, using the ISRC instead? Also happy to look it up on the iTunes Search API and then get the ID (I think they're the same across Apple Music and iTunes?) and then query the

I am try to get user token for apple music API, i have already generated valid developer token from python terminal commands

瘦欲@ 提交于 2019-12-05 07:15:32
I am using first time apple music api in my IOS app. I have already generate developer token with the help of python commands. i am getting error every time when request for the user token "An error occurred when requesting user token: The operation couldn’t be completed. (SKErrorDomain error 7.)" my developer token look like as "esfd.................................................................................Mpo" if #available(iOS 11.0, *) { SKCloudServiceController().requestUserToken(forDeveloperToken: developerToken, completionHandler: { (userToken, error) in print("An error occurred

MPMusicPlayerControllerMutableQueue insert an Apple Music song not working

送分小仙女□ 提交于 2019-12-04 14:08:15
问题 So I have been trying to use the MusicKit APIs for a few days now. I have been attempting to use the MPMusicPlayerApplicationController and MutableQueue APIs. I have queue initialized already using setQueue(with: [String]) with an array of store identifiers for Apple Music songs. Then I want to allow the user to reorder the songs in the queue. I use the following code to attempt that. let musicPlayerController = MPMusicPlayerController.applicationQueuePlayer musicPlayerController.perform

MPMusicPlayerControllerMutableQueue insert an Apple Music song not working

那年仲夏 提交于 2019-12-03 09:32:31
So I have been trying to use the MusicKit APIs for a few days now. I have been attempting to use the MPMusicPlayerApplicationController and MutableQueue APIs. I have queue initialized already using setQueue(with: [String]) with an array of store identifiers for Apple Music songs. Then I want to allow the user to reorder the songs in the queue. I use the following code to attempt that. let musicPlayerController = MPMusicPlayerController.applicationQueuePlayer musicPlayerController.perform(queueTransaction: { queue in let afterItem = queue.items.first(where: { $0.playbackStoreID == predecessorId