简体   繁体   English

如果用户点击Iphone上的按钮,则从服务器下载和安装IPA

[英]Downloading and Installing IPA from server if user clicks on button on Iphone

I am working on an app where I deploy the .ipa file and manifest.plist on my server and from there I try to install the app to my iphone. 我正在开发一个应用程序,我在我的服务器上部署.ipa文件和manifest.plist,并从那里尝试将应用程序安装到我的iphone。

The app is initially installed but I need to check if a latest version is available on the server. 该应用程序最初安装但我需要检查服务器上是否有最新版本。 I have done this part and now wish to install the latest .ipa from the server directly to my phone without redirecting user to the html page of the server 我已完成此部分,现在希望将最新的.ipa从服务器直接安装到我的手机,而无需将用户重定向到服务器的html页面

Found some links on stack overflow, especially this: Download and install an ipa from url on iOS I have done this: 发现堆栈溢出的一些链接,尤其是: 在iOS上从url下载并安装ipa我已经这样做了:

 let endPointURL = NSURL(string: "itms-services://?action=download-manifest&url=myUrlString")
        UIApplication.sharedApplication().openURL(endPointURL!)

I get unsupported URL exception. 我得到不受支持的URL异常。 Can anyone tell me how I can achieve this? 谁能告诉我如何实现这一目标? Is there any other way to directly start installing the upgrade without navigating to the actual html page? 有没有其他方法可以直接开始安装升级而无需导航到实际的html页面?

It's just for testing purpose. 它仅用于测试目的。 Only registered devices are allowed to do this. 只允许注册的设备执行此操作。 Only single way is there to download your app and its app store. 只有单一方式可以下载您的应用及其应用商店。 You can give app store link and it will redirect user to appstore. 您可以提供应用商店链接,它会将用户重定向到appstore。

And if you want to test just use test flight it's easiest way. 如果你想测试只是使用测试飞行,这是最简单的方法。

Your linked question also tells that. 你的链接问题也说明了这一点。 Just for testing purpose it's possible now. 仅用于测试目的,现在可能。

I found this same issue before. 我之前发现了同样的问题。

A workaround for this is to new up a webview (you can hide it if you wish) and then give the request to the webview to perform. 解决此问题的方法是新建webview(如果愿意,可以隐藏它),然后将请求发送给webview执行。 When the request loads you will then be shown the popup asking if you wish to download the app. 当请求加载时,您将看到弹出窗口,询问您是否要下载该应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM