iTunes Library

RSS for tag

Retrieve the properties of the media in an iTunes library.

Posts under iTunes Library tag

9 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

screenshot for iPhone home screen
When having my iPhone connected to my Mac via USB cable, how can I take a screenshot of the home screen from a swiftUI app? I tried using libimobiledevice (idevicescreenshot) but that requires install the developer disk image. When looking for it, it turns that my Xcode (version 15.4) only provides that kind of images up to iOS 16.4. I have looked everywhere on this site, but couldn't fine the required image or otherwise, how to take the screenshot I need. Thanks!
1
0
138
1w
Can't read MPMediaItem on iOS App running with Catalyst
Hello, We've an iOS application that can be launched on macOS (with the "designed for iPhone" available with Catalyst). This application request authorization on MPMediaLibrary and play MPMediaItem with an audio player. After accepted, the authorization status is well flagged as .authorized I can browse all MPMediaItem without issue and display them in my app. But, when it comes the time to convert the MPMediaItem file's URL in AVAudioFile with: AVAudioFile(forReading: fileURL) We got 2 warnings in the console: ExtAudioFile.cpp:211 about to throw -54: open audio file AVAEInternal.h:109 [AVAudioFile.mm:135:AVAudioFileImpl: (ExtAudioFileOpenURL((CFURLRef)fileURL, &_extAudioFile)): error -54 We finally get an exception with this error: Error Domain=com.apple.coreaudio.avfaudio Code=-54 "(null)" UserInfo={failed call=ExtAudioFileOpenURL((CFURLRef)fileURL, &_extAudioFile)} This working perfectly on iOS and iPadOS, but with Catalyst we always got this error whatever the audio (from iTunes library) we try to play. Why do we have this permission issue only on macOS ? There is something different to do to get permission on macOS ? thanks !
0
0
378
Mar ’24
What APIs can be used to modify the Music.app library?
Hi everyone, I'd like to write a one-off app to make some modifications to my own Music.app (aka iTunes) library. This is for content that I have stored using iTunes Match, so it's effectively a library that dates back to the iTunes years. However, from what I can see, APIs with modification support are essentially... nothing? I can get everything ready in a simple Swift command-line app using https://developer.apple.com/documentation/ituneslibrary, however I can't actually write any changes. It seems that the only modification solution available is actually still AppleScript. Everything there still works, and in theory I could do the majority of the logic using iTunesLibrary and then do the modifications with AppleScript via NSAppleScript. In order to do this, I just need an identifier that I can use to correlate items from each API. There is: iTunesLibrary: https://developer.apple.com/documentation/ituneslibrary/itlibmediaentity/1809728-persistentid AppleScript Item object for AppleScript has a "persistent ID" property which sounds like the same thing There's also an id property However, in my experiments it didn't appear that any of these correlated together Of course, I could possibly re-write the whole thing using AppleScript, but that would be slow and painful! So, posting here to see if anyone has any idea how or even if this can be done. Hope someone can help! Thanks in advance
0
0
409
Feb ’24
iTunes lookup endpoint caching - old results
I just encountered a problem, that my app was released to the App Store, the update was already visible in the App Store, but the request to https://itunes.apple.com/lookup?bundleId=***&country=*** was still returning previous app version information. After checking the server response, I realized that one of the response headers shows that the response is cached on the Apple server and that's the reason. X-Cache: TCP_MEM_HIT from a104-85-249-20.deploy.akamaitechnologies.com (AkamaiGHost/11.1.3-49328623) (-) Cache-Control: max-age=12989 . The question is: Can I safely use cache-busting solution to always get the latest results? It could be done like: https://itunes.apple.com/lookup?bundleId=***&country=***&t=<current_timestamp> I tested it and it works with the random timestamp, I always get not cached results.
1
1
763
Oct ’23
Backup of iOS Devices
Hi all, Does anyone know which protocols are used to perform a backup of iOS the device? For example: with iTunes I can perform a backup of my iPhone What protocols is iTunes using to comunicate with the device. I'm using a Linux OS and would like to perform a backup of my iPhone local.
0
0
481
Sep ’23
Can no longer access iTunes music purchases with AVAudioFile with iOS 17
Prior to iOS 17, I used AVAudioFile to open (for reading) the assetURL of MPMediaItem for songs that the user purchased through iTunes Store. With the iOS 17 Beta, this seems no longer possible as AVAudioFile throws this: ExtAudioFile.cpp:211 about to throw -54: open audio file AVAEInternal.h:109 [AVAudioFile.mm:135:AVAudioFileImpl: (ExtAudioFileOpenURL((CFURLRef)fileURL, &_extAudioFile)): error -54 Also can't copy the url to Documents directory because I get this: The file “item.m4a” couldn’t be opened because URL type ipod-library isn’t supported. This seems to be affecting other apps on the App Store besides mine, and it will reflect very badly on my app if this makes into the final iOS 17 because I have encouraged users to buy songs on iTunes Store to use with my app. Now there seems like there is no way to access them. Is this a known bug, or is there some type of workaround?
6
1
1.4k
Sep ’23