Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
When running my program to query the iPod library of my iPhone, I get the following output in the console:
 
CPSqliteStatementPerform: attempt to write a readonly database for UPDATE ddd.ext_container SET orig_date_modified = (SELECT date_modified FROM container WHERE pid=container_pid) WHERE orig_date_modified=0
 
I have disabled everything that outputs to the console so it isn't as if I am having an error with NSLog. What is going on here and how can I fix it. I'll include the actual brunt of the work, done in MakeDicForSongInfo:
 
+(NSDictionary *) initWithMPMediaItem:(MPMediaItem *) song andSongNumber: (int)songCount{
 
//Create & initialize NSStrings for keys
//Create NSArray to hold keys

NSString *songKey = [NSString stringWithFormat: @"%i Song Title", songCount];
NSString *albumKey = [NSString stringWithFormat: @"%i Album", songCount];
NSString *artistKey = [NSString stringWithFormat: @"%i Artist", songCount];
NSString *artistIDKey = [NSString stringWithFormat: @"%i Artist Persistent ID", songCount];
NSString *lastPlayedKey = [NSString stringWithFormat: @"%i Late Played Date", songCount];
NSString *genreKey = [NSString stringWithFormat: @"%i Genre", songCount];
NSString *ratingKey = [NSString stringWithFormat: @"%i User Rating", songCount];
NSString *playCountKey = [NSString stringWithFormat: @"%i Play Count", songCount];
 
NSArray *propertyKeys = [[NSArray alloc] initWithObjects:songKey, albumKey, artistKey, artistIDKey, 
                        lastPlayedKey, genreKey, ratingKey, playCountKey, nil];
 
//Create & initialize NSStrings to hold song property information
//Create NSArray to hold the values

NSString *songTitle = [song valueForProperty:MPMediaItemPropertyTitle];
NSString *albumName = [song valueForProperty:MPMediaItemPropertyAlbumTitle];
NSString *artistName = [song valueForProperty:MPMediaItemPropertyArtist];
NSString *artistID = [song valueForProperty:MPMediaItemPropertyArtistPersistentID];
NSString *lastPlayed = [song valueForProperty:MPMediaItemPropertyLastPlayedDate];
NSString *genre = [song valueForProperty:MPMediaItemPropertyGenre];
NSString *userRating = [song valueForProperty:MPMediaItemPropertyRating];
NSString *playCount = [song valueForProperty:MPMediaItemPropertyPlayCount];
 
NSArray *propertyValues = [[NSArray alloc] initWithObjects:songTitle, albumName, artistName, artistID, 
                           lastPlayed, genre, userRating, playCount, nil];
 
//Create NSDictionary to store information, initializing it with
//above data, then returning the resulting dictionary

NSDictionary *songInfo = [[NSDictionary alloc] initWithObjects:propertyValues forKeys:propertyKeys];
 
return songInfo;
}
Could it be something in accessing all that Media information that spooks the iPhone?
Posted 28-May-11 12:55pm
Tyre77156

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Afzaal Ahmad Zeeshan 259
1 Maciej Los 240
2 BillWoodruff 240
3 OriginalGriff 220
4 Sergey Alexandrovich Kryukov 195
0 OriginalGriff 6,419
1 Sergey Alexandrovich Kryukov 6,008
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 4,070


Advertise | Privacy | Mobile
Web04 | 2.8.1411019.1 | Last Updated 28 May 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100