Alex Stone
Alex Stone

Reputation: 47328

iPhone4 iOS5 how to save MPMediaItem with Core Data?

I'm trying to save a list of music files that the user has selected from the iPod music library. To do so, I get a list of persistentIDs which I will use to query the library later. I do this as follows:

NSNumber* persistentID = [mediaItem valueForProperty:[MPMediaItem persistentIDPropertyForGroupingType: MPMediaGroupingTitle]];

This method returns an id, which I assign to NSNumber. The numbers that I get are of this form: 4158583232547482294 . Which number format should I select to store such numbers in core data. Is this a Integer64?

Thank you!

Upvotes: 3

Views: 801

Answers (1)

Alex Stone
Alex Stone

Reputation: 47328

After checking the Wikipedia, I can confirm that the 19 digit unsigned integer is indeed integer64. Here are other integer sizes: http://en.wikipedia.org/wiki/Integer_(computer_science)#Common_integral_data_types

Upvotes: 1

Related Questions