Why won't manually built iPadOS .app install? - ios

Rewriting and resubmitting this question after quite a bit of investigation and testing. I did not make the fact that we're trying to avoid Xcode prominent in the original question. I hope there is someone out there with knowledge of building iOS apps without Xcode.
I am only using Xcode to test. We build our one common app for MacOS (our pkg installs fine), Windows, Android, Linux etc with one simple build system. We have no need to break one build out just to use Xcode, unless there is absolutely no choice. We didn't need Xcode for our MacOS app/pkg.
I built, packaged and signed the iOS app with codesign manually using my developer account. I am able to drag and drop my saxzez-client.app onto a iPad Air 2 simulator and I see it installed there. I checked my physical iPad Air 2 and see that my provisioning profile is installed there. I connected my iPad Air 2 to my Mac Mini M1 and I dragged and dropped it onto the iPad Air 2. It fails to install.
Here is the error output I'm getting right now on the iPad Air 2 console:
default 22:55:00.406095-0500 installd com.saxzez.client:7:5:1:1:Start : Install (New)
default 22:55:00.435293-0500 SpringBoard termination assertion efficacy for com.saxzez.client (app not found) changed to 3
default 22:55:00.441904-0500 installd 0x16f553000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 77: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.YRAXDM/extracted/Saxzez-Client.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
and (grabbed this later)
default 23:03:39.060054-0500 securityd trustd[116]/1#11 LF=0 copy_parent_certificates Error Domain=NSOSStatusErrorDomain Code=-34018 "Client has neither application-identifier nor keychain-access-groups entitlements" UserInfo={numberOfErrorsDeep=0, NSDescription=Client has neither application-identifier nor keychain-access-groups entitlements}
default 23:03:39.060822-0500 securityd trustd[116]/1#11 LF=0 copy_parent_certificates Error Domain=NSOSStatusErrorDomain Code=-34018 "Client has neither application-identifier nor keychain-access-groups entitlements" UserInfo={numberOfErrorsDeep=0, NSDescription=Client has neither application-identifier nor keychain-access-groups entitlements}
default 23:03:39.062453-0500 trustd cert[0]: IssuerCommonName =(path)[]> 0
default 23:03:39.063467-0500 installd Trust evaluate failure: [leaf IssuerCommonName LeafMarkerOid SubjectCommonName]
Here is the codesign command usage:
codesign -f -s "Apple Development: Bob Smith (XXXXXXXXXX) " Saxzez-Client.app
My Info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Saxzez Client</string>
<key>CFBundleIdentifier</key>
<string>com.saxzez.client</string>
<key>CFBundleVersion</key>
<string>1.0.423</string>
<key>CFBundleShortVersionString</key>
<string>1.0.423</string>
<key>CFBundleExecutable</key>
<string>Saxzez-Client</string>
<key>CFBundleIconFiles</key>
<array>
<string>our-icon</string>
</array>
<key>LSRequiresIPhoneOS</key>
<false/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
<string>metal</string>
<string>wifi</string>
</array>
<key>UIRequiresPersistentWiFi</key>
<true/>
<key>UILaunchImageFile</key>
<string>our-icon</string>
<key>CFBundleName</key>
<string>Saxzez Client</string>
</dict>
</plist>
My Saxzez-Client.app directory contains the following:
ls -R
Saxzez-Client Info.plist _CodeSignature our-icon.png embedded.mobileprovision en.lproj
./_CodeSignature:
CodeResources
./en.lproj:
InfoPlist.strings

Well, I used this tool to sign the app I built: https://dantheman827.github.io/ios-app-signer/ and my app installed perfectly! So, it has to be something to do with the codesign cert I'm using or something related. The great news is I didn't need to use Xcode :). It's late, so I'll post the actual fix uncovered by ios-app-signer tomorrow.
btw, I am building and packaging on my new Mac M1, just not using Xcode. Once I have a template for the basic .app structure, I hope to only use Xcode to testing on simulators and pushing to my iPad Air 2. Same for MacOS and Android (no Android Studio for building/packaging).
Update:
It was the entitlements.plist file that is needed by codesign. Once I got the generated entitlements.plist file from the ios-app-signer tool, I can sign from the command line, zip it up into a .ipa file and it installs perfectly on the physical iPad Air 2.

