iOS Provisioning Profile - Cannot install (developer cert trust result = 5) - ios

I recently generated a new certificate and provisioning profile and I'm unable to install (install loop) the IPA on a device.
device is registered in the provisioning profile
profile is on the device
profile is valid
profile is listed un Xcode
cert is in my keychain, all green
I'm using Hudson to build the IPA and it all worked fine until I had to updated the cert and the profile.
Console log I'm getting when installing:
Jan 10 12:12:52 Martins-iPhone SpringBoard[1790] : Killing com.wci.turntape for app installation
Jan 10 12:12:52 Martins-iPhone itunesstored[1788] : LaunchServices: installing app for existing placeholder LSApplicationProxy: com.wci.turntape (Placeholder)
Jan 10 12:12:52 Martins-iPhone itunesstored[1788] : LaunchServices: Creating installProgressForApplication:LSApplicationProxy: com.wci.turntape (Placeholder) withPhase:1
Jan 10 12:12:52 Martins-iPhone lsd[1787] : LaunchServices: Updating installPhase for parent to 1
Jan 10 12:12:52 Martins-iPhone installd[62] : 0x303000 handle_install_for_ls: Install of "/var/mobile/Media/Downloads/-3941318386609200153/2973774017215790161" requested by itunesstored
Jan 10 12:12:55 Martins-iPhone installd[62] : 0x303000 MobileInstallationInstall_Server: Installing app com.wci.turntape
Jan 10 12:12:56 Martins-iPhone installd[62] : developer cert trust result = 5
Jan 10 12:12:56 Martins-iPhone installd[62] : 0x303000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.p38MaR/foo_extracted/Payload/Turntape.app/turntape: 0xe8008018
Jan 10 12:12:56 Martins-iPhone installd[62] : 0x303000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.p38MaR/foo_extracted/Payload/Turntape.app
Jan 10 12:12:56 Martins-iPhone installd[62] : 0x303000 install_application: Could not preflight application install
Jan 10 12:12:56 Martins-iPhone itunesstored[1788] : 0x1e60000 MobileInstallationInstallForLaunchServices: failed with -1
Jan 10 12:12:56 Martins-iPhone itunesstored[1788] : ERROR: MobileInstallationInstallForLaunchServices returned nil
Jan 10 12:12:56 Martins-iPhone lsd[1787] : LaunchServices: installation failed for app com.wci.turntape
Does anything in the log ring a bell to anyone?
But all my
I found this guy with the same issue
http://community.phonegap.com/nitobi/topics/error_on_installation-p3psw
But his solution was to renew his expired certificate (which is what I did in the first place).

After spilling a lot of blood, I've found what was causing the problem...
The new certificates now have an organizational unit id (mine was YXW8YWB9K4) has a suffix to the certificate. Hudson was configured to look for the certificate without this suffix.
The problem was that we also had an Enterprise certificate and the build was getting messed up between the two certificates. With the previous certificate, there was no ambiguity because there was no suffix.
So I had to add the suffix my build parameter .
Example:
"iPhone Distribution: Company Inc"
And my certificates were:
"iPhone Distribution: Company Inc (YXW8YWB9K4)"
"iPhone Distribution: Company Inc (Ent)"
Btw for those having an Enterprise account, Apple's advice is to have a separate keychain for those certificates.

Please check once again that the IPA you are distributing is being signed with the correct profile. Make sure your new certificates are having the bundle identifier for the matching profile.

Related

iOS Installation Error: ApplicationVerificationFailed

