I am trying to introduce ODR in my application and facing the following crash.
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'beginAccessingResources was called more than once or at the wrong time (3)'
This is what I have done so far.
(Just FYI: I am not calling endAccessingResources anywhere for the time being.)
If I remove the step 3 or request both resources in a single request then the app works fine. If I create two simultenous NSBundleResourceRequest then the app is crashing.
So far I have searched stackoverflow and read the documentation but couldn't find any help regarding this issue.
I have found the problem. I was calling beginAccessingResourcesWithCompletionHandler
on a same NSBundleResourceRequest object multiple times.
So I solved it by creating a new NSBundleResourceRequest instance for each subsequent request.