Related

Flutter. IOS signing issue. "Runner" requires a provisioning profile with the Push Notifications feature

In my flutter project I'm using Codemagic as CI/CD tool.
After adding the flavor to the app, I started getting this error on one of the flavours.
> flutter build ios --release --no-codesign --build-name=0.0.1 --build-number=33 --flavor dev
Downloading ios tools... 2.4s
Downloading ios-profile tools... 1.5s
Downloading ios-release tools... 7.3s
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building se.getgaston.app for device (ios-release)...
Running pod install... 323.3s (!)
Running Xcode build...
Xcode build done. 875.6s
Built /Users/builder/clone/build/ios/iphoneos/Runner.app.
> xcode-project build-ipa --workspace /Users/builder/clone/ios/Runner.xcworkspace --scheme dev --config Release-dev
Archive Runner.xcworkspace
Execute "xcodebuild -workspace /Users/builder/clone/ios/Runner.xcworkspace -scheme dev -config Release-dev -archivePath build/ios/xcarchive/Runner_j1t8laki.xcarchive archive COMPILER_INDEX_STORE_ENABLE=NO DEVELOPMENT_TEAM=28759WZ2NP 'CODE_SIGN_IDENTITY=iPhone Distribution'"
❌ error: "Runner" requires a provisioning profile with the Push Notifications feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'Runner' from project 'Runner')
I've checked the certificate, provision profile and app id for both working flavour and one with signing issue and didn't find any difference.
This helped me.
My command was flutter build ipa --export-options-plist path/to/export.plist --build-number=123 --release --flavor=prod --dart-define=FLAVOR=prod
Sample export.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>compileBitcode</key>
<true/>
<key>method</key>
<string>enterprise</string>
<key>provisioningProfiles</key>
<dict>
<key>com.company.appname</key>
<string>provisioningProfiles name </string>
</dict>
<key>signingCertificate</key>
<string>iOS Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>xxxxxx</string>
<key>thinning</key>
<string><none></string>
</dict>
</plist>
For us, this was solved by adding a "Info.plist File" setting directly to all build schemes.
Before the change, the Info.plist was inherited from the Runner project:
To fix it, double-click on the top-level "Runner/info.plist":
Delete the text, and press return. This should clear the value for all projects.
Then, double-click in the same place, re-enter the same Runner/info.plist value again, and press return.
This should then update all the schemes to have the setting, rather than inheriting it.
The result should look like this:
This was caused by Codemagic's xcode-project use-profiles command. It expects each scheme to specify the Info.plist location, and doesn't parse inherited values.

unable to read property list from file, Info.plist issue when I use Mapbox sdk in my app

