Accessing a user's iPhone music library


(Adam Butcher) #1

I’m wanting to build a music player app in Hype 3, and export to an iOS app (i.e. a replacement for the default iOS Music app). Is there any way to access the music library on the user’s phone?


(Mark Hunte) #2

See https://developer.apple.com/musickit/

This page points to diffrent ways of playing/accessing user and Apples Music

MusicKit

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


(Jonathan Deutsch) #3

Otherwise you would need to do it more on the native side (objective-c or swift) using the Media Player APIs and then send that data to the Hype document, and go back to native land to perform the play actions.


(Adam Butcher) #4

Thanks for the replies. Does anyone have a example of this being implemented?


(Jonathan Deutsch) #5

I’m not aware of examples – it is a pretty custom job (not horrendously difficult but not trivial either) to marshal data in and out of a web view and native land.

The above mentioned MusicKit is pretty new but would be more straight forward since apple has code snippets in their documentation.