Reputation: 1
I am integrating application A to application B. Is that any way I can call the didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
of AAppDelegate of application A from application B??
Upvotes: 0
Views: 1365
Reputation: 6268
If your intention is to launch one application from another,
You could use a Custom URL scheme to launch one application from another. But it is not legal and your app will get rejected by apple.
Have a look at this link,
http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
Upvotes: 2
Reputation: 2915
calling application:didFinishLaunchingWithOptions
can be used if at some point you want to restart your application from the beginning. I am very late but it might help other to solve their problems.
below code will help you in this.
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate application:[UIApplication sharedApplication] didFinishLaunchingWithOptions:nil];
Upvotes: 0
Reputation: 45
Just copy the needed controllers and views to the "new" app and integrate it there. You shouldn´t change things about the application lifecycle.
Upvotes: 0
Reputation: 2742
Why would you check if a standard app is launched? The SMS app is always running and therefor the didFinishLaunchingWithOptions method will never get called for the sms app. Maybe this tutorial will help you reach your goal. Please tell me if it's totally NOT what your looking for, because maybe i'm just misunderstanding you a.t.m.
http://blog.mugunthkumar.com/coding/iphone-tutorial-how-to-send-in-app-sms/
p.s. documentation from Apple can be found here
Upvotes: 0