在 Apple Store 上分发 Web 应用程序时出现问题
我在找出如何分发基于网络的应用程序方面遇到了很大的问题。有这样的描述:
我有一个基于网络的应用程序,我想通过 Apple Store 分发(该应用程序本身是免费的 - 我想使用 Apple Store,因为每个人都使用它,而且它是 iPhone 的自然分发渠道)。要使用 Apple Store,我可以制作一个包装应用程序,它将在启动后启动 Safari 浏览器 - 但这种方法看起来相当丑陋:
1/ 首先启动包装应用程序窗口
2/ 然后在应用程序委托中打开链接
NSString *stringURL = @"http://www.mypage.com/";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
3/应用程序将进入后台
4/ Safari 启动
5/ Safari 启动也不太好,因为之前打开的页面首先显示在 Safari 中,然后滑动到一个空白的新窗口,在其中启动我的 Web 应用程序。
“不太好”的启动是第一个问题 - 第二个问题是应用程序不是全屏,我没有找到如何强制 Safari 全屏的方法。
当然 - 我可以强制用户首先可以直接进入我的应用程序网页,然后他们将在跳板上创建一个书签,这样他们就会在此处看到图标。然后他们将有一个很好的发布+全屏 Safari,但我将失去在 Apple Store 上推广和分发该应用程序的可能性。
最后一种可能是使用UIWebView,但它不支持HTML5缓存清单和localStorage,因此无法使用。
有没有人建议我如何处理这个问题,或者我必须忘记苹果商店?
BR 斯坦恩
I have quite a problem with finding out how to distribute the web based application. There is the description:
I have a web based application I would like to distribute over Apple Store (the application itself is free - I would like to use Apple Store because everybody uses it and it is a natural distribution channel for iPhone). To use the Apple Store I can make an wrapper application, which will launch the Safari browser after its startup - but this approach looks pretty ugly:
1/ First the wrapper application window is launched
2/ Then in application delegate I open the link
NSString *stringURL = @"http://www.mypage.com/";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
3/ The application is going to background
4/ The Safari is launched
5/ The Safari launch is also not so nice, because the previously opened page is shown in Safari first and then it slides to a blank new window, where start my web application.
The 'not so nice' launch is the 1st problem - 2nd problem is that the application is not full screen and i did not find a way how to force Safari to become full screen.
Sure - I can force users to can go directly to my application web page first, then they will create a bookmark on the springboard, so they will have the icon here. Then they will have a nice launch + full screen Safari, but I will loose the possibility do promote and distribute the application on the Apple Store.
The last possibility is to use the UIWebView, but it does not support HTML5 cache manifest and localStorage, so it cannot be used.
Has anyone some advice how to handle this or I have to forgot the Apple Store?
BR
STeN
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我意识到您可能花费了大量时间来学习 WebView 等,但我相信您最好查看 PhoneGap,它是专门为此类事情量身定制的(您甚至可以从中获得 Android 应用程序...)。
这是一个快速视频,展示了将 PhoneGap 与 jQTouch(一个 Web 应用程序)集成是多么容易iPhone 插件)。
I realize you've probably dedicated a fair amount of time to learning about WebViews, etc., but I believe you'd be much better off checking out PhoneGap, which is tailored specifically for this sort of thing (you may even get an Android app out of it...).
Here's a quick video showing how easy it is to integrate PhoneGap with jQTouch (a web app plugin for iPhone).
UIWebView 是 Safari 的(非常)普通版本。您必须做大量工作才能使其表现接近 Safari。例如,处理身份验证(我在使用 UIwebView 时遇到很多麻烦)、浏览器历史记录(如果使用框架)以及缓存都将花费您一些时间,具体取决于您正在开发的应用程序的类型。
恕我直言,制作一个网络应用程序并要求用户制作主屏幕书签的方法是目前解决您的问题的最佳方法。
UIWebView is a (very) vanilla version of Safari. You'll have to do quite a bit of work to make it behave close to Safari. For example, handling authentication (I have a lot of trouble with UIwebView), browser history if frames are used, and caching are all going to take you a bit of time depending on the type of app you're developing.
IMHO, the approach of making a Web app and asking user to make a home screen bookmark is currently the best approach for your problem.