I am trying to speed up syncing contacts all the contacts on the device to my app. At the moment its blocking the main thread when syncing the contacts.
I added the individual contact setup in an NSInvocationOperation and adding that to a NSOperationQueue.
I know that you can only access the UI in the main thread. What can't you access in regards to Address book data?
The address book framework is generally safe to use from a background thread but their are pitfalls. The important caveats are mentioned in the documentation:
and
Note that just because
NSInvocationOperation
are on the sameNSOperationQueue
does not guarantee that they will be executed on the same thread.