Phonegap Build ad-hoc OTA
Asked Answered
L

2

6

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>
Loveridge answered 16/11, 2012 at 22:10 Comment(4)
Can you share your Web server settings to download ipa file in browser.Professorate
Please follow below link for OTA distribution aaronparecki.com/2011/021/article/1/… davidbits.blogspot.in/2011/05/…Professorate
@rpellru- I didn't think to check the web server settings; I will check them on Monday. I have done many OTA distributions before, so I know the process pretty well; I just haven't done one with Phone Gap Build .ipa.Loveridge
@repelluru - If the web server didn't allow .ipa mime types, I don't think the download would almost get finished before dying. I will check nonetheless, though.Loveridge
D
2

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.

Dorathydorca answered 21/11, 2012 at 3:41 Comment(2)
Yeah, I've used test flight before, but you've given me the idea to go through and manually remove all the provisioning profiles for the app from the device. If that does the trick, I will come back and mark your solution as the answer. Thanks!Loveridge
As it turns out, I was using the distribution certificate with the distribution ad hoc mobile provisioning profile to sign the ipas on Phone Gap Build. What you want, is to use the developer certificate with the ad hoc distribution certificate in phone gap build. Very frustrating, but at least it's resolved. I did switch the beta testing here to TestFlight. I had used it a bit in the past, but the product has gotten better in the past year. Thanks!Loveridge
L
0

Another thing I had goofed on this, was I was trying to use the developer cert's private key with the distribution certificate in the .p12 file. So, that's just something else to watch out for.

Loveridge answered 17/1, 2013 at 16:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.