I have a app that I have to open safari for a payment and when it's done I want to back to app. is there any way to do this in iOS?I searched a lot there was a lot of examples for android but nothing useful for IOS.
after payment the last page would be : "https://madyar.org/BackToApp".I want when safari goes to this link, safari exits or hide and my app open again.
any advice?
Related
I have a Branch.io universal deep link that displays a product page in my app, or the equivalent website page if the app is not installed.
When tapping the link from other apps such as WhatsApp or Notes, the link works. My app is launched and immediately displays the correct product.
However, if a user uses my own app's messaging platform to pass this link to another user as a text message, the message is displayed in my app using a UITextView, and tapping the link from this UITextView always launches the fallback URL in Safari.
Only when switching back from Safari to my app, the deep link handler is called and the link is then handled correctly.
I would like my app to handle its own deep links immediately even if they are tapped from within the app itself, without launching Safari. Does anyone knows how to achieve this behavior?
Deep links are an incredibly important part of delivering a high quality user experience. With deep links, you can take users to the exact thing they clicked on or even offer a customised on-boarding experience.
You can auto-route within app without launching safari browser, please follow this link for detailed implementation:
https://docs.branch.io/deep-linking/routing/#option-3-use-branchs-easy-config-deep-link-routing
Feel free to write to support#branch.io in case you have other doubts.
I know the behavior changed between iOS 8 and iOS 9. My app's deep linking works perfectly on iOS 9 & 10. When a user clicks on a special link, a popup appears prompting the user if he would like to open it in the app.
However, for some reason when the user clicks on the same link in iOS 8, the pop up appears but at the same the he is immediately redirected to the app store. (User can actually switch back and tap on the popup and he will be redirected as expected. But the immediate redirect is unnecessary and ugly)
NOTE: It doesn't happen in safari, it happens in Twitter's App. (when a Tweet redirects to a website and the internal browser is used)
I have two questions regarding this issue. First, could it be that something is not implemented in my app? I don't think this is the reason because the popup asking the user to open it in the app is displayed.
Could it be that my website has the wrong code? Since its showing the popup and immediately redirecting at the same time. (but somehow only happens in iOS 8...)
EDIT:
I just tested this with Safari, same website, i click on the same link and the app is opened right away (there's not even a popup). So now i'm even more confused.
The place it's not really working at is when I open it through the Twitter's app.
So the flow is Twitter -> Search for tag -> Open Tweet -> Open link to my website -> Tap on the same link as described before.
Could it be that it's actually the Twitter's browser implementation fault?
I am creating a phonegap application that posts the login information to my website. When user signs off I want to come back to my app. Do I just send the url location along with the post data so that I can come back? or there is another elegant way?
Also when user clicks on the iphone home button, I want the application to exit. Currently it just saves the session and the page and goes back directly to the page if I start the application again.
I am using adobe phonegap site to build and test the application
From your description, I assume that you are navigating the Phonegap WebView (which is running your app) to the URL of your website?
If so, at this point you no longer have an app to navigate back to - the WebView has lost its handle on your app. In order to "navigate back" to your app, you should use the InAppBrowser plugin to navigate to your website. This will allow you to return to your app after the user logs out from your website. You'll need to somehow communicate the logout from your website in the InAppBrowser WebView to your app in its WebView. You may be able to achieve this with cross window messaging.
You can't "exit" an app in iOS - the OS does not allow you to do this. The best you can do is use the resume event to detect when your app has been restored from the background, then manually reset your app to its initial state.
The flow I am trying to do here is as follows:
user visits a page in my webapp with the chrome iOS app
user clicks a login link which starts a session and shows a link with an url scheme my iOS app can handle
user clicks that link and my iOS app opens up
my iOS app does it thing ( it authenticates the user )
when finished, I would like to be able to get the user back to the chrome iOS app on the same tab he started from. This tab is polling my server every x seconds to see if my iOS app has finished.
Is this possible? I can open up the chrome app easily just by using the googlechromes url scheme but this opens up a new tab. I need the user to land on the same tab
Similary for the safari app, I can get the same behaviour by using the https url scheme to open up safari.
Ok it seems it is not possible as explained here: Open safari in same tab from iPhone application
I guess it makes sense not allowing this, so other apps cannot manipulate your current open tabs.
My question pertains to integrating a web app with a native app. A button in the web app opens up my native app, and then in my native app I want a "return" button. I wanted the "return" button to just resume safari from it's suspended state, but it seems like the only way to communicate with Safari is to open an http URL.
Opening an http URL will tell Safari to navigate to a specific page, but I don't want to alter the page which the user left off on, so I don't think this approach will work for me. Is it possible to just "Resume" safari from its suspended state?
Apparently this is not possible without jailbreaking the device.
This SO post seems to answer your question:
Open Mobile Safari without using openURL:url