I have spent the last 6hrs searching the web for this bugs, I have read and tried many suggested solutions and still couldn't fix my problem. So lets hope someone can point me to the right direction this time.
I am using FDT to build AIR app, I can test it using iOS Simulator, I can package it and deploy to iTuneConnect but I just can't push it to my iPhone so I can test it. I am sure that my mobileprovision is correct (I check it with XCode 5), the app id is correct, and p12 is good also.
Here is the log I get from XCode console:
Mar 9 22:27:32 202-436-0338 installd[17] <Notice>: 0x10050c000 MobileInstallationInstall_Server: Installing app com.abcd.bht
Mar 9 22:27:33 202-436-0338 installd[17] <Error>: 0x10050c000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.WPRL4j/foo_extracted/Payload/BHT.app/BHT: 0xe8008015
Mar 9 22:27:33 202-436-0338 installd[17] <Error>: 0x10050c000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.WPRL4j/foo_extracted/Payload/BHT.app
Mar 9 22:27:33 202-436-0338 installd[17] <Error>: 0x10050c000 install_application: Could not preflight application install
Mar 9 22:27:33 202-436-0338 mobile_installation_proxy[142] <Error>: 0x10050c000 MobileInstallationInstallForLaunchServices: failed with -1
Mar 9 22:27:33 202-436-0338 mobile_installation_proxy[142] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Mar 9 22:27:33 202-436-0338 mobile_installation_proxy[142] <Error>: 0x10050c000 handle_install: Installation failed: Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed. (LaunchServicesError error 0.)" UserInfo=0x12c5121d0 {Error=ApplicationVerificationFailed, ErrorDetail=-402620395}
Mar 9 22:27:33 202-436-0338 installd[17] <Error>: 0x10050c000 handle_install_for_ls: API failed
have you installed previously any application on your device with the same bundle identifier?
it may also can cause the problem.
so you can try :
delete all adHoc apps from your phone.
clean build from Xcode.
double check that if you put correct bundle id and selected correct provisioning profiles.
your device added to provisioning profile? may be you created first provisioning profile, then added device in developer portal. (Recommended that check your device again in developer portal and create again adhoc profile.)
install again

Please include the kCFBundleIdentifierKey in the options dictionary when installing an app

Anybody knows what this means?
Tried updating my app to ios 7 and tested it on iPad 2 and encountering these warning and error logs in Console:
Sep 24 16:23:56 iPad mobile_installation_proxy[118] <Warning>: LaunchServices: Please include the kCFBundleIdentifierKey in the options dictionary when installing an app.
Sep 24 16:23:56 iPad mobile_installation_proxy[118] <Warning>: LaunchServices: installing app for existing placeholder (null)
Sep 24 16:23:56 iPad installd[59] <Notice>: 0x2d5000 handle_install_for_ls: Install of "/var/mobile/Media/PublicStaging/THISAPP.app" requested by mobile_installation_proxy
Sep 24 16:23:56 iPad installd[59] <Notice>: 0x2d5000 MobileInstallationInstall_Server: Installing app com.<bundle>.<identifier>
Sep 24 16:23:56 iPad installd[59] <Error>: profile not valid: 0xe8008012
Sep 24 16:23:56 iPad installd[59] <Error>: 0x2d5000 install_embedded_profile: Could not install embedded profile: 0xe8008012
Sep 24 16:23:57 iPad installd[59] <Notice>: 0x2d5000 MobileInstallationInstall_Server: Staging: 0.08s; Waiting: 0.05s; Installation: 0.53s; LS Sync: 0.00s; Overall: 0.75s
Sep 24 16:23:57 iPad /usr/libexec/lsd[70] <Error>: Need to synchronize with MobileInstallation
Sep 24 16:23:57 iPad /usr/libexec/lsd[70] <Notice>: LaunchServices: Adding com.<bundle>.<identifier> to registration list
No Crash Logs are being recorded.
EDIT:
I have this in my info.plist
<key>CFBundleIdentifier</key>
<string>com.<bundle>.<identifier></string>
but it's basically com.site.my, I just edited the real name here.
I had the same issue, And was unable to install the ipa. It always ended with an error "Could not inspect the application package." and some warnings in device console
Feb 10 17:38:16 iPhone mobile_installation_proxy[356] <Warning>: LaunchServices: Please include the kCFBundleIdentifierKey in the options dictionary when installing an app.
Feb 10 17:38:16 iPhone mobile_installation_proxy[356] <Warning>: LaunchServices: installing app with unknown bundleID
.
.
Feb 10 17:38:16 iPhone installd[44] <Error>: 0x101bcc000 -[MIBundle _validateWithError:]: 28: Failed to load Info.plist from bundle at path
Feb 10 17:38:16 iPhone installd[44] <Error>: 0x101bcc000 + [MIInstallable installablesAtURL:packageFormat:userOptions:error:]: Failed to create bundle for …
After spending hours, I got it fixed by adding the "Application requires iPhone environment" in info.plist
<key>LSRequiresIPhoneOS</key>
<true/>
Did you check whether your bundle ID is in your plist
I had the same problem and it was because one of the pods I was using had a "Resources" directory. Fixing this pod following this advice resolved the issue.

Ad Hoc iOS .ipa file won't install for devices added to profile since iOS 7 came out

