How to handle the Return to Safari button click from ios app - ios

I have an app that is launched from a url in safari. On the top of the app is a < safari button that returns to the calling safari tab. I would like to my app to handle the event and close resources that I'm using when the < safari button is tapped.
I've searched with no success.

There is no way to know that a user tapped the "return to previous app" link in the status bar.
All your app can detect is that it has entered the background. But of course that could happen for many other reasons.

Related

Swift 3 ,how reload a view if login fails

When I launch my app I have to use TouchID to login. It works correctly if I log, but If I click on "Cancel" button the app shows me a white view. I would like the app to totally close and go to the Home.
I tried it but when I click on the app logo again it appears as white page
UIControl().sendAction(#selector(URLSessionTask.suspend), to: UIApplication.shared, for: nil)
As alternative way I would like also that appear again the main page in which I have to use TouchId.
How can I do it?
You can as a user to login with TouchID in applicationWillEnterForeground (each time when an app opens). In case if you use TouchID for secure app entering. You can not close an app programmatically. It's prohibited.

iOS how can I remove 'App link' button from the status bar when open app via deeplink?

When I open the app via Branch deeplink there emerges app link button on the upper right corner on status bar that allows you to block app links. So that all the deeplinks start to redirect me to Appstore.
screenshot
Can I remove this button somehow?
Because common users could accidentally press this button thereby blocking their deeplinking ability and the next time they'll be redirected to Appstore. And I think it's very unclear for them to resolve this issue.
The button you seeing is the feature of iOS Universal Links. You can't disable this button.

Return from Safari to IOS application with UIAlertView

I opened a link in safari browser, its a web page for online Payment, I want to do is that when user press cancel button on webPage then it will show alert view in safari and come back to application and when user press ok then it open iOS application again, I do not have any reviews for this. I need help about this.

How can I remove the new back-to-previous-app iOS 9 button from my app?

For example, when a user logs in to my app with Facebook, I open the Facebook app for auth, and then the Facebook app switches back to my app. But from then on, "Back to Facebook" stays in the top-left.
At this time, I do it by hiding status bar. I am still looking for a better solution.

Is it allowed to add a UITabBarItem that opens up Safari?

I want to add a UITabBarItem on the TabBar which when clicked opens up Safari instead of loading its corresponding tab. (Not UIWebView but the app goes to background and opens up Safari instead)
I already know how to do this, but I was wondering if this is allowed by Apple. I know they're OK with using the TabBarItem to trigger other actions such as opening a modal in the app, etc. However I am not sure if it's OK to open a safari.
I am just being cautious because I don't want it to get rejected for this and wait another week.
I don't see a reason why it shouldn't be allowed.
But: it could lead to confusion amongst your users, because they would most likely not expect that touching an item on the TabBar leads to an app switch. I would rather open a webView and offer the additional possibility to open the page in Safari.
There is no harm doing such and it is also allowed by Apple.
But, I would personally suggest to use UIWebView, over Safari navigation. Because it will create unhealthy user experience, where he/she requires to jump around to swith in-between Safari and App. Rather you can open the same link in UIWebView, which will kepp our user in app only.

Resources