10

I've given an ad hoc version of my app to some users. Two of them have the app die on start up while one user has no issues. I can also install the ad hoc without issue...but that is always the case for me. One user sent the info below from the Xcode Organizer Console. They didn't find any crash logs. I don't know what to make of the info below. The one thing that stands out is "Permission denied".

I place the provisioning and myapp.app files in a dropbox folder. The user then retrieves the files from the same location. I've run codesign against the .app file in the dropbox and get valid output:

codesign -vvvv myapp.app
myapp.app: valid on disk
myapp.app: satisfies its Designated Requirement

Any one have some ideas how I can figure out why the app doesn't work for this user?

Here is the Console output from one user. They couldn't find any associated crash logs:

Stats
totalMLSITDBPostProcessing=5.31s
commands=0.01
misc=0.45s
icuSort=4.41s (MLS_icu_data=0.23s, MLS_icu_sec_data=0.13, dropIdx=0.04, normalize=0.13, update_orders=1.31, tStatsICUOther1=0.02, createIndex=2.50)
Sun Dec 13 12:35:04 unknown com.apple.launchd[1] <Error>: (UIKitApplication:com.cygen.myapp[0x8cb6]) posix_spawn("/var/mobile/Applications/4B036396-3294-4E0A-BBCC-4118E72846D4/myapp.app/myapp", ...): Permission denied
Sun Dec 13 12:35:04 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.cygen.myapp[0x8cb6]) Exited with exit code: 1
Sun Dec 13 12:35:04 unknown SpringBoard[24] <Warning>: Failed to spawn myapp. Unable to obtain a task name port right for pid 179: (os/kern) failure
Sun Dec 13 12:35:04 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.cygen.myapp[0x8cb6]) Throttling respawn: Will start in 2147483647 seconds
Sun Dec 13 12:35:04 unknown SpringBoard[24] <Warning>: Application 'myapp' exited abnormally with exit status 1
Sun Dec 13 12:35:10 unknown springboardservicesrelay[155] <Warning>: Unable to parse property list data of length: 0
Sun Dec 13 12:35:13 unknown com.apple.launchd[1] <Error>: (UIKitApplication:com.cygen.myapp[0x3ce5]) posix_spawn("/var/mobile/Applications/4B036396-3294-4E0A-BBCC-4118E72846D4/myapp.app/myapp", ...): Permission denied
Sun Dec 13 12:35:13 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.cygen.myapp[0x3ce5]) Exited with exit code: 1
Sun Dec 13 12:35:13 unknown SpringBoard[24] <Warning>: Failed to spawn myapp. Unable to obtain a task name port right for pid 182: (os/kern) failure
Sun Dec 13 12:35:13 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.cygen.myapp[0x3ce5]) Throttling respawn: Will start in 2147483647 seconds
Sun Dec 13 12:35:13 unknown SpringBoard[24] <Warning>: Application 'myapp' exited abnormally with exit status 1
user230949
  • 1,109
  • 2
  • 16
  • 22

7 Answers7

7

Ad-hoc distribution is notoriously tricky. If you've missed one thing, the whole chain fails. Here's what I can think of, off the top of my head, based on the fact that it works for at least one of your users:

  1. Are you certain that the mobile ad-hoc provisioning certificate contains the UDID for the users who are seeing it fail?
  2. Do those users have an old certificate on their device? (i.e. did you delete the existing certificate before installing a new one? Settings->General->Profiles)
  3. Are you certain the code-signed .app bundle contains the UDIDs for those users, inside the file named embedded.mobileprovisioning? (Under the ProvisionedDevices key)
  4. Is the mobile provisioning certificate expired?
  5. Is your developer code-sign certificate expired?
  6. Was the application package renamed by the user before installation?
  7. Did you try doing a clean before doing the distribution build?
