If permissions are disabled, then refWrapper.error will be non nil. Currently, this will prevent self.access from being initialized. Because of this, later in loadContactsOnQueue:completion:, when [self.access requestAccessWithCompletion:] is called it will be a no-op and thus prevent the callback from ever being called.
In other words, -loadContacts: will never call its completion block when permissions are disabled.
This fixes the issue by initializing self.access regardless of whether address book initialization errors.
If permissions are disabled, then
refWrapper.error
will be non nil. Currently, this will preventself.access
from being initialized. Because of this, later inloadContactsOnQueue:completion:
, when[self.access requestAccessWithCompletion:]
is called it will be a no-op and thus prevent the callback from ever being called.In other words,
-loadContacts:
will never call its completion block when permissions are disabled.This fixes the issue by initializing
self.access
regardless of whether address book initialization errors.