3

I work for a big company, and I'm developing an iOS app for iOS 5+. The only way the app will be distributed will be through ad-hoc deployment.

I have had my own server for some time, hosted by o2switch (french hoster). As I started the development, we used it to deploy the app for beta testing purposes. It was working pretty well.

As the app entered its final phase, the company bought the same (in fact, they only have a single one) plan at o2switch (as it was working fine on my server). The "new" server works fine, we have the files required by the iOS app on it and we access them correctly.

My problem is that when I deploy over to the company's server, the install keeps crashing ! The bar below the app's icon is empty, the almost full (in no time), and I get an error saying the app could not be installed. (classic)

I have the so-well-known crash log :

unknown itunesstored[1657] <Notice>: MS:Notice: Installing: com.apple.itunesstored [itunesstored] (690.10)
unknown wifid[23] <Error>: WiFi:[375199765.346102]: Client itunesstored is background application
unknown securityd[1659] <Notice>: MS:Notice: Installing: (null) [securityd] (690.10)

unknown SpringBoard[62] <Warning>: could not save thumbnail for downloading icon: image=(null) path='/var/mobile/Library/SpringBoard/DownloadingIconImageCache/***********'
unknown sandboxd[1661] <Notice>: MS:Notice: Installing: (null) [sandboxd] (690.10)
unknown installd[1663] <Notice>: MS:Notice: Installing: (null) [installd] (690.10)
unknown SpringBoard[62] <Warning>: could not save thumbnail for downloading icon: image=(null) path='/var/mobile/Library/SpringBoard/DownloadingIconImageCache/***********'

unknown keybagd[1665] <Notice>: MS:Notice: Installing: (null) [keybagd] (690.10)

unknown securityd[1667] <Notice>: MS:Notice: Installing: (null) [securityd] (690.10)

unknown SpringBoard[62] <Warning>: Killing *********** for app installation
unknown installd[1663] <Error>: 2ffc1000 extract_package: Could not extract archive
unknown installd[1663] <Error>: 2ffc1000 stage_package: Could not extract /var/tmp/install_staging.I0rwBH/foo.zip to /var/tmp/install_staging.I0rwBH/foo_extracted
unknown com.apple.itunesstored[1657] <Notice>: MobileInstallationInstall: failed with -1
unknown installd[1663] <Error>: 2ffc1000 MobileInstallationInstall: Could not stage the package
unknown installd[1663] <Error>: 2ffc1000 handle_install: API failed
unknown installd[1663] <Error>: 2ffc1000 send_message: failed to send mach message of 71 bytes: 10000003
unknown installd[1663] <Error>: 2ffc1000 send_error: Could not send error response to client

I've tried a lot to get rid of this error, but nothing seemed to work. I've read every single answer on SO talking about this issue, and tried everything I could. I re-downloaded the profiles, updated the build number, checked the ipa's url, and so many other things.. Nothing worked.

I had to deliver the app quickly, so I tried one last thing : put it on my server. And it worked perfectly. First try, and with no problem (maybe one, the bar did not load progressively but stayed grey then filled in blue very quick, but that's not a problem, I know it downloaded the online version). Then I re-tried uploading to the new server, same problem.

BTW, I tested with: iPhone4/iOS5, iPhone4S/iOS6, iPhone5/iOS6, iPad3/iOS6 and a couple other devices, over 3G (3 different providers) and Wifi, same problem every single time.

So, my question is the following :

Does / how can the server impact the ad-hoc deployment ?

I can give information on the server's config if required. Please tell me what info you need.

O2switch is investigating, but they don't know much about iOS ad-hoc deployment, so they don't really know where to look, what service the install calls, etc.

So I'm turning (once again) to you, SO's community ! Any ideas ?

rdurand
  • 7,342
  • 3
  • 39
  • 72
  • I assume you're using over the air distribution? Check you gave all the files (the plist and the ipa) right permissions (compare them with the ones in your personal server) – Alejandro Benito-Santos Nov 21 '12 at 15:33
  • Thanks for the answer. I guess I'm using OTA (not really sure what this applies to exactly), I "build & archive" in Xcode, "save for enterprise or ad-hoc distribution" select my ad-hoc distribution profile, and "save for enterprise distribution", giving me a plist and an ipa. On both servers, permissions are set to 644, so I guess it's not coming from here. I'm temporarily setting them to 777, I'll try and let you know. Thanks again. – rdurand Nov 21 '12 at 15:52
  • By OTA I meant you're installing the binary using a link in the following format: `itms-services://?action=download-manifest*` – Alejandro Benito-Santos Nov 21 '12 at 15:58
  • Yes, that's the way I do it. – rdurand Nov 21 '12 at 16:01
  • try if you can reach the manifest with http directly: type the http address into Safari on the phone, and see if it is downloaded. Do the same with all http-addresses mentioned in the manifest (in my case: the .ipa and the two icons) – fishinear Nov 30 '12 at 13:18
  • I can reach every single file via http in safari mobile: the manifest is shown on screen, and the ipa can be opened in Dropbox (only app able to handle this file on my iPhone). – rdurand Nov 30 '12 at 13:48

3 Answers3

2

Check the mime-type configuration in the web-server. You need:

application/xml for the .plist file, and

application/octet-stream for the .ipa file.

Martin
  • 5,392
  • 30
  • 39
  • Hi ! Thanks for the answer, but they both already appear on the mime-type configuration.. – rdurand Nov 26 '12 at 10:27
  • I'll accept your answer, as the problem seems to have vanished, after I manually added those mime types, even though *application/xml* and *application/octet-stream* already appeared on the list.. No idea what happened here.. – rdurand Dec 26 '12 at 10:52
2

Did you edit the App.plist file before you moved it to the new server?

The assets url must be absolute, like this: <string>http://someurl.com/App-1.0.0.ipa</string>.

tBX
  • 174
  • 1
  • 10
2

If you are absolutely sure that server returns proper mime types, checked by:

lynx -mime_header http://www.serveraddress/App.plist | head -10

If you are sure that you don't have spaces or new lines in link to your .plist file in your html file.
If you are sure that you have added devices to provisioning profile
And if you have read: http://www.informit.com/articles/article.aspx?p=1829415&seqNum=16
I have all files: .plist, .html, .ipa in the same folder

Then I don't know what is the issue and would suggest you to distribute it from your working server.

MichK
  • 3,202
  • 3
  • 29
  • 33
  • Yes, yes, yes, yes (not really useful, I already know how to distribute OTA..), yes.. I can't distribute through my server, what if someone else takes my work on ? And I can't give the users a "non-company" address to get the app.. – rdurand Dec 03 '12 at 08:42