After installing <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile - ios

I have an ipa file which I have build using xcodebuild (cmd tools), and successfully install on and can see it on my iPad. When I launch it, it just sits with a blank screen and I can see in the console(Xcode)
: entitlement 'application-identifier' has value not permitted
by a provisioning profile)
I have verified using codesign tools and all the values are correct on the ipa file,
I am using a single target to create multiple apps from different settings and assets.
I resign my app at xcrun as I have to copy the assets after the build process. to my understanding while working on this project if I had wrong values, provisioning profile or certificate combination I shouldn't have gotten an .ipa that would even get installed on the device.
What looks to be that the .ipa associate a different provisioning profile on the device than what it was build with.
I am a ruby developer so xCode and iOs development is new to me, any help would be appreciated
Jul 30 16:21:36 Mannies-Dev-iPad amfid[996] <Error>: Jul 30 16:21:36 SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Jul 30 16:21:37 Mannies-Dev-iPad amfid[996] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Jul 30 16:21:37 Mannies-Dev-iPad amfid[996] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Jul 30 16:21:37 Mannies-Dev-iPad amfid[996] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Jul 30 16:21:37 Mannies-Dev-iPad xxx[995] <Error>: objc[995]: Class WebView is implemented in both /System/Library/PrivateFrameworks/WebKit.framework/WebKit and /var/mobile/Applications/55025FD7-6F95-4D1B-A98F-766D2638C0BD/xxx.app/xxx. One of the two will be used. Which one is undefined.
Jul 30 16:21:38 Mannies-Dev-iPad kernel[0] <Debug>: launchd[995] Builtin profile: container (sandbox)
Jul 30 16:21:38 Mannies-Dev-iPad kernel[0] <Debug>: launchd[995] Container: /private/var/mobile/Applications/55025FD7-6F95-4D1B-A98F-766D2638C0BD (sandbox)
Jul 30 16:21:39 Mannies-Dev-iPad itunesstored[71] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
Jul 30 16:21:39 Mannies-Dev-iPad itunesstored[71] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
Jul 30 16:21:40 Mannies-Dev-iPad itunesstored[71] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
Jul 30 16:21:41 Mannies-Dev-iPad profiled[981] <Notice>: (Note ) profiled: Idled.
Jul 30 16:21:41 Mannies-Dev-iPad profiled[981] <Notice>: (Note ) profiled: Service stopping.

Related

Cannot distribute inhouse build with ios-charts library embedded to my project

