【问题标题】:How to set up server to install iphone app from url (for development)如何设置服务器以从 url 安装 iphone 应用程序(用于开发)
【发布时间】:2023-03-18 14:04:02
【问题描述】:

我将我的 .ipa 文件放在 http://www.diawi.com/ 上,可以提供并安装它。

但是,我试图在我的服务器上进行设置,但它不想工作。

根据 diawi URL,我的 URL 以 .ipa 结尾。

我使用以下标题提供服务:

Cache-Control:public
Content-Disposition:attachment; filename="Speaking Email.ipa"
Content-Length:644878
Content-Type:application/octet-stream
Date:Fri, 20 Mar 2015 06:54:00 GMT
Expires:Mon, 01 Jan 0001 00:00:00 GMT
Last-Modified:Fri, 20 Mar 2015 06:43:39 GMT
Server:Microsoft-IIS/7.5
X-AspNet-Version:4.0.30319
X-UA-Compatible:IE=Edge,chrome=1

diawi.com 上的标题是:

Accept-Ranges:bytes
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:keep-alive
Content-Disposition:attachment; filename="Speaking Email.ipa"
Content-Length:644878
Content-Type:application/octet-stream
Date:Fri, 20 Mar 2015 07:09:22 GMT
ETag:"550bc49e-9d70e"
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Last-Modified:Fri, 20 Mar 2015 06:56:30 GMT
Server:nginx
Set-Cookie:__utmmobile=0x4bf390e7f5e82765; expires=Sun, 19-Mar-2017 07:09:22 GMT; Max-Age=63072000; path=/
Set-Cookie:insc=2; expires=Fri, 20-Mar-2015 07:10:22 GMT; Max-Age=60

当我下载这两个 IPA 并将它们重命名为 ZIP 和 Beyond 比较它们时,它们是相同的。所以据我所知,他们并没有对 IPA 或标题做任何特别的事情......

他们是怎么做到的? (PhoneGap build 也做同样的事情)

【问题讨论】:

    标签: ios cordova phonegap-build


    【解决方案1】:

    你不必链接.ipa,你必须链接一个.plist

    <a href="itms-services://?action=download-manifest&url=http://www.yourserver.com/yourApp/manifest.plist">Install the App</a>
    

    manifest.plist 应该是这样的:

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
            <dict>
                <key>items</key>
                <array>
                    <dict>
                        <key>assets</key>
                        <array>
                            <dict>
                                <key>kind</key>
                                <string>software-package</string>
                                <key>url</key>
                                <string>http://www.yourserver.com/yourApp/YourAppName.ipa</string>
                            </dict>
                        </array>
                        <key>metadata</key>
                        <dict>
                            <key>bundle-identifier</key>
                            <string>com.yourcompany.YourAppName</string>
                            <key>kind</key>
                            <string>software</string>
                            <key>title</key>
                            <string>iOS Test App</string>
                        </dict>
                    </dict>
                </array>
            </dict>
        </plist>
    

    【讨论】:

    • 谢谢。这不是 diawi 所做的——它们链接到 .ipa——但我会尝试这个建议,谢谢。
    • 是的,行得通!我必须包含一个 HTTPS 链接而不是 HTTP。并将 plist 作为有效的 mime 类型(应用程序/八位字节流)添加到服务器。
    • @mikenelson 如何将 mime 类型设置为 ftp 服务器。我在下载应用程序时遇到问题。清单文件在浏览器中显示为原始字符串,而不是下载。请帮帮我。
    • @Rajesh,您需要一个 HTTPS 服务器并为服务器配置它。怎么做取决于你使用的服务器。
    猜你喜欢
    • 2011-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-05
    相关资源
    最近更新 更多