为什么我在xcode控制台中收到此CPSqliteStatementPerform错误 [英] Why am I getting this CPSqliteStatementPerform error in xcode console
问题描述
我在xcode控制台中遇到以下错误,但我不知道它抱怨的只读数据库是什么:
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");
NSLog打印'新播放列表'
The NSLog prints 'new playlist'
然后在初始化for循环后立即打印CPSqliteStatementPerform:和CPSqliteStatementReset:errors。
Then the CPSqliteStatementPerform: and the CPSqliteStatementReset: errors print immediately after the for loop is initialized.
然后NSLog打印'Got here'。
Then NSLog prints 'Got here'.
我写的是什么只读数据库,如何更正?
What read-only database am I writing and how do I correct this?
推荐答案
该设备似乎认为你正在尝试写这些地点。我正在做一个类似的项目,并在Organizer中打开我的iPhone控制台,看看发生了什么。
以下是我尝试获取MPMediaItems属性时显示的行:
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?
编辑:
这是一个错误,正如这里讨论的那样--- >> https://devforums.apple.com/message/428584#428584
这篇关于为什么我在xcode控制台中收到此CPSqliteStatementPerform错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!