first of all, I would like to thank you for creating this library. I have embedded it in my project (as written in the README file) by dragging it into the project, embedding it in the binaries and so on. Target iOS version is 8.0.
Everything worked great for dev version of the app, but as soon as I built the inhouse version, app crashes after initial welcome screen shows. Logs for the crash are as following:
Oct 20 15:54:15 iPhone SpringBoard[54] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Oct 20 15:54:15 iPhone SpringBoard[54] <Error>: SecTrustEvaluate [leaf IssuerCommonName SubjectCommonName]
Oct 20 15:54:15 iPhone kernel[0] <Notice>: xpcproxy[700] Container: /private/var/mobile/Containers/Data/Application/6D451583-EE0E-4F0A-9CA9-2E33F83D6138 (sandbox)
Oct 20 15:54:15 iPhone kernel[0] <Notice>: AMFI: energy_challenge(pid 700) - [deny-mmap] mapped executable file has no team identifier in its signature: /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts
Oct 20 15:54:15 iPhone com.apple.xpc.launchd[1] (UIKitApplication:com.edge5.nativeMenuEnergieInhouse[0x1f2e][700]) <Notice>: Service exited due to signal: Trace/BPT trap: 5
Oct 20 15:54:15 iPhone assertiond[63] <Warning>: Unable to obtain a task name port right for pid 700: (os/kern) failure (5)
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Unable to register for exec notifications: No such process
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Unable to obtain a task name port right for pid 700: (os/kern) failure (5)
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Unable to obtain a task name port right for <FBApplicationProcess: 0x13226dc00; com.edge5.nativeMenuEnergieInhouse; pid: 700>
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Application 'UIKitApplication:com.edge5.nativeMenuEnergieInhouse[0x1f2e]' crashed.
Oct 20 15:54:15 iPhone SpringBoard[54] <Warning>: Application '(null)' exited for an unknown reason.
Oct 20 15:54:15 iPhone ReportCrash[701] <Notice>: Formulating report for corpse[700] energy_challenge
Oct 20 15:54:15 iPhone ReportCrash[701] <Warning>: report not saved because the limit of 25 for 109_energy_challenge logs has been reached.
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Notice: This report is abbreviated for syslog inclusion because it could not be saved to disk.
Symbolication may be possible by manually cleaning up and including the Binary Image section of a full report from this same device -- good luck!
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Process: energy_challenge [700]
Path: /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/energy_challenge
OS Version: iOS 9.0.2 (13A452)
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000120095088
Triggered by Thread: 0
Oct 20 15:54:15 iPhone ReportCrash[701] <Error>: Dyld Error Message:
Dyld Message: Library not loaded: #rpath/Charts.framework/Charts
Referenced from: /var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/energy_challenge
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts'
Dyld Version: 369.12
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.241745]: Enable WoW requested by "apsd"
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.243839]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244041]: Unable to dispatch WowStateChanged message to client MobileMail (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244185]: Unable to dispatch WowStateChanged message to client softwareupdatese (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244422]: Unable to dispatch WowStateChanged message to client dataaccessd (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.244678]: Unable to dispatch WowStateChanged message to client assistantd (268435460)
Oct 20 15:54:16 iPhone wifid[39] <Error>: WiFi:[467042056.245010]: Unable to dispatch WowStateChanged message to client itunesstored (268435460)
The problem occurs here:
[deny-mmap] mapped executable file has no team identifier in its signature: /private/var/mobile/Containers/Bundle/Application/84AEA7F2-4987-4119-B3CC-A4EAFC9989DC/energy_challenge.app/Frameworks/Charts.framework/Charts
I tried creating new certificate, new inhouse build, basically went through all the stackoverflow questions regarding this or similar issue (eg. https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/) without any success. Is it possible that maybe you need to change something certificate-related on your side?
Thank you very much for any answer
I came across this post when I was searching for "[deny-mmap] mapped executable file has no team identifier in its signature" on Google.
It turned out that the old Apple WWDR Cert expired on 14 Feb 2016. If your OSX still has that expired cert in Keychain Access, your Distribution Certificate would be regarded as invalid. (A red line showing "This certificate has an invalid issuer") You could forcefully "trust" that cert in Keychain Access, but the side effect is that the signed binary would NOT have TeamIdentifier in its signature:
$ codesign -d -vv MyApp.app
Executable=/Users/admin/MyApp.app/MyApp
Identifier=info.eddywong.MyApp
Format=bundle with Mach-O universal (armv7 arm64)
CodeDirectory v=20100 size=1920 flags=0x0(none) hashes=87+5 location=embedded
Signature size=4389
Authority=iPhone Distribution: Eddy Wong Limited (KG7UETNRCJ)
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Signed Time=15 Mar 2016 23:59:38
Info.plist entries=33
TeamIdentifier=not set
Sealed Resources version=2 rules=12 files=108
So I had to follow the solution posted in https://stackoverflow.com/a/35400712 - to remove the old, expired WWDR certificate in "System" keychain.
Then, I cleaned and re-archive, then export IPA. This time it works!
The reason why "Everything worked great for dev version of the app" is that dev version of the app is signed by your own developer cert, not your organization's distribution cert. I can't figure out why developer cert is not affected by WWDR expiry, though. But I could verify that the dev signed binary does have the TeamIdentifier set, while the dist signed binary doesn't.

iOS MDM enrollment fails in iOS 9 devices

