alexrothenberg / motion-addressbook

MIT License
89 stars 30 forks source link

Crash on device if user manually turns off permission #9

Closed jamonholmgren closed 11 years ago

jamonholmgren commented 11 years ago

Replication steps:

  1. On your device, open an app that uses motion-addressbook to get contacts and "Allow" access
  2. Close the app and go to Settings -> Privacy -> Contacts and turn OFF the access
  3. Open the app again. Crash.

I'm trying to get a backtrace but I've been having trouble connecting the debugger to my app. Can anyone else verify this issue?

alexrothenberg commented 11 years ago

Embarassingly I still don't have my hands on an IOS6 device. I'll see what I can do about that later this week.

My guess is that one of the apis is returning null when access is revoked and we're probably trying to send a message to nil. But that's just a hunch.

jamonholmgren commented 11 years ago

No worries, Alex. My interim fix seems to be working. I am including an Objective-C static library that I wrote and calling that before calling AddressBook. But whenever you get a chance....

Thanks!

alexrothenberg commented 11 years ago

Jamon,

I finally got a new device with IOS6 so am finally able to look into this. It turns out @rainux for made the necessary changes to fix this in pulls #12 & #13.

I just released a version 0.1.3 of this gem that fixes this issue.

Please let me know if you still see problems with the latest version.

jamonholmgren commented 11 years ago

Thank you, Alex. I appreciate your follow-through.