im facing an issue in one of my flutter apps. Im was using MapBox-SDK plugin but when I tested the app on IOS, it asked me to update my Mapbox-sdk to some version (which I did using pop install command). Now after everything, I am facing new errors in my info.plist file. I forgot to take a backup of my old info.plist file.
Anyways, the new info.plist is:
<plist version="1.0">
<dict>
<string>YES</string>
<key>io.flutter.embedded_views_preview</key>
<true/>
<key>MGLMapboxAccessToken</key>
<string>Mapbox-key-not-visible</string>
<true/>
<key>NSLocationWhenInUseUsageDescription</key>
<key>NSLocationAlwaysUsageDescription</key>
<key>NSPhotoLibraryUsageDescription</key>
<key>NSCameraUsageDescription</key>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to location when open.</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>project1</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist
the error im facing while building up the app is:
ERROR:
Users/apple/flutter-practice/Project-Casky/casky/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 10 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
Xcode build done. 24.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: unable to read property list from file: /Users/apple/flutter-practice/Project- Casky/casky/ios/Runner/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 1.) (in target 'Runner' from project 'Runner')
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Exited (sigterm)
GUYS I can't find a solution to this. Kindly help me in anyway possible. Thanks in advance.
The error error: unable to read property list from file: Info.plist is usually caused by missing config on the plist file. As previously mentioned in the comments, you need to have a value set on NSLocationWhenInUseUsageDescription. More details are explained in the package's docs.
<key>NSLocationWhenInUseUsageDescription</key>
<string>[Your explanation here]</string>
In my case, it was because the Info.plist file was poorly formatted. It hasn't to do with XML format, because when I tried to find if that file was correctly formatted according to XML rules, it was ok, but when I tried to open the .plist file as a property list, I realized Xcode couldn't read it, so I added my keys using the property list utility, not the "code view".
I have been facing the same problem with a newly imported Flutter project. After some debugging, it seems like the issue was caused by a corrupt GoogleService-Info.plist file! Dunno why and how it was corrupted, because I have newly imported and existing project.
To solve this problem, you can follow those steps;
Open your project in XCode
delete the existing GoogleService-Info.plist file
download the original one from Firebase
then reimport/re-copy this file into your project
When this is done, run flutter clean then try running it in iOS Simulator
This worked for me, hope it solves your problem too.
I solved this issue by including <string/> after each <key>...</key> like this :
<key>NSPhotoLibraryUsageDescription</key>
<string />
<key>NSCameraUsageDescription</key>
<string />
<key>NSMicrophoneUsageDescription</key>
<string />

After upgrading to xcode 9, cordova app won't build, error 70, requires provisioning profile

