Return to app from safari - iphone

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...

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: Launch BigBadApp 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

Related

when the dynamic link is opened from browser(especially in safari) it is always redirecting to the app store even though app is installed in iOS

My URL is same as below, i will get this link to my mail from sendgrid and in iOS when i tap on this it always loads the browser first (safari most of the case) and opens in app preview page even though app is installed.
URL:<a clicktracking="off" href="https://{project_name}.page.link/?link=https://{project_name}.page.link/users/email_check/{{ $email_token }}&apn=com.{project_name}.app&isi={applestoreid}&ibi=com.{project_name}.app&efr=1">https://{project_name}.page.link/?link=https://{project_name}.page.link/users/email_check/{{ $email_token }}&apn=com.{project_name}.app&isi={applestoreid}&ibi=com.{project_name}.app&efr=1</a>
When you access a dynamic link in a browser. It will intentionally not go to your app because the actions indicate that your intent is to open a web page.
If you have your custom domain from Firebase ie: [your custom domain].app.goo.gl, send it into your link like so:
https://[your custom code].app.goo.gl/
And then tap that link. Does it open the app, or does it go to Safari? If it goes to Safari, it means that you haven't configured your iOS app for universal links yet, which is needed to support opening your custom domain url directly in the app. In Xcode, go to the Capabilities tab, and ensure that you've added the universal link domain as described in Apple's docs.
If you tapped the site address on the far top-right on iOS, it disables universal linking on that iOS app, until you long-tap and ask to open in the app again.
Second, you can't type in universal links into Safari's address bar and navigate to the app. Safari, by design, will open that URL in the browser. The easiest, most reliable way to test whether universal links are working is to put a universal link into the app, and tap the link from there.

How to open a website from iPad?

I'm developing an Air app for an iPhone, and I want to have a button that gives you the functionality of going to a web page, that means, minimizing the app and execute the link to that page, how can I do that?.
You call the navigateToURL method when the button is clicked / tapped. Refer details of the API at http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7cba.html

Get Safari's last redirected URL to my main UIviewcontroller

In my app, I call Safari to open (UIApplication delegate), Safari comes into foreground and there are some url redirections.
At last, there's a url that I want to save in my main application.
How can I get this url and how can I return to my main app?
Short answer: You can't. Apple does not allow 3rd party applications to access any information about recent URL's visited in Safari and so on.
You can't, because Safari is now open and your app is now closed. In addition, the iPhone is sandboxed so you are probably not allowed to access Safari's information anyway.
Instead, I would recommend instead using a UIWebview. It allows the user to access the web from inside of your app. The current URL open in the UIWebView is located at myWebView.request.URL.absoluteString;
EDIT: This is not an example of multitasking. Your program can not run in the background unless it is making a VoIP call, checking location, or receiving push notifications.

iphone - adding option for gifting the app

In my iphone app, i'd like to add the option to "Gift" the app.
Basically I like to add a button which pops up the username to whom i want to gift.
Is this possible?
As far as i know this functionality is part of the App Store and there is no API to provide that functionality in-app.
CheersShai
The best you can do is make the "gift" button open up the app store pointing to the app's page (which is still useful, IMO).
Once you have the web URL for your app, tell your UIApplication to open it and the user will land in the App Store app:
How to link to apps on the app store
Make sure you use the itms-apps:// hint below the accepted answer or you'll wind up with a double redirect which is annoying.

Can i start a iPhone app by an iframe?

Id like, if possible, just create an App for iphone by and URL, like http://keepyourlinks.com/browser.php
my go it's to make a browser inside a browser....
possible?
Yes it is, our app uses a browser inside the native application to view a web site. We also setup encryption and session variables so that we can check if they are logged in and validate that they are on the iPhone app and not in a browser.
You can use a UIWebView in your XIB and pass it a URL.