मैं समूह का नाम प्राप्त करने की कोशिश कर रहा हूं लेकिन कई बार "उपयोगकर्ता द्वारा संपर्कों को फिर से लोड करने के लिए" इस विधि को कॉल करें, यह nil
मान और निम्न त्रुटि प्रदान करता है।ABAddressBookCreate(), ABAddressBookGetGroupCount, ... वापसी @ "0x00000000 <nil>"?
-(void) getGroupsName
{
[groupsName removeAllObjects];
//address book object to interact with iPhone contacts.
ABAddressBookRef addressbook = ABAddressBookCreate();
//get groups count
CFIndex groupsCount = ABAddressBookGetGroupCount(addressbook);
//get all available groups as array
CFArrayRef allGroups = ABAddressBookCopyArrayOfAllGroups(addressbook);
for (int i = 0; i<groupsCount; i++) {
//get group of index=i from groups array
ABRecordRef group = CFArrayGetValueAtIndex(allGroups, i);
//get group name, I use __bridge_transfer to transfer from C to objective-c.
[groupsName addObject:(__bridge_transfer NSString*)ABRecordCopyCompositeName(group)];
}
CFRelease(allGroups);
CFRelease(addressbook);
}
//////////////////////////////////////////////////////////////
warning: Could not compile statement PRAGMA journal_mode = wal;: unable to open database file error 14 creating properties table: unable to open database file warning: Could not compile statement SELECT value FROM _SqliteDatabaseProperties WHERE key = ?;: unable to open database file warning: Could not compile statement SELECT value FROM _SqliteDatabaseProperties WHERE key = ?;: unable to open database file warning: Could not compile statement SELECT value FROM
_SqliteDatabaseProperties WHERE key = ?;: unable to open database file warning: Could not compile statement SELECT ROWID, First, Last, Middle, NULL, NULL, NULL, Organization, NULL, NULL, Kind, NULL, NULL, Nickname, Prefix, Suffix, FirstSort, LastSort, CreationDate, ModificationDate, CompositeNameFallback, NULL, StoreID, NULL, FirstSortSection, LastSortSection, FirstSortLanguageIndex, LastSortLanguageIndex, NULL, NULL, NULL, PersonLink, NULL, IsPreferredName FROM ABPerson;: unable to open database file warning: Could not compile statement SELECT ROWID, First, Last, Middle, NULL, NULL, NULL, Organization, NULL, NULL, Kind, NULL, NULL, Nickname, Prefix, Suffix, FirstSort, LastSort, CreationDate, ModificationDate, CompositeNameFallback, NULL, StoreID, NULL, FirstSortSection, LastSortSection, FirstSortLanguageIndex, LastSortLanguageIndex, NULL, NULL, NULL, PersonLink, NULL, IsPreferredName FROM ABPerson;: unable to open database file warning: Could not compile statement INSERT OR REPLACE INTO _SqliteDatabaseProperties VALUES (?, ?);: unable to open database file warning: Could not compile statement SELECT value FROM
_SqliteDatabaseProperties WHERE key = ?;: unable to open database file warning: Could not compile statement INSERT OR REPLACE INTO
_SqliteDatabaseProperties VALUES (?, ?);: unable to open database file warning: Could not compile statement SELECT value FROM
_SqliteDatabaseProperties WHERE key = ?;: unable to open database file warning: Could not compile statement SELECT value FROM
_SqliteDatabaseProperties WHERE key = ?;: unable to open database file warning: Could not compile statement SELECT ROWID FROM ABGroup;: unable to open database file warning: Could not compile statement SELECT ROWID, Name, ExternalIdentifier, StoreID, NULL, NULL, NULL FROM ABGroup;: unable to open database file
तो मैं अगर उपयोगकर्ता कई अद्यतन और हर समय बनाने के समय से अच्छा नहीं देशी अधिसूचना का प्रयोग मुझे पता है जब addressbook
मैं addressbook
का उपयोग समय की संख्या में कमी करने के लिए संशोधित करते हैं, लेकिन अभी भी addrssbook
प्राप्त संशोधित इस मेथोड या addressbook
से संबंधित किसी अन्य को कॉल करना होगा।
तो अभी भी आपकी मदद चाहिए ???
कृपया देखें http://stackoverflow.com/questions/13053976/catch-22 -ऑर्डर-टू-द-डॉक्यूमेंटेशन-एड्रेस-बुक-यूज -6 -12 – rmaddy
@rmaddy यह वही मामला नहीं है, मेरा कोड पहली बार संपर्क करता है और हर बार, लेकिन मेरे पास पुनः लोड बटन है जब उपयोगकर्ता इसे 20 से अधिक बार क्लिक करता है तो यह – Omarj
से ऊपर की त्रुटि को वापस लौटाता है, मुझे नहीं पता था कि आपको कई पुनरावृत्तियों के बाद ही समस्या थी। – rmaddy