Why am I getting this CPSqliteStatementPerform error in xcode console
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:
开发者_如何学PythonMPMediaQuery *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:
May 27 22:11:04 unknown sandboxd[2512] <Notice>: QueryTesting(2510) deny file-write-mode /private/var/mobile/Media/iTunes_Control/iTunes/iTunes Library.itlp/Library.itdb
May 27 22:11:04 unknown sandboxd[2512] <Notice>: QueryTesting(2510) deny file-write-data /private/var/mobile/Media/iTunes_Control/iTunes/iTunes Library.itlp/Library.itdb
May 27 22:11:04 unknown sandboxd[2512] <Notice>: QueryTesting(2510) deny file-write-data /private/var/mobile/Media/iTunes_Control/iTunes/iTunes Library.itlp/Dynamic.itdb
May 27 22:11:04 unknown sandboxd[2512] <Notice>: QueryTesting(2510) deny file-write-data /private/var/mobile/Media/iTunes_Control/iTunes/iTunes Library.itlp/Extras.itdb
May 27 22:11:04 unknown sandboxd[2512] <Notice>: QueryTesting(2510) deny file-write-data /private/var/mobile/Media/iTunes_Control/iTunes/iTunes Library.itlp/DBTemp/ddd.itdbm
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
This started happening to my app, when i started to use a Settings.bundle root.plist file. When i remove this it disappears.
Think there is something wrong with NSUserDefaults.StandardUserDefaults.......
For now i'm just going to ignore this message, and send an update of my app to apple.
精彩评论