Back to {AppName} Not Displaying | iOS9 openURL

I am using the following code:

NSString *customURLString = [NSString stringWithFormat: @"secondApp://?%@", [document fileId]]; NSURL *customURL = [NSURL URLWithString: customURLString]; [[UIApplication sharedApplication] openURL: customURL]; 

"Back to firstApp" does not appear when secondApp is successfully opened. Is there something I'm missing? Having cleared the Internet for this answer, I try to make sure that there is "Back To firstApp".

Has anyone come across this?

+6
source share
3 answers

I found out the answer.

Apparently, if you put this in your info.plist for the second application, enter image description here

and declare that the Status view in the View control panel is NO. It will not display the back button. Not quite sure why, but this solved my problem.

Thank you all for your support!

+2
source

It is worth checking : "Return to ..." appears only when the state is visible. Are you sure your second application displays Bar status?

The only explanation that occurred to me was that your second application could use the full-screen launch sprout method. Please check:

Your code is ok, check to see if this gave you the desired behavior.

 [[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"https://stackoverflow.com"]]; 

If so, there is a problem with your second application.

+1
source

Define the target info.plist application as follows.

 <key>LSApplicationQueriesSchemes</key> <array> <string>Myapp</string> </array> <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>com.Myapp.demo</string> <key>CFBundleURLSchemes</key> <array> <string>Myapp</string> </array> </dict> </array> 

Put this method in the target application AppDelegate.m

 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return YES; } 

Now you can use the app-app for an open app using this.

 NSString *customURLString = [NSString stringWithFormat: @"Myapp://"]; NSURL *customURL = [NSURL URLWithString: customURLString]; [[UIApplication sharedApplication] openURL: customURL]; 

The status bar will display Back To App .

You can also check by typing Myapp: // from Safari . it will open your application with Back To Safari .

+1
source