Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open other app using url schemes

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;
}
like image 966
Streetboy Avatar asked Nov 12 '22 17:11

Streetboy


1 Answers

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

like image 156
Igor Avatar answered Nov 28 '22 19:11

Igor