Questions tagged [apple-music]

Apple Music is a music streaming service created by Apple Inc.

Apple Music is a music streaming service created by Apple Inc. Users can listen on-demand to available tracks or curated playlists. The service also includes Internet radio stations.

Use this tag for questions regarding Apple Music and its APIs. For general Cocoa or Cocoa Touch API questions, use the and tags respectively. For language questions, use the or tags.

196 questions
0
votes
1 answer

AppleScripts and Databases (SQLite3)?

Sorry in advance if this question has been answered, but I honestly don't even know what to google since there's not much info on reading/writing to ANY database using AppleScripts (at least none that I can get working or make…
timbot
  • 5
  • 5
0
votes
0 answers

Apple Music/Music Kit: how to get song IDs?

The Apple Music API provides a service to fetch a song via an identifier, as detailed in their documentation in this format https://api.music.apple.com/v1/catalog/us/songs/900032829 My goal is to pick songs at random, from an array of songs. My…
daspianist
  • 5,336
  • 8
  • 50
  • 94
0
votes
1 answer

SwiftUI Trying to use MPMusicPlayerController and playbackState

I am fairly new to SwiftUI, and I am struggling to use the Apple Swift Documentation. I'm trying to get the current state of the now playing music, hopefully printing something like paused or playing And so here is the code that I've come up…
Mr Duck
  • 115
  • 1
  • 9
0
votes
1 answer

How to fix "original file could not be found" error via apple script

I have an issue with my music library. Some songs I am unable to play because they cannot be found locally. Here's an example of the error messages I get when playing a specific song: The song ... could not be used because the original file could…
calpyte
  • 855
  • 1
  • 9
  • 17
0
votes
0 answers

How can I access the MediaPlayer functionality from another device?

I am playing music from the Apple Music app on device A and want to skip the song remotely from device B. My first idea was to save an auth token from device A to a database and call the API from device B through that token. How can I access the…
nicklbaert
  • 57
  • 2
  • 7
0
votes
1 answer

MPMediaItem array not printing song titles in SwiftUI List

I have a Swift project that prints a list of songs in a table view. Below is the basis of the current working code for retrieving and putting those songs in rows. Swift: var mySongs: [MPMediaItem] = [] func tableView(_ tableView: UITableView,…
ctm
  • 88
  • 1
  • 1
  • 10
0
votes
0 answers

How to get MPMediaItem lyrics in swift 5

I checked some of SO answers but it doesn't work for me! I need to get lyrics for the current playing song. I get an empty result if I simply try to get lyrics from a media item: if var music = mediaItemCollection.items as? [MPMediaItem]{ …
Yogesh Patel
  • 1,893
  • 1
  • 20
  • 55
0
votes
1 answer

How to upload or push songs from my app to iPhone music library in Swift 5

I am building an iOS app in Swift 5 and I am trying to add a song to the user's Apple Music Library, I fetched all the albums, playlists songs using MPMediaLibrary but can't upload it! Is it possible to upload a song to the user's Apple Music…
Yogesh Patel
  • 1,893
  • 1
  • 20
  • 55
0
votes
1 answer

Apple Music API not letting me get User Token - Throwing Unknown Error

I am trying to create a very simple app using Apple's Apple Music API in Swift. To do this, I need to retrieve songs from Apple Music. I am trying to get a user token using this code …
Ali Hachem
  • 31
  • 2
0
votes
1 answer

Apple applicationMusicPlayer not playing type "LibrarySong" but does play "Song" type?

Am using Apple MediaPlayer framework and AppleMusicAPI to play songs in mobile app. API call (with search term parameter): https://api.music.apple.com/v1/catalog/{id}/search Successfully returns a Song type object that is playable with the…
dreloz
  • 1
  • 1
0
votes
1 answer

How to fetch a song from Apple Music without subscription?

I am new to the Apple Music API and MediaPlayer frameworks... I am simply trying to fetch songs from a search query, from Apple Music API, BUT, importantly, without the users need to have an Apple Music subscription. I have seen countless apps being…
loveSO123
  • 11
  • 2
0
votes
2 answers

Open/search Spotify track in Apple Music (with Applescript)

I'd like an easy way to switch from a Spotify release to the same release in Apple Music. I already found a way to search for the currently playing Spotify track in the Apple Music web player with Applescript: tell application "Spotify" if…
Lennart Schoors
  • 401
  • 3
  • 7
0
votes
1 answer

How to get new releases from the Apple Music API

Recently Apple Music launched a new feature that notifies the user about new releases. I'm trying to find a way of receiving this notifications from the API, or somehow listen to a set of artists in case of new releases. If you know any work around…
0
votes
1 answer

Having trouble returning a user token from StoreKit as a string

import StoreKit class AppleMusicAPI { let developerToken = "ABC123" func getUserToken() -> String { var userToken = String() SKCloudServiceController().requestUserToken(forDeveloperToken: developerToken) { (receivedToken, error) in …
Shpigford
  • 24,748
  • 58
  • 163
  • 252
0
votes
0 answers

AppleScript value for AXURL fails with AppleEvent handler failed

I have been trying to capture a URL in Apple Music (formally iTunes) using AppleScript (JXA JavaScript) but unfortunately when returning the value for an AXURL attribute the program. Am I missing something on converting this URL to something useful…
kylewelsby
  • 4,031
  • 2
  • 29
  • 35