Yesterday we upgraded from xcode 8.3.2 to version 9. And now our enterprise distribution apache cordova ios app refuses to build.
2017-09-21 07:37:16.787 xcodebuild[70400:217569] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/wj/yj3cfvh954gbc_btlhcrcx7nk7t4dj/T/App Name_2017-09-21_07-37-16.786.xcdistributionlogs'.
2017-09-21 07:37:16.938 xcodebuild[70400:217569] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7ff756bbdf70>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=IDEProvisioningErrorDomain Code=9 \"\"App Name.app\" requires a provisioning profile.\" UserInfo={NSLocalizedDescription=\"App Name.app\" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the \"provisioningProfiles\" dictionary in your Export Options property list.}"
)}
error: exportArchive: "App Name.app" requires a provisioning profile.
Error Domain=IDEProvisioningErrorDomain Code=9 ""App Name.app" requires a provisioning profile." UserInfo={NSLocalizedDescription="App Name.app" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}
** EXPORT FAILED **
Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,App Name.xcarchive,-exportOptionsPlist,/Users/Shared/Workspace/github/AppName/platforms/ios/exportOptions.plist,-exportPath,/Users/Shared/Workspace/github/AppName/platforms/ios/build/device
(I replaced the apps name with "App Name" for this question)
I have verified that all the certs and provisioning profiles are set in xcode. And the build.json is set. I'm not really a Mac guy and I'm stumped on what to do next.
-Edit, Downgrading xcode to 8.3.3 fixed the problem. Not an ideal solution but not much I can do.
If you specify your provisioning profile explicitly, like me. Like this in your Cordova build.json:
"ios": {
"debug": {
"codeSignIdentitiy": "iPhone Developer",
"developmentTeam":"MYTEAMID",
"packageType": "developer",
"iCloudContainerEnvironment": "Development"
},
"release": {
"codeSignIdentitiy": "iPhone Distribution",
"developmentTeam":"MYTEAMID",
"provisioningProfile": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"packageType": "ad-hoc",
"iCloudContainerEnvironment": "Production"
}
}
Please Note
iCloudContainerEnvironment = Production/Development is only required if you use push notifications
You need to explicitly set manual signing and provide the provisioning keys in your ExportOptions.plist that is generated by Cordova. Unfortunately Cordova is not currently generating all of the required keys.
Here is what it needs to look like, at least for me:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>compileBitcode</key>
<false/>
<key>method</key>
<string>ad-hoc</string>
<key>iCloudContainerEnvironment</key >
<string>Production</string>
<key>provisioningProfiles</key>
<dict>
<key>my.bundle.idenifier</key>
<string>My Provisioning Profile Name</string>
</dict>
<key>signingCertificate</key>
<string>iPhone Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>YOURTEAMID</string>
<key>thinning</key>
<string><none></string>
</dict>
</plist>
The file Cordova generates # cordova/app/platforms/ios/exportOptions.plist looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>compileBitcode</key>
<false/>
<key>method</key>
<string>development</string>
<key>teamID</key>
<string>MYTEAMID</string>
</dict>
</plist>
notice it is missing the important bits that Xcode 9 requires.
I generated the correct file by archiving the build manually, then exporting it which also creates the exportOptions.plist that I now use as reference.
After digging deeper, I found that this cannot be fixed after running "Cordova add platform iOS", because it is generated during the build phase dynamically. I decided to fork the Cordova-ios repo and submit a pull request. You may use my fork directly, or wait until the pull request is merged.
Pull Request
https://github.com/apache/cordova-ios/pull/338/commits
Fork
https://github.com/jrryhrtn/cordova-ios
Usage notes from pull request
See example below, please note that the provisioning profile can be the name or UUID of the profile. Name is preferred for maintenence, as UUID changes each time to regenerate the profile.
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"developmentTeam":"YOURTEAMID",
"provisioningProfile": "provisioning profile name or UUID",
"packageType": "development"
},
"release": {
"codeSignIdentity": "iPhone Distribution",
"developmentTeam":"YOURTEAMID",
"provisioningProfile": "provisioning profile name or UUID",
"packageType": "ad-hoc"
}
}
}
I plan to manually patch until the/a fix is merged into the next Cordova release. You will have to regenerate your iOS platform after the patch via "Cordova platform rm iOS" and then "Cordova platform add ~/forks/cordova-ios". ~/forks/cordova-ios my local path, use the path on your local machine where you downloaded the forked Cordova-ios repo.
Update
cordova-ios 4.5.2 has been officially released! Upgrade by running the following commands: "cordova platform rm ios", and then "cordova platform add ios#4.5.2"
Cheers!
While help is coming and you don't want to use Xcode directly (and I don't judge you 😉)... here is a temporary solution which worked fine for me:
remove ios
cordova platform rm ios
add ios from dev brunch where this issue already fixed.
(Later you will be able to use ios v4.6.0 or whatever final # is going to be)
cordova platform add https://github.com/apache/cordova-ios.git
I hope it will help you too! 🙂
For who land of the following error
error: exportArchive: exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}, but no value was provided
All you need to do it this to create a build
ionic cordova build ios --prod --release -- --iCloudContainerEnvironment=Production
More info:
https://medium.com/#michele.patrassi/https-medium-com-michele-patrassi-add-icloud-icloudcontainerenvironment-to-your-ionic-ios-app-227300bf8896

error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.)

I am building iOS project on command line using xcodebuild. Building with Release configuration is ok which created and App.xcarchive. Then I am trying to export archive for App Store IPA using,
xcodebuild -exportArchive -archivePath App.xcarchive -exportPath ~/output/ -exportOptionsPlist appstore.plist
My appstore.plist,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>teamID</key>
<string>T3AM1D</string>
<key>method</key>
<string>app-store</string>
</dict>
</plist
This gives me error,
error: exportArchive: The operation couldn’t be completed.(IDEDistributionErrorDomain error 3.)
Any help will be appreciated.
Finally I was able to solve this issue.
Solution Steps
Make sure all profiles and certificates are setup successfully in Mac
Make sure no red mark is shown from Xcode, For example Xcode->targets->Build settings ->Profiles and signing identity + team
Make sure that all targets including MainApp, Widgets, Extensions are also configures without issue
Make sure that all capabilities, appgroup and keychains are OK
Important: Make sure that from Xcode -> Product -> Archive -> export to App Store IPA ran at least one time
When running xcodebuild from command line, make sure that Xcode is closed
Hope this helps

Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with a Distribution

