Closed rainux closed 11 years ago
Thanks for this fix.
I wonder what should happen in the people = AddressBook::Person.all
case where the user does not grant access. I can imagine it
I think 2 sounds best to me. WDYT?
I think 2 sounds best too. To implement it looks like we should change https://github.com/alexrothenberg/motion-addressbook/blob/master/motion/address_book/person.rb#L17 to return []
if call to ABAddressBookCopyArrayOfAllPeople
returns nil
.
Do you want to make the fix to https://github.com/alexrothenberg/motion-addressbook/blob/master/motion/address_book/person.rb#L17 ?
OK, I'll send the pull request.
I merged your pull #13 so AddressBook::Person.all
returns []
when not authorized.
Thanks
There are 2 issues cause apps use motion-addressbook crash on iOS 6 devices, they got fixed in 2 commits separately.
Now request access manually works properly on iOS 6, however the simplest usage
people = AddressBook::Person.all
still raise exception if user decide to not allow access, since call toABAddressBookCopyArrayOfAllPeople
on this line https://github.com/alexrothenberg/motion-addressbook/blob/master/motion/address_book/person.rb#L17 will returnnil
.Maybe in README we should suggest developers to use manual way only.