This has been previously working for iOS 7 and 8 devices but now the enrollment fails for new iOS 9 devices. This is what I see in the device logs.
Oct 26 18:00:34 iPhone profiled[412] <Notice>: (Note ) MC: Enrolling in OTA Profile service...
Oct 26 18:00:35 iPhone profiled[412] <Error>: SecTrustEvaluate [leaf AnchorTrusted]
Oct 26 18:00:38 iPhone securityd[83] <Error>: securityd_xpc_dictionary_handler profiled[412] add Error Domain=NSOSStatusErrorDomain Code=-25299 "duplicate item O,cert,159EFDE0,L,dku,com.apple.certificates,0,ctyp,cenc,labl,subj,issr,slnr,pkhh,v_Data,20151026123038.608026Z,7C914284" UserInfo={NSDescription=duplicate item O,cert,159EFDE0,L,dku,com.apple.certificates,0,ctyp,cenc,labl,subj,issr,slnr,pkhh,v_Data,20151026123038.608026Z,7C914284}
Oct 26 18:00:38 iPhone profiled[412] <Error>: SecOSStatusWith error:[-25299] Error Domain=NSOSStatusErrorDomain Code=-25299 "duplicate item O,cert,159EFDE0,L,dku,com.apple.certificates,0,ctyp,cenc,labl,subj,issr,slnr,pkhh,v_Data,20151026123038.608026Z,7C914284" UserInfo={NSDescription=duplicate item O,cert,159EFDE0,L,dku,com.apple.certificates,0,ctyp,cenc,labl,subj,issr,slnr,pkhh,v_Data,20151026123038.608026Z,7C914284}
Oct 26 18:00:38 iPhone profiled[412] <Error>: SecTrustEvaluate [leaf AnchorTrusted]
Oct 26 18:00:38 iPhone profiled[412] <Notice>: (Note ) MC: Attempting to retrieve issued certificate...
Oct 26 18:00:39 iPhone securityd[83] <Error>: SecDbRecordChange db <SecDbConnection rw open> changed outside txn
Oct 26 18:00:39 iPhone profiled[412] <Notice>: (Note ) MC: Issued certificate received.
Oct 26 18:00:39 iPhone Preferences[406] <Notice>: (Error) MC: Install profile data, interactive error. Error: NSError:
Desc : Couldn’t communicate with a helper application.
Sugg : Try your operation again. If that fails, quit and relaunch the application and try again.
Domain : NSCocoaErrorDomain
Code : 4097
Extra info:
{
NSDebugDescription = "connection to service named com.apple.managedconfiguration.profiled";
}
Oct 26 18:00:39 iPhone com.apple.xpc.launchd[1] (com.apple.managedconfiguration.profiled[412]) <Notice>: Service exited due to signal: Trace/BPT trap: 5
Oct 26 18:00:40 iPhone ReportCrash[423] <Error>: assertion failed: 13A452: libsystem_trace.dylib + 15931 [45DE3123-E22D-320F-9F75-1CCD65A33451]: 0x0
Oct 26 18:00:40 iPhone Unknown[423] <Error>:
Oct 26 18:00:40 iPhone ReportCrash[423] <Warning>: os_activity_diagnostic_for_pid() failed!
Oct 26 18:00:40 iPhone ReportCrash[423] <Notice>: Formulating report for corpse[412] profiled
assertion failed: 13A452: libsystem_trace.dylib + 15931
means that your process "profiled" overran its allocated memory and was killed via the kernel/jetsam. iOS 9 has aggressive memory management and kills processes all over the place and even reboots the device nightly.
Just answering my own question. In order to create the X509 certificate from csr you need to create relative distinguished names (RDNs) and add it to the certificate. Once you get the X500Name from PKCS10CertificationRequest and set it to X509v3CertificateBuilder it throws this error. Rather you have to create separate X500Names and proceed with the certificate generation which solved this issue.

Ad-Hoc distributed app does not installing on device

