Return to app from safari

In my application, I redirect the user to the safari browser when he/she taps on a button, which in turn closes the application and opens the safari browser. There is no problem in that. It works fine. The thing is when the user quits the safari browser, I want to redirect the user back to the application, not the home screen. Any idea please...

Answers


If you control the website that you are redirecting them to, then you can place a link on the site using custom URL which I describe in more details below. But if it's a site you don't control, you can have the user surf within your app using the UIWebView.

For an iOS app, you can create custom URL schemes that your app register with the system. Then on the web page you would create a link using that custom URL. That is how Apple launches the telephone.app or the mail.app from mobile safari.

For example: Let say your app is call BigBadApp. You custom URL would be: bigbadapp:// Now, you could create a link to your app would be: <a href="bigbadapp://launchedfromsafari">Launch BigBadApp</a> You can pass any kind of information back to your app using the custom URL and your app will handle that information in the app delegate. For iOS 4.2 and later: application:openURL:sourceApplication:annotation:. The name of old delegate on earlier version of iOS is application:handleOpenURL:

For more information see check Apple Implementing Custom URL Schemes. Also iOS developer:tips has a tutorial on Launching Your Own Application via a Custom URL Scheme.


You can't. When you redirect someone out of your application the only way to get back is using the task switcher or opening your application from the home screen again.

If you want to keep the user in your application you could open the web pages in a webview within your application


use UIwebViewController . that represent web link within app . so that your app wont be in back ground and add back button in navigation bar on click back button navigate to back screen . i guess it would be better


i would launch an in app browser...

this is a good uiviewcontroller subclass that has most of the browser functions already implemented. its very easy to use. https://github.com/samvermette/SVWebViewController


Need Your Help

visual studio project files

c++ visual-studio-2010 visual-studio vcproj vcxproj

What is the difference between a .vcproj and a .vcxproj Visual Studio project file? Is the .vcproj format only available in versions of Visual Studio prior to 2010?

Foreign Key add fails in MySQL with Error Code 1005, number 150

mysql foreign-keys mysql-error-1005

So I'm attempting to add a new foreign key to one of my tables as such: