Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap Build ad-hoc OTA

Context: I am using Phonegap Build to build an .ipa file for ad-hoc OTA distribution (for beta testers). I added a new key to my Phonegap build profile (this is a proof-of-concept thing for my company), which is the distribution certificate and the private key exported as a .p12 file. Then I requested and downloaded a mobile provisioning profile for the ad-hoc users from the Apple dev portal. I made my own .plist from a native app I built a while back, and I put the .ipa on a web server with the usual directions for downloading and installing. The .ipa file almost gets installed, before I get an error that says that the file could not be downloaded. I looked in the device logs in Organizer, and there wasn't much. The console just tells me that MobileInstallationInstall: failed with -1 was the problem. When I do the same thing, but with a developer provision and the developer cert exported to .p12, I can install it without problem through iTunes. But I can't quite seem to get the OTA distribution squared away.

Any thoughts about why I am getting this and what I can do to resolve it? Here's the manifest plist that I made up from past projects:

EDIT: Yes, the devices are correctly assigned to the provisioning profile.

<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://myserver/adhoc_download/myapp.ipa</string>
          </dict>
          <dict>
            <key>kind</key>
            <string>full-size-image</string>
            <key>needs-shine</key>
            <true/>
            <key>url</key>
            <string>http://myserver/adhoc_download/images/icon-ipad3.png</string>
          </dict>
          <dict>
            <key>kind</key>
            <string>display-image</string>
            <key>needs-shine</key>
            <true/>
            <key>url</key>
            <string>http://myserver/adhoc_download/images/icon-iphone4.png</string>
          </dict>
        </array>
        <key>metadata</key>
        <dict>
          <key>bundle-identifier</key>
          <string>com.mycompany.myapp</string>
          <key>kind</key>
          <string>software</string>
          <key>subtitle</key>
          <string></string>
          <key>title</key>
          <string>myapp</string>
        </dict>
      </dict>
    </array>
  </dict>
</plist>
like image 282
jdb1a1 Avatar asked Nov 16 '12 22:11

jdb1a1


1 Answers

Is the profile embedded in the ipa really the one you think it is? Once an incorrect version of the profile gets into the build or the device it can be quite hard to get rid of.

I'd recommend uploading the ipa to testflight - it should work much the same as the manual plist setup, but will give you a bit more visibility into what is actually being installed.

like image 107
Tom Clarkson Avatar answered Nov 03 '22 23:11

Tom Clarkson