I am signing my app for the ad-Hoc distribution. I have created certificate and Provisioning profile and also checked the device UDID.
But when i first time create distribution certificate and sign the app with that certificate and appropriate Provisioning profile than app works.
But when i use same Certificate and Provisioning profile for second time app doesn't work. its displaying grey out icon on device and iTunes display installing.. in app.
I have checked my crash log and this is printed
.................
..................
Apr 7 20:17:19 Dilip-Maneks-iPad librariand[114] <Error>: ubiquity account is not configured (or is disabled for this client), not creating collection
Apr 7 20:17:19 Dilip-Maneks-iPad librariand[114] <Error>: error in _handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
Apr 7 20:17:19 Dilip-Maneks-iPad geod[94] <Warning>: Can't get bundle identifier for process 424
Apr 7 20:17:23 Dilip-Maneks-iPad mobileassetd[107] <Error>: mobileassetd - _ASAssetDeletionPriorityAtDate: Unexpected value for keys __LastAccessDate, __InstallDate
Apr 7 20:17:23 Dilip-Maneks-iPad mobileassetd[107] <Error>: mobileassetd - _ASAssetDeletionPriorityAtDate: Unexpected value for keys __LastAccessDate, __InstallDate
Apr 7 20:17:23 Dilip-Maneks-iPad medialibraryd[93] <Warning>: {MediaLibrary} [MLWriter] ending transaction <__NSConcreteUUID 0x124530320> 7B9EAD03-51E8-4DE5-AF91-ECE8BBABA5E0. shouldCommit=0.
Apr 7 20:17:23 Dilip-Maneks-iPad librariand[114] <Error>: ubiquity account is not configured (or is disabled for this client), not creating collection
Apr 7 20:17:23 Dilip-Maneks-iPad librariand[114] <Error>: error in _handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
Apr 7 20:17:23 Dilip-Maneks-iPad deleted[424] <Error>: 0x100484000 __DeleteLibrarian_block_invoke: unable to determine evictable space: The operation couldn’t be completed. (LibrarianErrorDomain error 10 - Unable to configure the collection.)
Apr 7 20:17:29 Dilip-Maneks-iPad librariand[114] <Error>: ubiquity account is not configured (or is disabled for this client), not creating collection
Apr 7 20:17:29 Dilip-Maneks-iPad librariand[114] <Error>: error in _handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
Apr 7 20:17:29 Dilip-Maneks-iPad atc[1020] <Warning>: {MediaLibrary} Database validation succeeded
Apr 7 20:17:29 Dilip-Maneks-iPad librariand[114] <Error>: ubiquity account is not configured (or is disabled for this client), not creating collection
Apr 7 20:17:29 Dilip-Maneks-iPad librariand[114] <Error>: error in _handle_client_request: LibrarianErrorDomain/10/Unable to configure the collection.
Apr 7 20:17:29 Dilip-Maneks-iPad geod[94] <Warning>: Can't get bundle identifier for process 424
I encountered something similar - in iTunes the status was stuck on "Installing..." and similarly on the phone the app had a disabled icon and would not launch.
The solution in my case was to correct the "Team" identity in Xcode (Target > General > Identity > Team) and choose a valid iOS Distribution certificate (set up at https://developer.apple.com/account/ios/certificate/certificateList.action). I had inadvertently left this setting as "None". This certificate must be the one referenced in the "Distribution" iOS Provisioning Profile that you choose after archiving, in the Organizer window of Xcode.
Only when everything matches will your ad hoc app install & launch. See the bottom of this page:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html
under the section titled "Ad Hoc Provisioning Profiles in Depth"

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.

iOS Enterprise distribution problem

It was working but after releasing another build, OTA wireless installation started not working any more.. Giving me error saying Unable to Download App.. Used the exactly same provisioning profile and did everything same.. But it's not working..
Grab the logs from phone while I was trying to install
Sep 22 12:16:51 Wills-iPhone lockdownd[17] <Error>: 2ff15000 handle_connection: Could not receive USB message #6 from iPhone Configuration Utility. Killing connection
Sep 22 12:16:52 Wills-iPhone installd[608] <Error>: entitlement 'keychain-access-groups' has value not permitted by a provisioning profile
Sep 22 12:16:52 Wills-iPhone installd[608] <Error>: entitlement 'com.apple.developer.ubiquity-container-identifiers' has value not permitted by a provisioning profile
Sep 22 12:16:52 Wills-iPhone installd[608] <Error>: entitlement 'com.apple.developer.ubiquity-kvstore-identifier' has value not permitted by a provisioning profile
Sep 22 12:16:52 Wills-iPhone installd[608] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
Sep 22 12:16:52 Wills-iPhone installd[608] <Error>: 2ffc4000 verify_signer_identity: Could not copy validate signature: -402620394
Sep 22 12:16:52 Wills-iPhone installd[608] <Error>: 2ffc4000 preflight_application_install: Could not verify executable at /var/tmp/install_staging.DCVRV3/foo_extracted/Payload/ON Test.app
Sep 22 12:16:52 Wills-iPhone installd[608] <Error>: 2ffc4000 install_application: Could not preflight application install
Sep 22 12:16:52 Wills-iPhone installd[608] <Error>: 2ffc4000 handle_install: API failed
Sep 22 12:16:52 Wills-iPhone com.apple.itunesstored[606] <Notice>: MobileInstallationInstall: failed with -1
Go to http://developer.apple.com/ios/ and make sure the certificate has not been revoke or expired on Apple's end.

Resources