I'm building an app with sencha touch 2. Basically, when you click on a link, it opens Safari and loads the URL. From that page, I would like to know how to go back to my webapp which is saved on the homescreen.

有帮助吗?

解决方案

The only way you can do that is if you control the webpage being displayed in safari, since you would have to have a link on the webpage with a url for your app. If you have control of the webpages you'll be opening in safari, then this is an easy task. Just set up a URL schema for your app and then put a link on the webpage with the url that opens your app up. There are plenty of examples of creating URL schemas for your app, just google for iOS URL schemas.

It's as simple as a few settings in Xcode, then adding a link on the webpage to open the app something like myApp://optional/paths?queryStrings=arePossibleToo&youShould=checkItOut

Hope that helps...

EDIT:

Sencha Touch provides a feature called "Native Packaging" which "wraps" your HTML5 app into a native iOS wrapper. You will have to use this functionality to tap into the URL schema support. There is similar functionality for Android, but you may not be able to achieve what you want on OS's other than those two (since Sencha Touch only provides native wrappers for iOS and android...)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top