Can you request authorization in the application delgate applicationDidFinishLaunching and release in applicationWillTerminate?
Then you can save the general authorization authorizer in the application deletion and access it from various classes that require it.
You can access it through:
[[NSApp delegate] sharedAuthenticationRef];
or
[[[UIApplication sharedApplication] delegate] sharedAuthenticationRef];
It is assumed that you created the accessory sharedAuthenticationRefin your delet.
This question is also relevant: Best practice for application delegation
Another approach would be to create a singleton class in which a singleton instance receives authorization in the initializer and frees it in dealloc.
source
share