Subclass UIApplication
and have the app use your subclass. In your subclass, override openURL:
and add your logic. When you're happy to continue with the open operation, call [super openURL:...];
.
Teach the app to use your custom subclass by editing the main.m file:
return UIApplicationMain(argc, argv, NSStringFromClass([XXApplication class]), NSStringFromClass([XXAppDelegate class]));
(Assuming XXApplication
is your app subclass and XXAppDelegate
is your app delegate class, and remembering to import the appropriate headers)