Post

Replies

Boosts

Views

Activity

Apple Music API fetch more than 10 recently played songs
Using this recently played resources API - https://developer.apple.com/documentation/applemusicapi/get_recently_played_resources , I get up to 10 resources that were recently played. However I want as many recently played resources as I can, so I tried using the limit=(int) query parameter, as described in the official document. However, it's not working. Using the limit=(int) query parameter for 10 (or below) songs is working : https://api.music.apple.com/v1/me/recent/played?limit=10 but anything above 10 is not: https://api.music.apple.com/v1/me/recent/played?limit=15 or https://api.music.apple.com/v1/me/recent/played?limit=20 How can I get more than 10 resources?
1
1
2.3k
Dec ’20
Send Post request when new core motion activity is detected while app is in background mode
Hi, I'm looking for a way to send a post request to my server whenever my iOS app gets an update from core motion activity manager about user's current activity type. I want this to happen when the app is in both the foreground and the background mode. Because my app also involves playing music player, I was hoping to be able to make the post request mentioned above while the music is playing in background mode. Could you please help me out and suggest ways I could make this work?
0
0
454
Nov ’20
iOS 14 StoreKit - SKCloudServiceController's requestusertoken not being called properly
I am trying to play songs on iOS 14 using Apple Music API. I have the developer's token, and I have asked for the permission for accessing the user's apple music. However, when I call requestusertoken api, - https://developer.apple.com/documentation/storekit/skcloudservicecontroller/2909079-requestusertoken its closure never gets called, so obviously I don't receive anything from the request - not even an error. It's driving me crazy!! Here is my code. What am I doing wrong? func getUserToken() -> String { var userToken = String() let lock = DispatchSemaphore(value: 0) SKCloudServiceController().requestUserToken(forDeveloperToken: developerToken) { (receivedToken, error) in 		guard error == nil else { return } 		if let token = receivedToken { 				userToken = token 				lock.signal() 		} } lock.wait() return userToken }
3
0
881
Oct ’20