Problem:
I am updating an app for iOS 6 Address Book authorization and have hit a problem in testing. The simulator always returns that authorization is granted. This means I do not see the dialog popup requesting permission and can therefore not test that code path. Ok, use a device instead... The problem there is the OS appears to remember my answer so only asks once. Deleting the app does not help. On reinstalling it has retained the permission setting from before, so again no popup.
Solution:
From the device, Settings->General->Reset->Reset Location & Privacy.
http://stackoverflow.com/questions/12602984/abaddressbookgetauthorizationstatus-in-simulator-always-returns-kabauthorization
Problem:
dyld: lazy symbol binding failed: Symbol not found: _ABAddressBookCreateWithOptions
or
dyld: Symbol not found: _ABAddressBookCreateWithOptions
Solution:
this code was failing for me at
ABAddressBookGetAuthorizationStatus()
in iOS5, but as per yunas' answer below, I checked if (ABAddressBookRequestAccessWithCompletion != nil)
before going into the ABAddressBookGetAuthorizationStatus()
code, and it was true/false for iOS6/5. I'm sure there'll be a more
elegant way to cope with the two versions of iOS, but it's done the
trick for now.if (ABAddressBookRequestAccessWithCompletion != NULL) // we're on iOS 6
{
....................
}
else // we're on iOS 5
{
return YES;
}
http://stackoverflow.com/questions/12648244/programmatically-request-access-to-contacts-in-ios-6
No comments:
Post a Comment