Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncatchable error is thrown if Contacts access is revoked from Settings #10

Open
qufighter opened this issue Apr 13, 2020 · 1 comment

Comments

@qufighter
Copy link
Contributor

qufighter commented Apr 13, 2020

An un-catchable error that causes application crash is thrown for me, on IOS 13.4 when after granting access to contacts, I revoke that access for the specific app from Settings screen.

https://github.com/jakeboxer/JBDeviceOwner/blob/master/JBDeviceOwner/JBDeviceOwner.m#L110

The following code corrects' the issue:

    if( addressBook != nil ){
        CFRelease(addressBook);
    }

Seems likely the nil reference is returned when the user has blocked access to the contacts. Maybe this is not an issue previously?

@qufighter qufighter changed the title Exception is thrown if Contacts access is revoked from Settings Uncatchable error is thrown if Contacts access is revoked from Settings Apr 13, 2020
@jakeboxer
Copy link
Owner

Thanks for the heads-up @qufighter! Would you mind opening a PR for it? I'll accept and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants