I was programming an iPhone application that requires accessing user’s contacts.
I used APAddressBook library
###The application complies; it works on my old iPhone 4 that runs iOS 7.1; works on simulator; but not on my iPhone 6 (iOS 8.1.2).
###The weird thing was, the application crashes right before the contacts view controller shows up; no error messages; setting breakpoints won’t work; only prints this message:
As I said, setting breakpoints won’t work; the application just quits with no useful information provided, so I couldn’t debug.
Write the view controller in Objective-C, rather than Swift
Changed code signing from distribution to developer
Constantly cleaning build folder
##At the end, I realized that the problem was, I didn’t link ‘AddressBook.framework’.
So I went to target settings; added ‘AddressBook.framework’ to ‘Linked Frameworks and Libraries’; cleaned project and cleaned build folder.
Ran the application on my device; the application still crashes, but it won’t just disappear without any useful information. I got information about the error.
That’s great. Although it still crashes, but at least I’m able to debug.