I'm developing an app that uses the ABAddressBook APIs to list contacts from the user's address book. When a user uses the app a lot (going in and out of view controllers) the ABAddressBook API stops abruptly responding and an error message is thrown.
AB: Could not compile statement for query (ABCCopyArrayOfAllInstancesOfClassInSourceMatchingProperties): SELECT ROWID, Name, ExternalIdentifier, Type, ConstraintsPath, ExternalModificationTag, ExternalSyncTag, AccountID, Enabled, SyncData, MeIdentifier, Capabilities FROM ABStore WHERE Enabled = ?;
Furthermore, after this error has been thrown and the user tries to navigate to a nib-powered viewcontroller, the app crashes with the following error message:
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'Sync''
Both these errors only occur after extensive usage which leads me to believe that it's some sort of memory issue. I've noticed with the Memory-debug feature that memory accumulates throughout using the app which seems to be out of the norm but the app is using ARC which means there isn't a lot that could be changed memory-management-wise. I'd greatly appreciate further insight on what could be the root of this problem and how to solve it.