1
votes

I am trying to launch an iOS project with an Enterprise account. First thing first, the project is running just fine when I run it from xcode. When I download the ipa archive(I created) from the server it appears to open the app on the screen for less than a second and then immediately closes it.

I have tried various provisioning profiles:

Development -> iOS App Development

Distribution -> In House

Distribution -> Ad Hoc

And combined the above with all the possible ways of archiving the project:

-> Ad Hoc Deployment

-> Enterprise Deployment

-> Development Deployment

Only when I archive the ipa for development it works on my phone, as it is registered as development device for this provisioning profile, but not other phones.

Am I missing something out? Is there a setting in Xcode I should change for an enterprise launch?

UPDATE: device logs says:

Dyld Error Message: Dyld Message: Library not loaded: @rpath/ResearchKit.framework/ResearchKit Referenced from: /var/containers/Bundle/Application/6DBB2C29-B1AE-4AE0-AEFB-ABF4081467A5/Beck Chestionar.app/Beck Chestionar Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/6DBB2C29-B1AE-4AE0-AEFB-ABF4081467A5/Beck Chestionar.app/Frameworks/ResearchKit.framework/ResearchKit: mmap() errno=1 validating first page of '/private/var/containers/Bundle/Application/6DBB2C29-B1AE-4AE0-AEFB-ABF4081467A5/Beck Chestionar.app/Frameworks/ResearchKit.framework/ResearchKit' Dyld Version: 390.7

Binary Images: 0x100004000 - 0x100017fff Beck Chestionar arm64 /var/containers/Bundle/Application/6DBB2C29-B1AE-4AE0-AEFB-ABF4081467A5/Beck Chestionar.app/Beck Chestionar 0x120050000 - 0x12007ffff dyld arm64 /usr/lib/dyld

2
do you try to upload IPA in DIAWI.COM with adhoc or distribution provisional profile?Nitin Gohel
I tried with AdHoc(from Distribution) and also all of the rest.asheyla
i said how do you try to insatll app? do you try diawi.comNitin Gohel
I am using a server form my workplace.asheyla
@asheyla what does console in XCode-Organizer log? You might want to check it to see if the app is crashing or if there is a PP problem.Vin

2 Answers

0
votes

You should make sure to select the proper certificate for distribution (in your case that would be the enterprise certificate) and for the provision profile, use "Automatic":

enter image description here

Once you will set the correct info, you will be able to export an ipa and install it on any device. If app still crash after installing it, then get device logs and post it here so I will be able to tell you what to do next.

0
votes

You need to include ResearchKit in Embed Frameworks area under your Build Phases settings in the project (I believe it is listed as Copy Files in older versions of Xcode):

Example of build settings with another framework

Make sure you have done this or the compiled binary being delivered to the device will not have the necessary framework files.

If you have that in your project, it could be a trust issue. See this for information to diagnose and/or fix. Basically, look at the "Check the Signature For a Failure Root Cause" section in this Apple document.

The link above tells you do to this:

codesign --verify -vvvv -R='anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)' /path/to/the.app

If you get CSSMERR_TP_NOT_TRUSTED as a result of that command, look here.

Step 3) was what got it to work for me. Good luck!