Install .ipa to iPad with or without iTunes

后端 未结 25 2098
南旧
南旧 2020-12-04 05:33

I have the .ipa from PhoneGap build and I need to test it. I got provisioning profile from Developer account.

So my question is: can I directly put my <

相关标签:
25条回答
  • 2020-12-04 06:22

    iPhone doesn't allow to install an ipa directly, so provide a direct link to the ipa file is useless. That's why some people uses external services that provide a link or a qcode to install the ipa.

    Another option, that nobody told in the other answers to this question and that it's completely independent from iTunes or any external service, is to create your own script that generates an installation link and automatically sends it to your mobile (for example by email). I created a such script for my personal use, that:

    1. creates the html file;
    2. creates the plist file;
    3. copies ipa, html and plist files to my server;
    4. sends me the link.

    Because I work on Linux, I created a Bash script. You can use any other scripting language, but it's important to know what to put in the html and plist files.

    This is the part of my script that generates the html and plist content. I hope that it's enough self-explanatory:

    sha=`sha1sum ${ipa} | awk '{ print $1 }'`
    output=${sha}-${AppName}-${version}.ipa
    html=${sha}-${AppName}-${version}.html
    plist=${sha}-${AppName}-${version}.plist
    
    # Generates html
    echo "<!DOCTYPE html>
     <html>
     <head>
     <meta charset=\"UTF-8\">
     <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">
        <meta name=\"MobileOptimized\" content=\"width\" />
        <meta name=\"HandheldFriendly\" content=\"true\" />
        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />
        <meta http-equiv=\"cleartype\" content=\"on\" />
     <title>Install ${AppName} ${version}</title>
     </head>
    
     <body>
       <h1><a href=\"itms-services://?action=download-manifest&url=${serverUrl}${plist}\">
         Install </a></h1>
     </body>
    
     </html>" > ${html}
    
    # Generate plist
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
    <!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>${serverUrl}${output}</string>
                    </dict>
                    <dict>
                        <key>kind</key>
                        <string>full-size-image</string>
                        <key>needs-shine</key>
                        <true/>
                        <key>url</key>
                        <string>${serverUrl}Icon%402x.png</string>
                    </dict>
                    <dict>
                        <key>kind</key>
                        <string>display-image</string>
                        <key>needs-shine</key>
                        <true/>
                        <key>url</key>
                        <string>${serverUrl}Icon.png</string>
                    </dict>
                </array>
                <key>metadata</key>
                <dict>
                    <key>bundle-identifier</key>
                    <string>${bundle}</string>
                    <key>bundle-version</key>
                    <string>${version}</string>
                    <key>kind</key>
                    <string>software</string>
                    <key>title</key>
                    <string>${AppName}</string>
                </dict>
            </dict>
        </array>
    </dict>
    </plist>" > ${plist}
    

    For a simple example you can also see: https://github.com/Saleh7/ipa-install

    0 讨论(0)
提交回复
热议问题