I am getting the following errors in the xcode console, but I don’t know what read only data base it is complaining about:
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
CPSqliteStatementReset: 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
The following code executes just prior to the error:
MPMediaQuery *myPlaylistsQuery = [MPMediaQuery playlistsQuery];
NSArray *array = [myPlaylistsQuery collections];
playlists = [[NSMutableArray alloc] init];
[playlists addObject:@"new playlist"];
NSLog(@"%@", [playlists objectAtIndex:0]);
int numPlaylists = 1;
for (MPMediaPlaylist *arrayItem in array) {
NSLog(@"Got here");
The NSLog prints ‘new playlist’
Then the CPSqliteStatementPerform: and the CPSqliteStatementReset: errors print immediately after the for loop is initialized.
Then NSLog prints ‘Got here’.
What read-only database am I writing and how do I correct this?
The device seems to think that you are trying to write to those locations. I am doing a similar project and opened up my iPhone’s console in Organizer to see what was going on.
Here are the lines that show up when I try to get properties of MPMediaItems:
Even though I’m just checking what the values are, it thinks I’m trying to write there. Possible bug?
EDIT:
This is a bug, as discussed here —>> https://devforums.apple.com/message/428584#428584