Shaggy Frog
  • 27,575
  • 16
  • 91
  • 128
  • Thanks. Those are nice suggestions. I didn't know about #3. I did see one user's UDID was not there in the .app file but was in the stand alone provisioning file. I will have them try again and then work with the other user. Can the user just drop the updated .app file into iTunes or do they also need the provisioning file, which hasn't changed. I'm guessing if you update the provisioning file, they need both but if you only update the .app, they don't need to drop in the provisioning file again. – user230949 Dec 14 '09 at 06:30
  • 1
    Yes, every user to whom you want to give an ad-hoc build must have a ad-hoc mobile provisioning certificate as well, with the build being signed with the same cert. There's no way around that. But you are correct, once the user has the cert and has told you they can run a build, you only need to send them updated builds in the future (but again, as long as those builds were made with the same cert). – Shaggy Frog Dec 14 '09 at 07:00
  • The one user reported back they are having the exact same experience. They sent an updated console output and I see the same permission denied error. I can't keep pinging the user this way for obvious reason. Do you have any ideas how I can repro this on my device? I could then solve it. – user230949 Dec 15 '09 at 01:56
  • By definition, you can't guarantee any test will correctly reproduce this on a different device, since this problem is device-specific. In my experience, any time an app quits right after launch is either from a crash at startup or from some problem with certs/signing/etc. Since this app runs properly on other devices, I would exhaust the latter set of possibilities first before moving on to any others. – Shaggy Frog Dec 15 '09 at 02:00
  • Thanks. But I'm not sure what else to try. There UDID is in the .app, provisioning file and the build is for ad hoc. On my end, what else can I do? I'll try to get the user to delete profiles on their phone. – user230949 Dec 15 '09 at 04:39
  • The only other thing I can think of is that you should ask them to delete the app, whenever you give them a new build. Do it from the device (tap and hold on the app icon until they all start shaking and get (X)s, then hit the (X) to delete the app). – Shaggy Frog Dec 15 '09 at 04:48
  • Yes - they did that and deleted profiles on the phone. Now they get this error in iTunes: signer is not valid. I really have no idea since I can't test it. I should get the exact same thing on my end right...if I've also deleted the app and profiles from my iPhone. – user230949 Dec 15 '09 at 22:58
  • Signer is not valid. Hmm. Are you *sure* your developer certificate hasn't expired? Double check in the iTunes Developer Portal. – Shaggy Frog Dec 15 '09 at 23:15
  • I checked my adhoc and developer certs. They don't expire until 2010. That's from the portal and keychain. – user230949 Dec 16 '09 at 03:51
  • You need more information. Here's a way to gather some. Create a new "Hello World" project from scratch -- new app ID, new app name. Generate a new ad-hoc cert for this new project. Then make a distribution build for your client. – Shaggy Frog Dec 16 '09 at 04:01
1

The key word I think you have used is the word 'dropbox'. I've just spent the last 2 weeks trying to work out my app would not work on other machines and I have worked out that is because I have been distributing the app via DropBox with out zipping it.

Try putting the app in a zip file before uploading to DropBox. Instruct the users to download the zip file, unzip it and install the app.

My guess is that DropBox is stuffing up some of the files in the app package.

1

Yep, we had the same issue with DropBox... zip the file first.

Tony
  • 11
  • 1
1

Dropbox for me as well, zipped and it worked fine.

depicus
  • 301
  • 4
  • 19
1

Ensure the executable has the same name in the updated version. I found if these don't match up, I get the exact same error messages as the asker. This is defined in the info.plist.

My team was trying to simulate the user upgrading an old version of our app to a new one. The new version was very different and we'd created a whole new project with new target and everything. Unfortunately this changed the executable name. Changing this back to the original made the upgrade work perfectly.

Dan Carter
  • 587
  • 5
  • 8
0

Try using the iPhone Configuration Utility, a free download from Apple. I had the same problem, uninstalled and installed using the iPCU and now it works perfectly.

It's somewhat unintuitive to use, try googling for provisioning profile iCPU. I found detailed instructions on a "redfin's developper blog".

0

Sun Dec 13 12:35:04 unknown SpringBoard[24] : Failed to spawn myapp. Unable to obtain a task name port right for pid 179: (os/kern) failure

I've been fighting this for some time, and in my case it was a result of our build system using a different zip routine which did not respect OSX's resource forks. I don't know much about them, but in short they are an HFS construct for storing extra metadata about a file/dir which is hidden from most tools. Compressing with finder seems to work, as well as ditto. More info here: http://xahlee.org/UnixResource_dir/macosx.html

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Matt S.
  • 1,129
  • 2
  • 10
  • 14