I'm trying to push an iOS application to iTunes Connect, but I get this error when I try to validate it in Xcode:
Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate
I've seen loads of questions related to the same issue, but those didn't work for me. I follow every single step of Apple's Technical Note TN2250. I check that in the build settings a distribution profile is selected for release (have tried with the wildcard and a custom one for the app) and the schema is the correct one. To ensure the app was signed with that profile, I use the codesign -d -vvvv MyApp.app command, and get something like:
Executable=/Users/myuser/Library/Developer/Xcode/Archives/2012-09-17/myapp 17-09-12 09.27.xcarchive/Products/Applications/MyApp.app/MyApp
Identifier=com.example.MyApp
...
Authority=iPhone Distribution: My Company
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
...
I check the entitlements, which I haven't modified, with security cms -D -i MyApp.app/embedded.mobileprovision, getting this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ApplicationIdentifierPrefix</key>
<array>
<string>PR3F1X</string>
</array>
<key>CreationDate</key>
<date>2012-09-17T07:20:35Z</date>
<key>DeveloperCertificates</key>
<array>
<data>
...
</data>
</array>
<key>Entitlements</key>
<dict>
<key>application-identifier</key>
<string>PR3F1X.com.example.MyApp</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
<string>PR3F1X.*</string>
</array>
</dict>
<key>ExpirationDate</key>
<date>2013-09-16T07:20:35Z</date>
<key>Name</key>
<string>PROFILE NAME</string>
<key>TeamIdentifier</key>
<array>
<string>PR3F1X</string>
</array>
<key>TimeToLive</key>
<integer>364</integer>
<key>UUID</key>
<string>...</string>
<key>Version</key>
<integer>1</integer>
</dict>
</plist>
The bundle id of this app looks like com.example.MyApp, and I thought the upper cases could be the problem, but changed them and it didn't do. After that, I revoked my certificates, got fresh mobileprovision profiles and went through the whole process again, with no success.
The software I'm using is Xcode 4.3.2 with Mac OS X 10.7.4
I can't see where the problem is, I'm missing something.
EDIT 1:
Does modifying the bundle ID requires I change some other setting manually?
EDIT 2:
I just made a sample app from scratch, signed it with the same certificates and everything goes smooth, so it seems that the problem is in the configuration. I'm trying to see the differences between those two project's settings, but the only remarkable ones would be that the first one is iPad only and it uses a couple of PhoneGap plugins.
I had the same problem.
You had to check your Application's Signature, see How do I check the entitlements on my Application's Signature with following:
codesign -d --entitlements - /path/to/MyGreatApp.app
It's OK and I don't know what the error you have, if you get something like:
Executable=/path/to/MyGreatApp.app/MyGreatApp
??qq?<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>ABC123DE45.com.appleseedinc.mygreatapp</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
<string>ABC123DE45.com.appleseedinc.mygreatapp</string>
</array>
</dict>
</plist>
But If you get only:
Executable=/path/to/MyGreatApp.app/MyGreatApp
Then, it's a problem. Probably, you damaged the entitlements during the code resigning with codesign tool.
I've made next steps to fix it:
Archive any app in Xcode.
Choose 'Distribute ...'->'Save for Enterprise Ad-Hoc Deployment' as AppName.ipa
Unzip AppName.ipa
Create Application's Signature entitlements file:
codesign -d --entitlements :enterprise.plist Payload/PathToApp.app/
Go to the folder where uploaded app located.
Create Provisioning profile entitlements file:
security cms -D -i /path/to/the.app/embedded.mobileprovision > provision_entitlements.plist
Open provision_entitlements.plist and enterprise.plist. Modify settings of enterprise.plist , it should be equal to provision_entitlements.plist->Entitlements property. Save the changes.
When resign the app add argument --entitlements enterprise.plist to codesign tool.
codesign -fs "iPhone Distribution: My Company" APP_DIRECTORY --entitlements enterprise.plist

Resources