iTunes Scripting Bridge regression on Apple Music

Originator:demosdemon
Number:rdar://21625528 Date Originated:30-Jun-2015 10:23 PM
Status:Duplicate/21624287 Resolved:
Product:iTunes Product Version:iTunes 12.2.0.145 OSX 10.10.4
Classification: Reproducible:Always
 
Summary:
Accessing iTunes track information via scripting bridge returns nil for all properties on iTunesTrack objects when the track belongs to a streaming Apple Music track.

Steps to Reproduce:
1. sdef /Applications/iTunes.app > iTunes.sdef
2. sdp -fh --basename iTunes iTunes.sdef
3. include generated header in objc project
4. Start playing a track from Apple Music not in your library.
5. run application with generated header
6. call iTunesApplication* iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"];
7. call iTunesTrack* currentTrack = [iTunes currentTrack];
8. call NSLog(@"persistentID: %@, properties: %@", [currentTrack persistentID], [currentTrack properties]);
9. observe log output "persistentID: (null), properties: (null)"

Expected Results:
NSLog output should contain the hex persistentID and properties dictionary.

Actual Results:
persistentID and properties (and all other properties) return nil

Version:
iTunes 12.2.0.145 OSX 10.10.4

Notes:
Interestingly, when accessing the properties via dot notation and hovering over the properties in the Xcode debugger, the Xcode popup displays the expected value.

Configuration:
Occurs on all streaming Apple Music tracks. Does not occur on music stored locally.

Attachments:
Sample project. Play a song using Apple Music and debug the project. All properties for the iTunesTrack return 0 or nil.
'CurrentTrackSampleApp.tar.gz' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!