Questions tagged [apple-musickit]

The MusicKit framework allows iOS apps to play a user's Apple Music & local music.

Introduced with iOS 11, MusicKit on iOS lets users play Apple Music and their local music library natively from third party apps and games. When a user provides permission to their Apple Music account, an iOS app can create playlists, add songs to their library, and play any of the millions of songs in the Apple Music catalog. If the app detects that the user is not yet an Apple Music member, you can offer a trial from within your app.

169 questions
1
vote
1 answer

MusicKit API - Playlist Update, Delete, Song Remove

I've been looking at the MusicKit functionality for playlists: https://developer.apple.com/documentation/applemusicapi/create_a_new_library_playlist I'm wondering, can anyone confirm if they have been able to: remove songs from an existing…
scgough
  • 5,099
  • 3
  • 30
  • 48
1
vote
0 answers

How to get artist ID for all artists in Apple Music for a user

Using Apple Music API I was able to get all artists in my library: func getArtists(forToken musicUserToken: String) { var urlComponents = URLComponents() urlComponents.scheme = "https" urlComponents.host = "api.music.apple.com" …
Marcos Tanaka
  • 3,112
  • 3
  • 25
  • 41
1
vote
1 answer

Received Policy Notification: Apple Music API/MusicKit requirements

I received a message from Apple for many of my iOS apps. It says I use Apple Music in connection with advertising and they give me one week to resolve it. I do not use it maybe one of advertising libraries do but I have no idea how to check it. What…
Tibidabo
  • 21,461
  • 5
  • 90
  • 86
1
vote
1 answer

Where to store my developer token for a MusicKit app?

I'm dabbling with the MusicKit API and came across this in the sample app. Keep in mind, you should not hardcode the value of the developer token in your application. This is so that if you need to generate a new developer token you are able to…
Kevin Lawrence
  • 698
  • 7
  • 23
1
vote
2 answers

Apple Music API Reference

I'm trying to use Apple Music API to get users data (playlists, tracks, adding and creating playlists). When following this guide:…
KLTR
  • 1,263
  • 2
  • 14
  • 37
1
vote
0 answers

How to return songs from Apple Music API?

I need add a new function that returns songs from Apple Music API. The code below returns nil however, it works for Album ID. I modified the code from APIClient.swift. See source for details. It returns song(id:completion:) JSON Decode…
dedsec
  • 29
  • 4
1
vote
1 answer

Can I filter out songs downloaded to device from Apple Music?

I have a MPMediaPickerController showing songs available on the device to use for sending to other users on my app. I've filtered out Cloud items, but I also want to filter out songs from Apple Music that have been made "available offline."…
1
vote
0 answers

Apple Music API - can't retrieve artists in search

I'm implementing the Apple Music API for my application. I have a 1000-1200 record of artist names in my database and I want to match with Apple Music. I'm using the search endpoint for that, but I couldn't retrieve any results for artists. Even the…
1
vote
1 answer

SKCloudServiceSetupViewController not presented

I have followed Apple's MusicKit sample code at https://developer.apple.com/musickit/ and am unable to get the setup view controller to display. I simplified the sample code into a separate project, here:…
R H
  • 11
  • 2
1
vote
0 answers

Having trouble with creating request to AppleMusicAPI

I am trying to send a request to Apple Music API by using this sample code (https://github.com/hirayaCM/AppleMusicSearch). I just replaced developer token to mine and run it. However I am always getting 401 error even if I create and use new…
1
vote
1 answer

requestUserTokenForDeveloperToken return error - MusicKit get userToken

requestUserTokenForDeveloperToken return error if (@available(iOS 11.0, *)) { [self.cloudServiceController requestUserTokenForDeveloperToken:developerToken completionHandler:^(NSString * _Nullable userToken, NSError * _Nullable error) { …
1
vote
0 answers

requestPersonalizationToken returns with SKErrorDomain error 7

After calling the requestPersonalizationToken method in Apple's MusicKit with our developer token and the completionHandler from the example from Apple, it returns with a nil token and SKErrorDomain error 7. I can't find any documentation about this…
der_Fidelis
  • 1,475
  • 1
  • 11
  • 25
1
vote
1 answer

Keep the app awaken in background when [MPMusicPlayerApplicationController applicationQueuePlayer] is used to play the music

With iOS 10.3 Apple released new APIs in MediaPlayer framework that brings more control/power to the developer that want to play music stored on Apple Music/iTunes Match. I’m talking about new applicationQueuePlayer and applicationMusicPlayer of…
1
vote
0 answers

ios - get list of playlists, open single playlist with uuid and get share URL

I'm struggling a bit with iOS/Apple Music/Playlists. I have the ability to: Create a playlist with a UUID (GUID) Get the same playlist with the given UUID List all of my playlists To get a list of my playlists: MPMediaQuery *myPlaylistsQuery =…
scgough
  • 5,099
  • 3
  • 30
  • 48
1
vote
1 answer

Play two DRM-protected songs at the same time with different volumes

I'm attempting to create an effect with two different MPMusicPlayerControllers at different volumes. I'm able to create one MPMusicPlayerController and set the volume of that let musicPlayerController = MPMusicPlayerController.systemMusicPlayer let…
Jojodmo
  • 23,357
  • 13
  • 65
  • 107