Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distributing Swift iOS applications ad-hoc

I have two empty iOS single view apps compiled to IPA through Xcode 6 beta 2. One is Objective-C, second one is Swift. Both of them have exactly the same code signing settings. When distributing ad hoc with test flight or hockey, Objective-C version installs without a problem. Swift one errors out with 'Unable to download the app the moment'.

I ran iPhone Configuration Utility logs on it and this is what I get :

Jun 24 17:36:27  installd[3555] <Notice>: 0x2c1000 handle_install_for_ls: Install of "/var/mobile/Media/Downloads/-6680582027007079892/1462391056366119034" requested by itunesstored
Jun 24 17:36:29  installd[3555] <Notice>: 0x2c1000 MobileInstallationInstall_Server: Installing app com.MyApp.sTest
Jun 24 17:36:29  installd[3555] <Error>: 0x2c1000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.HEsTZS/foo_extracted/Payload/sTest.app/sTest: 0xe8008017
Jun 24 17:36:29  installd[3555] <Error>: 0x2c1000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.HEsTZS/foo_extracted/Payload/sTest.app
Jun 24 17:36:29  itunesstored[94] <Error>: 0x1ef7000 MobileInstallationInstallForLaunchServices: failed with -1
Jun 24 17:36:29  itunesstored[94] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Jun 24 17:36:29  lsd[3554] <Warning>: LaunchServices: installation failed for app com.MyApp.sTest
Jun 24 17:36:29  itunesstored[94] <Warning>: LaunchServices: installPhaseFinishedForProgress: com.MyApp.sTest.Installing - <NSProgress: phase=Installing; state=Failed; fractionCompleted=0.000000> called, removing progress from cache
Jun 24 17:36:30  installd[3555] <Error>: 0x2c1000 install_application: Could not preflight application install
Jun 24 17:36:30  installd[3555] <Error>: 0x2c1000 handle_install_for_ls: API failed
Jun 24 17:36:31  lsd[3554] <Warning>: LaunchServices: installation ended for app com.MyApp.sTest

Anybody has an idea what I might be doing wrong?

Thanks

like image 206
Paweł Avatar asked Jun 24 '14 17:06

Paweł


People also ask

How do I distribute iOS app ad hoc?

In the sidebar, click Profiles. Then, next to the heading Profiles, click the + button to create a new provisioning profile. Under Distribution, select Ad Hoc. Click Continue.

What is Adhoc distribution?

Ad hoc distribution means great things for proprietary apps for teams, classrooms, and large organizations. Sure, a 100-client limit might be a little small, and it remains to be seen how clients will be certified (that is, if you have to connect to the Mothership).

How do you distribute iOS apps?

You can useTestFlight to distribute iOS, tvOS, and watchOS beta builds to testers and collect feedback. If you want to distribute your app to registered devices, to beta testers using TestFlight, or through the App Store, you need to join the Apple Developer Program.

What is adhoc profile in iOS?

Ad-hoc Profile: A distribution profile for distributing an app to devices registered in the developer account.


1 Answers

I found a solution. This seems to be a known issue (17283374) with Xcode 6 beta.

https://devforums.apple.com/message/984530#984530

Fix that worked for me is to unpack and re-pack the ipa, stripping the extended attributes that are causing problems:

ditto -xk /path/to/file.ipa /tmp/my_extract_path
ditto -ck --norsrc /tmp/my_extract_path /path/to/new_file.ipa
rm -r /tmp/my_extract_path
like image 163
Paweł Avatar answered Oct 24 '22 10:10

Paweł