I have an iOS app that I've developing for a while. Initially there were around 8 devices in the iOS dev account, ad builds were prepared and distributed through Hockey App, no problems. Recently, we've added a bunch more devices, but for some reason the ad hoc builds won't install on those devices (but continues to install just fine on the original set).
I have been over and over the certificates, devices and provisioning profiles in the iOS Dev Center. I've triple checked all the Build Settings in XCode. The app is for iOS 6 and iOS 7 only. It is built in XCode 5. I've tried installing the app through HockeyApp and direct through iTunes.
When attempting to install the app on a device, this is the output from the console:
Sep 24 21:45:02 Micks-iPad itunesstored[88] : LaunchServices: updating placeholder for com.purifier.ios with icons
Sep 24 21:45:02 Micks-iPad installd[62] : 0x304000 handle_install_for_ls: Install of "/var/mobile/Library/Caches/com.apple.itunesstored/AppPlaceholders/3119681654421541181.app" requested by itunesstored
Sep 24 21:45:02 Micks-iPad installd[62] : 0x304000 MobileInstallationInstall_Server: Installing app com.purifier.ios
Sep 24 21:45:02 Micks-iPad installd[62] : 0x304000 install_application: Installing placeholder
Sep 24 21:45:03 Micks-iPad installd[62] : 0x304000 MobileInstallationInstall_Server: Staging: 0.01s; Waiting: 0.00s; Installation: 0.14s; LS Sync: 0.00s; Overall: 0.15s
Sep 24 21:45:06 Micks-iPad itunesstored[88] : LaunchServices: Creating installProgressForApplication:LSApplicationProxy: com.purifier.ios (Placeholder) withPhase:0
Sep 24 21:45:06 Micks-iPad lsd[74] : LaunchServices: Updating installState for parent to LSInstallStateWaiting
Sep 24 21:45:06 Micks-iPad lsd[74] : LaunchServices: Updating installPhase for parent to 0
Sep 24 21:45:19 Micks-iPad SpringBoard[33] : Killing com.purifier.ios for app installation
Sep 24 21:45:19 Micks-iPad itunesstored[88] : LaunchServices: installing app for existing placeholder LSApplicationProxy: com.purifier.ios (Placeholder)
Sep 24 21:45:19 Micks-iPad itunesstored[88] : LaunchServices: Creating installProgressForApplication:LSApplicationProxy: com.purifier.ios (Placeholder) withPhase:1
Sep 24 21:45:19 Micks-iPad lsd[74] : LaunchServices: Updating installPhase for parent to 1
Sep 24 21:45:19 Micks-iPad installd[62] : 0x304000 handle_install_for_ls: Install of "/var/mobile/Media/Downloads/3119681654421541181/-915963357124799252" requested by itunesstored
Sep 24 21:45:20 Micks-iPad installd[62] : 0x304000 MobileInstallationInstall_Server: Installing app com.purifier.ios
Sep 24 21:45:20 Micks-iPad installd[62] : profile not valid: 0xe8008012
Sep 24 21:45:20 Micks-iPad installd[62] : 0x304000 install_embedded_profile: Could not install embedded profile: 0xe8008012
Sep 24 21:45:21 Micks-iPad securityd[77] : OCSPResponse: now > latestNextUpdate
Sep 24 21:45:22 Micks-iPad installd[62] : 0x304000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.AFwPty/foo_extracted/Payload/Purifier.app/Purifier: 0xe8008015
Sep 24 21:45:22 Micks-iPad installd[62] : 0x304000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.AFwPty/foo_extracted/Payload/Purifier.app
Sep 24 21:45:22 Micks-iPad installd[62] : 0x304000 install_application: Could not preflight application install
Sep 24 21:45:22 Micks-iPad itunesstored[88] : 0x441000 MobileInstallationInstallForLaunchServices: failed with -1
Sep 24 21:45:22 Micks-iPad itunesstored[88] : ERROR: MobileInstallationInstallForLaunchServices returned nil
Sep 24 21:45:22 Micks-iPad lsd[74] : LaunchServices: installation failed for app com.purifier.ios
Sep 24 21:45:22 Micks-iPad itunesstored[88] : LaunchServices: installPhaseFinishedForProgress: com.purifier.ios.Installing - called, removing progress from cache
Sep 24 21:45:22 Micks-iPad installd[62] : 0x304000 handle_install_for_ls: API failed
Sep 24 21:45:31 Micks-iPad SpringBoard[33] : Killing com.purifier.ios for app installation
I've tried absolutely everything I can think of. Any help, even ideas about how to diagnose the problem, would be greatly appreciated.
The problem was that the UDID was wrong (thanks #neilco). The reason the UDID was wrong was because the UDID app I'm using is giving the wrong UDID as of iOS7.
I checked a bunch of other UDID apps and they're all giving the wrong UDID in iOS7. It seems that anything that starts with a bunch of FFFFFFFF... is wrong.
Back to bloody iTunes...
Here's the source of your problem:
Sep 24 21:45:20 Micks-iPad installd[62] : profile not valid: 0xe8008012
0xE8008012 is "The UUID of the device does not match any in the Provisioning Profile being loaded"
Check and double-check the UUIDs associated with the profile in the Provisioning Portal and make sure you're using the correct and current profile to sign the app. Also check you only have the current developer certs in your keychain. Remove any previous certs.
Ensure you re-download the provisioning profile after adding the new devices to it.
You need to edit the profile and tick the new devices in the list. Then re-dwonload it.
xcode open organizer -> Select devices -> in left pane select provisioning profile from the top delete your current provisioning profile.
Download updated provisioning profile from your developer account and now try to build your .ipa for new devices.
Don't forget to update provisioning in devices.
Please note that Apple has changed the UDID retrieval API due to privacy concerns. So, I don't think you may use some of those older apps to get the UDID. You can connect your device to your PC/Mac and get the UDID using iTunes (or XCODE). In iTunes, click on the Serial Number and it will change to UDID (once the phone is connected to the computer and you click the device in iTunes)
Swift 4 if you need to install it as development for testing Please Edit the Provisioning Profile or if you have no Provisioning Profile for this app then the unable to install in the device so please then create new Provisioning Profile and select all the devices and then rebuild IPA and install it simple

iOS Ad-Hoc Install fails with proper provisions made

I have done this a dozen times successfully and cannot figure out what is wrong for this instance. I created the deployment certificate, added my devices, and then created my ad-hoc profile using the deployment cert and all devices.
I have a website that allows the user to install the profile and app. The app starts to install and gets to where it is almost done and then it just sits there. It fails for all devices with different flavors of iOS on them.
Any ideas what could be wrong? This is the console output where (altered) line 3 is bugging me. I think this is the primary failure point and I am investigating further. It works fine from my desktop.
Aug 5 09:08:29 MFI-Test-iPad-Mini installd[62] <Notice>: 0x3cf000 MobileInstallationInstall_Server: Installing app com.marketforce.Auditor
Aug 5 09:08:36 MFI-Test-iPad-Mini profiled[213] <Notice>: (Note ) profiled: Service stopping.
Aug 5 09:08:37 MFI-Test-iPad-Mini securityd[78] <Notice>: http asynchttp_timer_proc Timeout during GET http://ocsp.apple.com/ocsp-wwdr01/ThisHasBeenChangedInTheInterestOfSecurity%2BThisHasAlsoBeenAlteredForSecuritym67h1P0%3D.
Aug 5 09:08:37 MFI-Test-iPad-Mini installd[62] <Error>: entitlement 'keychain-access-groups' has value not permitted by provisioning profile 'Adhoc Distribution'
Aug 5 09:08:37 MFI-Test-iPad-Mini installd[62] <Error>: 0x3cf000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.nkJObR/foo_extracted/Payload/Auditor.app/Auditor: 0xe8008016
Aug 5 09:08:37 MFI-Test-iPad-Mini installd[62] <Error>: 0x3cf000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.nkJObR/foo_extracted/Payload/Auditor.app
Aug 5 09:08:37 MFI-Test-iPad-Mini installd[62] <Error>: 0x3cf000 install_application: Could not preflight application install
Aug 5 09:08:37 MFI-Test-iPad-Mini itunesstored[89] <Error>: 0x1c3e000 MobileInstallationInstallForLaunchServices: failed with -1
Aug 5 09:08:37 MFI-Test-iPad-Mini itunesstored[89] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Aug 5 09:08:37 MFI-Test-iPad-Mini lsd[166] <Warning>: LaunchServices: installation failed for app com.marketforce.Auditor
Aug 5 09:08:37 MFI-Test-iPad-Mini itunesstored[89] <Warning>: LaunchServices: installPhaseFinishedForProgress: com.marketforce.Auditor.Installing - <NSProgress: phase=Installing; state=Failed;
When I hit ad-hoc distribution errors, I have a couple troubleshooting steps to try to narrow it down.
Can you install just the provisioning profile? You should have either a developer or a distribution profile (depending, often times I install both to be sure).
Can you install the app via the iPhone Configuration Utility?
Answering those two questions will point you in the right direction at least. Good luck!
The app was originally created under a developer's appleID and the published in the Business To Business site. The developer left the company and the company created an appleID to be used for the company's development purposes. (Which is what should have been done to begin with).
The app was then transferred to the company's ID however the transfer didn't work right as it left the AppID under the old developer account so any attempt to use certificates and profiles against either account was doomed to failure while using the original AppID. To do any sort of internal deployment, a different AppID had to be created.
After Apple finally got the app transfer fully complete, all was good and the original AppID could once again be used.

Xcode 4.5 - can't install developer .ipa files via iTunes

I had many times making a developer builds for testing purpose and everything was working fine. Was! After updating my Xcode to version 4.5 I can't install my developer builds via iTunes.
This situation is the same on every device I had in provision profile.
What I have and what I had checked double times with other developers to avoid personal mistake:
1) developer certificate
2) developer provision profile with added right devices
3) right build process
After success build of app me and other developers try to install it via iTunnes (10.7) but only error dialog appears that Synchronisation failed.
The very important info is, that I can build runnable app in xCode 4.2 and install it via iTunnes without any troubles with the same certificate and provision profiles
I can run the app directly on device if I run it via Xcode
Checked all apple's recommendation and I have all right: https://developer.apple.com/library/ios/#technotes/tn2009/tn2242.html
Checked lots of forums with similar issue and I have done many steps trying to reduce this problem starting with revoking ALL certificates, making new developers profiles with particular devices, cleaned tmp folders in Xcode together with build dir. I had delete all certificates, keys from KeyChain and import new ones. Deleted all provision profiles on device and install new one. Clean project, change a build architecture "armv", base SDK - Latest iOS 6.
Many thanks for your responce!!!
This is a part of log file from device (iPhone5 iOS 6.1)
Nov 7 23:31:04 lockdownd[29] <Notice>: 016ca000 __copy_itunes_value_block_invoke_0: com.apple.mobile.iTunes.store/PurchaseTypes -> (null)
Nov 7 23:31:09 installd[31] <Error>: 0x343000 handle_install: Install of "/var/mobile/Media/PublicStaging/denik4.ipa" requested by itunesstored
Nov 7 23:31:09 installd[31] <Error>: 0x343000 MobileInstallationInstall_Server: Installing app cz.newslab.denik
>
Nov 7 23:31:09 installd[31] <Error>: profile not valid: 0xe8008012
>
Nov 7 23:31:09 installd[31] <Error>: 0x343000 install_embedded_profile: Could not install embedded profile: 0xe8008012
>
Nov 7 23:31:09 installd[31] <Error>: Nov 7 23:31:09 SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
>
Nov 7 23:31:09 mobile_assertion_agent[94] <Notice>: service_one_connection: Connection closed for client iTunes.
>
Nov 7 23:31:10 installd[31] <Error>: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
>
Nov 7 23:31:10 installd[31] <Error>: entitlement 'aps-environment' has value not permitted by a provisioning profile
>
Nov 7 23:31:10 installd[31] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
>
Nov 7 23:31:10 installd[31] <Error>: 0x343000 verify_signer_identity: MISValidateSignatureAndCopyInfo failed for /var/tmp/install_staging.yDZPNm/foo_extracted/Payload/denik.app/denik: 0xe8008016
>
Nov 7 23:31:10 installd[31] <Error>: 0x343000 do_preflight_verification: Could not verify executable at /var/tmp/install_staging.yDZPNm/foo_extracted/Payload/denik.app
>
Nov 7 23:31:10 installd[31] <Error>: 0x343000 install_application: Could not preflight application install
>
Nov 7 23:31:10 itunesstored[66] <Error>: 0x1786000 MobileInstallationInstall: failed with -1
>
Nov 7 23:31:10 installd[31] <Error>: 0x343000 handle_install: API failed
The important line is this one:
installd[31] : profile not valid: 0xe8008012
I've seen this error myself with one of our IPAs recently. It was solved by re-issuing the profile from the iOS Provisioning portal (simply make a simple change, undo it, then submit - that should regenerate the profile), updated the Xcode code signing identity to use the new profile, rebooted the device, and then tried again. It then seemed to install fine.
We weren't able to close in on a root cause of the issue, but once we'd gone through those steps we haven't seen it again.

Resources