gpt4 book ai didi

objective-c - 为什么我在 xcode 控制台中收到此 CPSqliteStatementPerform 错误

转载 作者:可可西里 更新时间:2023-11-01 05:32:09 26 4
gpt4 key购买 nike

我在 xcode 控制台中收到以下错误,但我不知道它提示的是什么只读数据库:

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

以下代码在错误发生之前执行:

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 打印“新播放列表”

然后 CPSqliteStatementPerform: 和 CPSqliteStatementReset: 在 for 循环初始化后立即打印错误。

然后 NSLog 打印'Got here'。

我正在编写什么只读数据库,我该如何更正它?

最佳答案

设备似乎认为您正在尝试写入这些位置。我正在做一个类似的项目,并在 Organizer 中打开我的 iPhone 控制台以查看发生了什么。以下是我尝试获取 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

虽然我只是在检查值是什么,但它认为我正在尝试在那里写入。可能的错误?

编辑:这是一个错误,如此处讨论--->> https://devforums.apple.com/message/428584#428584

关于objective-c - 为什么我在 xcode 控制台中收到此 CPSqliteStatementPerform 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5944281/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com