4

I just created test app and wanted to lunch it from other app.

In both apps added Url type and schemes. Then from one app called:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"Test://test_page/"]];

This worked but i got a warning:

Application windows are expected to have a root view controller at the end of application launch

What i am missing here ?

Thanks

EDIT: Added test app lunch method:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    MyViewController *mainView = [[MyViewController alloc] init];
    UINavigationController *navControl = [[UINavigationController alloc] initWithRootViewController: mainView];


    [self.window setRootViewController: navControl];

    // Override point for customization after application launch.
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}
Streetboy
  • 4,351
  • 12
  • 56
  • 101
  • 1
    https://www.google.com/#hl=en&tbo=d&output=search&sclient=psy-ab&q=Application+windows+are+expected+to+have+a+root+view+controller+at+the+end+of+application+launch++&oq=Application+windows+are+expected+to+have+a+root+view+controller+at+the+end+of+application+launch++&gs_l=hp.3..0i30j0i8i5.152.152.0.483.1.1.0.0.0.0.78.78.1.1.0.les%3Bcdymh..0.0...1.2.xo3sepwI3nI&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&fp=c5f121a6de0d0409&bpcl=38625945&biw=1395&bih=783, http://stackoverflow.com/questions/7520971/applications-are-expected-to-have-a-root-view-controller-at-the-end-of-applicati, – iDev Nov 17 '12 at 08:06
  • http://stackoverflow.com/questions/8706828/application-windows-are-expected-to-have-a-root-view-controller-at-the-end-of-a – IluTov Nov 17 '12 at 11:27

1 Answers1

1

You should register URL schemes in .plsit file. Please, see this link

Igor
  • 4,235
  • 3
  • 34
  • 32