We have an App that accepts donations and per Apple's guidelines (item 21.2) we can't do this in-app, it must open a webpage in Safari to perform the donation. We've got that bit working fine, and we can actually automatically invoke the App post donation and put the user right back where they left off. The trouble is that the Tab in Safari persists when the user returns to Safari later.
Is there a way to open an app from a webpage while simultaneously closing said webpage in Safari?
Safari automatically closes your opened tabs after a specific period if you have particular settings saved. This may be another reason if your tabs seem to disappear after a certain duration. To make sure it doesn't happen again, set the Close Tabs for Safari to Manually, and you're set to go.
How to Automatically Close Safari Tabs. Navigate to Settings –> Safari, then open "Closed Tabs" from the Tabs grouping. By default, it's set to manual, but you can set it to auto-close tabs that haven't been viewed recently. You can pick to auto-close tabs after one day, one week, or one month.
To access your tabs on an iPhone if the address bar is at the top, tap the Tabs icon in the lower right. Your open tabs appear as thumbnails.
So apparently the way to do it is via Javascript. You can set the window location and then immediately close the window.
e.g.
window.location = "myapp://?stuff";
window.close;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With