读取ABAddressBookCopyArrayOfAllPeople时访问不良

时间:2010-03-11 09:49:42

标签: iphone

全部,

当我尝试从设备中读取所有人的记录时如下:

NSArray* allPersons = (NSArray*)ABAddressBookCopyArrayOfAllPeople(addressBook);

我的访问权限很差。当我在模拟器中尝试相同的代码时,它正在工作。

堆栈跟踪如下:

#0  0x322aafa8 in sqlite3_backup_init
#1  0x322cb248 in sqlite3_prepare16
#2  0x32287948 in sqlite3_step
#3  0x32e3289c in CPSqliteStatementSendResults
#4  0x32e34cf4 in CPRecordStoreProcessStatementWithPropertyIndices
#5  0x32e34d26 in CPRecordStoreProcessStatement
#6  0x32e36008 in CPRecordStoreProcessQuery
#7  0x32e36064 in CPRecordStoreCopyAllInstancesOfClassWhere
#8  0x32e3608a in CPRecordStoreCopyAllInstancesOfClass
#9  0x33e61f30 in ABCCopyArrayOfAllPeopleInStoreWithSortOrdering
#10 0x33e62020 in ABCCopyArrayOfAllPeople
#11 0x33e6c184 in ABAddressBookCopyArrayOfAllPeople
#12 0x00028308 in -[ContactStore start] at ContactStore.m:192
#13 0x000175e8 in -[StoreManager getState] at StoreManager.m:213
#14 0x00016f40 in -[StoreManager enumerate:] at StoreManager.m:91
#15 0x0001fe7a in -[BackupTask handle] at BackupTask.m:249
#16 0x000238c4 in -[TaskExecuter handleTask:] at TaskExecutor.m:168
#17 0x00023ef2 in -[TaskExecuter run] at TaskExecutor.m:229
#18 0x33f7cacc in -[NSThread main]
#19 0x33f2ad14 in __NSThread__main__
#20 0x327587b8 in _pthread_body

任何帮助都将不胜感激......

最诚挚的问候, Mohammed sadiq

1 个答案:

答案 0 :(得分:1)

你解决了这个问题吗?也许是因为地址簿的格式不正确(f.ex:所有标签(firstname-lastname)填充...)

BR,

的Stefan