Skip to content

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

Description

@qufighter

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions