Development build get the following error during export, it shows that archive succeeded. Also the app store distribution build passes. I used the cert tool to generate all certs for this.
The full build log is here:
Build log
Here is the messages that look like the cause of the failure:
** ARCHIVE SUCCEEDED **
Executing: echo /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -exportArchive -archivePath rvgame.xcarchive -exportPath /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build4175955742863989776xxx/result -exportOptionsPlist /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/export4912377426492049316.plist -verbose PROVISIONING_PROFILE=4b697edf-96fe-4b7a-ae88-07eaa148026f CODE_SIGN_IDENTITY=iPhone Developer: samuel lotti (V8JNGG63WU) KEYCHAIN=/Users/administrator/Library/Keychains/temp1513260206451.keychain CODE_SIGN_ENTITLEMENTS=/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/Entitlements4983206492678257794.plist /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -exportArchive -archivePath rvgame.xcarchive -exportPath /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build4175955742863989776xxx/result -exportOptionsPlist /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/export4912377426492049316.plist -verbose PROVISIONING_PROFILE=4b697edf-96fe-4b7a-ae88-07eaa148026f CODE_SIGN_IDENTITY=iPhone Developer: samuel lotti (V8JNGG63WU) KEYCHAIN=/Users/administrator/Library/Keychains/temp1513260206451.keychain CODE_SIGN_ENTITLEMENTS=/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/Entitlements4983206492678257794.plist
Executing: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -exportArchive -archivePath rvgame.xcarchive -exportPath /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/build4175955742863989776xxx/result -exportOptionsPlist /var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/export4912377426492049316.plist -verbose PROVISIONING_PROFILE=4b697edf-96fe-4b7a-ae88-07eaa148026f CODE_SIGN_IDENTITY=iPhone Developer: samuel lotti (V8JNGG63WU) KEYCHAIN=/Users/administrator/Library/Keychains/temp1513260206451.keychain CODE_SIGN_ENTITLEMENTS=/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/Entitlements4983206492678257794.plist 2017-12-14 08:05:38.785 xcodebuild[42364:31715511] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/p_/xlvwhg4101z8r81_nl13cds80000gn/T/rvgame_2017-12-14_08-05-38.784.xcdistributionlogs'.
2017-12-14 08:05:38.825 xcodebuild[42364:31715511] [MT] DeveloperPortal: Using pre-existing current store at URL (file:///Users/administrator/Library/Developer/Xcode/DeveloperPortal%207.3.1.db).
2017-12-14 08:05:59.053 xcodebuild[42364:31715511] [MT] IDEDistribution: Step failed: : Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.
Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
** EXPORT FAILED **
Not sure how to fix this.
This was a problem with new Xcode requirements on static libraries. The Admob and Flurry static libs were compiled with an older version of Xcode which didn't include LC_VERSION_MIN_IPHONEOS run commands, and ipatool now crashes if it encounters a library that doesn't include this.
I have updated both the Admob and the Flurry cn1libs to use Cocoapods instead of the static library directly, and this will fix the issue. These will be available in Codename One Settings after the next server update (this week). If you need them before then, you can download and install the cn1libs directly:
https://github.com/codenameone/CodenameOneLibs/raw/master/cn1libs/CN1Flurry.cn1lib
https://github.com/codenameone/CodenameOneLibs/raw/master/cn1libs/AdmobFullScreen.cn1lib
I have also made some changes on the build server to add a more descriptive error message when it detects this scenario. That will also be updated in the next build server update.
Related
I am trying to create an IPA file using below command on Jenkin
xcodebuild -exportArchive -archivePath export/MySampleApp.xcarchive -exportPath export/ -exportOptionsPlist export/export_options.plist
But it gives me error
+ xcodebuild -exportArchive -archivePath export/MySampleApp.xcarchive -exportPath export/ -exportOptionsPlist export/export_options.plist
2018-06-19 19:16:07.324 xcodebuild[81214:2060182] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/y5/1qdx7j6j2tdb1j6g3vvg_xww0000gn/T/MySampleApp_2018-06-19_19-16-07.323.xcdistributionlogs'.
2018-06-19 19:17:20.872 xcodebuild[81214:2060182] [MT] IDEDistribution: Step failed: <IDEDistributionPackagingStep: 0x7ff2b080be50>: Error Domain=IDEDistributionPipelineErrorDomain Code=0 "Code signing "libswiftCore.dylib" failed." UserInfo={NSLocalizedDescription=Code signing "libswiftCore.dylib" failed., NSLocalizedRecoverySuggestion=View distribution logs for more information.}
error: exportArchive: Code signing "libswiftCore.dylib" failed.
Error Domain=IDEDistributionPipelineErrorDomain Code=0 "Code signing "libswiftCore.dylib" failed." UserInfo={NSLocalizedDescription=Code signing "libswiftCore.dylib" failed., NSLocalizedRecoverySuggestion=View distribution logs for more information.}
** EXPORT FAILED **
I was able to create an archive file using below command
xcodebuild -scheme "MySampleApp" -sdk iphoneos -target MySampleApp -destination "generic/platform=iOS" -archivePath export/MySampleApp.xcarchive archive DEVELOPMENT_TEAM="QPG8EMUULT" PROVISIONING_PROFILE="efb8da47-3b87-4880-82e8-4967167bb2d3" CODE_SIGNING_REQUIRED=NO
Can anyone please let me know what could be the issue ?
Keychain was locked on Jenkin server thats why it was not able to code sign.
Unlocked it with below command before xcodebuild command
security unlock-keychain -p yourPassword
Now its working good.
I met the problem when :
xcodebuild archive using Xcode 10
xcode-select to Xcode 9
try to run xcodebuild -exportArchive
so I xcode-select to Xcode 10 and problem solved
I am trying to continuous integrate for an Enterprise IOS Build for AdhocProd. Using below command for Build and Archive .
Build Command:
/usr/bin/xcodebuild -workspace "Project.xcworkspace" -scheme
"ProjectiOSPROD" -archivePath build/ProjectiOS -configuration Release
archive CODE_SIGN_STYLE=Manual
PROVISIONING_PROFILE=”CompanyNameProdAdhocDistribution”
CODE_SIGNING_IDENTITY="iPhone Developer: Build Machine(XXXXXX)"
PRODUCT_BUNDLE_IDENTIFIER="com.Companyname.prod.ProjectiOS"
OUTPUT:
** ARCHIVE SUCCEEDED **
Export Command:
/usr/bin/xcodebuild -exportArchive -archivePath "build/ProjectiOS.xcarchive" -exportPath "build/ProjectiOS.ipa" -exportOptionsPlist"../../ExportOptions.plist"
This Plist is ExportOptions.Plist taken from the xcode IDE. and using it for jenkins work space
Output:
error: exportArchive: SDWebImage.framework does not support provisioning profiles.
Error Domain=IDEProvisioningErrorDomain Code=10 "SDWebImage.framework does not support provisioning profiles." UserInfo={NSLocalizedDescription=SDWebImage.framework does not support provisioning profiles., NSLocalizedRecoverySuggestion=SDWebImage.framework does not support provisioning profiles, but provisioning profile CompanyNameProdAdhocDistribution has been manually specified. Remove this item from the "provisioningProfiles" dictionary in your Export Options property list.}
error: exportArchive: Stripe.framework does not support provisioning profiles.
Error Domain=IDEProvisioningErrorDomain Code=10 "Stripe.framework does not support provisioning profiles." UserInfo={NSLocalizedDescription=Stripe.framework does not support provisioning profiles., NSLocalizedRecoverySuggestion=Stripe.framework does not support provisioning profiles, but provisioning profile CompanyNameProdAdhocDistribution has been manually specified. Remove this item from the "provisioningProfiles" dictionary in your Export Options property list.}
provisioningProfiles dictionary is already present in Property list. If i removed this it says add this to Property list.
Any Suggestions would be greatly Appreciated.
You have to generate and export the IPA manually with Xcode9.2. This will create a file name ExportOptions.plist in the exported folder.
Copy that file to workspace root folder.
Write below command in Execute shell.
xcodebuild -exportArchive -archivePath ${WORKSPACE}/build/YourProject.xcarchive -exportPath ${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_NUMBER}/archive -exportOptionsPlist ${WORKSPACE}/ExportOptions.plist
The ARCHIVE Process is always successful, but not the EXPORT process.
Here is the thing, when the export type is development, it always success.
But when I change the export type to app-store, it went wrong.
And here is the error message.
10:01:52 ** ARCHIVE SUCCEEDED **
10:01:52
10:01:52 Cleaning up previously generated .ipa files
10:01:52 Cleaning up previously generated .dSYM.zip files
10:01:52 Packaging IPA
10:01:52 [XCodeProj] $ /usr/libexec/PlistBuddy -c "Print :ApplicationProperties:CFBundleVersion" /Users/Shared/Jenkins/Home/workspace/artopia/artopia-iOS/XCodeProj/build/Release-iphoneos/Unity-iPhone.xcarchive/Info.plist
10:01:52 [XCodeProj] $ /usr/libexec/PlistBuddy -c "Print :ApplicationProperties:CFBundleShortVersionString" /Users/Shared/Jenkins/Home/workspace/artopia/artopia-iOS/XCodeProj/build/Release-iphoneos/Unity-iPhone.xcarchive/Info.plist
10:01:52 Packaging Unity-iPhone.xcarchive => /Users/Shared/Jenkins/Home/workspace/artopia/artopia-iOS/artifacts/jenkins-Release-app-store-364.ipa
10:01:52 [XCodeProj] $ /usr/bin/xcodebuild -exportArchive -archivePath /Users/Shared/Jenkins/Home/workspace/artopia/artopia-iOS/XCodeProj/build/Release-iphoneos/Unity-iPhone.xcarchive -exportPath /Users/Shared/Jenkins/Home/workspace/artopia/artopia-iOS/artifacts -exportOptionsPlist /Users/Shared/Jenkins/Home/workspace/artopia/artopia-iOS/artifacts/app-store2477P575MMExport.plist
10:01:52 2018-01-09 10:01:52.598 xcodebuild[3570:174459] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/2w/320q_j1s5x10tmvq2rmwgx3c000086/T/Unity-iPhone_2018-01-09_10-01-52.597.xcdistributionlogs'.
10:01:53 2018-01-09 10:01:53.800 xcodebuild[3570:174459] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7f89ce77b200>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
10:01:53 "Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'com.pantheon.artopia' were found\" UserInfo={NSLocalizedDescription=No profiles for 'com.pantheon.artopia' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'com.pantheon.artopia'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}"
10:01:53 )}
10:01:53 error: exportArchive: No profiles for 'com.pantheon.artopia' were found
10:01:53
10:01:53 Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'com.pantheon.artopia' were found" UserInfo={NSLocalizedDescription=No profiles for 'com.pantheon.artopia' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'com.pantheon.artopia'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}
10:01:53
10:01:53 ** EXPORT FAILED **
The error message said that I don't have a proper provision profile for my app.
But I just make two app-store distribution profile for my app, one for com.pantheon.artopia, and one for wildcard.
And I actually download them and copy them to jenkins's provision profiles folder.
It also suggest to put -allowProvisioningUpdates to xcodebuild, and I actually did it.
But the bas thing is -allowProvisioningUpdates only passed to the archive step, but not to the export step.
So how could I solve this, I need your suggestions.
My jenkins settings are:
In the "General build settings" of the Xcode Plugin, just deselect step "Pack application, build and sign .ipa?", and add one "Execute Shell" step.
The shell script is simple:
/usr/bin/xcodebuild -exportArchive -archivePath "/Users/Shared/Jenkins/Home/workspace/artopia/artopia-iOS/XCodeProj/build/Debug-iphoneos/Unity-iPhone.xcarchive" -exportPath "/Users/Shared/Jenkins/Home/workspace/artopia/artopia-iOS/artifacts" -exportOptionsPlist "/Users/Shared/Jenkins/Home/workspace/artopia/artopia-iOS/exportoptions/ExportOptions-"${ExportType}".plist" -allowProvisioningUpdates
The only thing you should provide is exportoptions.plist, which you can find one in your own Xcode Export directory.
You can find more information in https://github.com/fastlane/fastlane/issues/9589
I'm trying to export an ipa file through xcodebuild but I always receive this error.
IDEDistribution: Step failed: : Error Domain=IDEDistributionErrorDomain Code=14 "No
applicable devices found." UserInfo={NSLocalizedDescription=No
applicable devices found.} error: exportArchive: No applicable devices
found.
Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices
found." UserInfo={NSLocalizedDescription=No applicable devices found.}
** EXPORT FAILED **
Any hint?
This is the shell script I'm using (run in terminal through sh export_script.sh)
xcodebuild clean -project 'MyProject.xcodeproj' -configuration Debug -scheme MyProject -alltargets
xcodebuild -project 'MyProject.xcodeproj' -scheme MyProject archive -archivePath 'MyProject.xcarchive'
xcodebuild -exportArchive -archivePath 'MyProject.xcarchive' -exportPath 'Export' -exportOptionsPlist 'Options.plist'
P.S. Point me out any error in my scripts, if present.
I'm not sure, but probably you should specify you need a build for a device.
You need to add -sdk with proper value (depends on iphoneos with version number)
The old way to do it seems to do the job.
xcodebuild -exportArchive -archivePath $XCODE_ARCHIVE -exportPath $EXPORT_PATH -exportFormat ipa -exportProvisioningProfile "$PROVISIONING_PROFILE" -configuration $CONFIGURATION
where $PROVISIONING_PROFILE is for example iOS Development. The archive is created correctly. The shell will print out a deprecation log. You can safely ignore it.
The new way, introduced with Xcode does not work (at least for me). See xcodebuild's new exportOptionsPlist flag.
If you have any hint to use the new way, please post it.
Edit
There is an open radar for it Open Radar. In addition, also Fastlane provides a fallback mechanism for this problem (see Export Failed with Xcode 7 - No applicable devices found).
In my case the issue was related to using RVM. Switching to the system Ruby solved the issue:
rvm use system
Seams like some parts of xcodebuild are relying on the system version of Ruby and don't play nice with RVM.
I have tried every available solution over here and on the internet.
I am trying to automate the iOS build process, and the clean, build and archive process succeed with these 5 warnings (errors) failing code sign validation.
warning: The CodeResources file is missing and it must be a symbolic link to _CodeSignature/CodeResources. Make certain that the bundle is on a locally-mounted volume (not a remote SMB volume), and be certain to use the Mac OS X Finder to compress it (-19062)
Unable to validate your application. - (null)
warning: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 (-19033)
Unable to validate your application. - (null)
warning: Icon specified in the Info.plist not found under the top level app wrapper: (-19007)
Unable to validate your application. - (null)
warning: iPhone/iPod Touch: Info.plist: Unable to verify icon dimensions, no icon found. Your MinimumOSVersion is below 3.2, so you must define CFBundleIconFile or provide a default Icon.png that is 57x57. (-19013)
Unable to validate your application. - (null)
warning: Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate. (-19011)
If i try to ignore the warning or use the debug config to skip validating the codesign, xcrun to package the .app to .ipa fails with following error
env SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication -v
/Users/XXXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_11_31_23.app -o
/Users/XXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_11_31_23.ipa
--sign iPhone\ Distribution
--embed/Users/XXXXXXX/source/digital_hub/cms/cms_local_repo/6072/76/XXXXXXXX_AppStore_11_07_1373971044.mobileprovision
error: Failed to read entitlements from '/var/folders/n6/8tsx1pss5v3fq3sfpz8379r0ms3b7m/T/Rm5MudWNER/Payload/Test_22_07_13_11_31_23.app'
My xcodebuild command is following as I am working with workspaces
/usr/bin/xcodebuild -verbose
-workspace /Users/XXXXX/source/digital_hub/cms/git_local_repo/11330/80/PDFReader.git/XXXXXX.xcworkspace
-scheme _DEFAULT -sdk iphoneos -configuration Release CODE_SIGN_IDENTITY="iPhone Distribution:"
PROVISIONING_PROFILE=73DE6F20-FAB9-46A2-9825-35D7DE82CD4D
CONFIGURATION_BUILD_DIR=/Users/ahsandar/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_26_29.app
OTHER_CODE_SIGN_FLAGS="--keychain /tmp/xcoder1374496105" clean
My xcrun command looks like this
/usr/bin/xcrun -log -sdk iphoneos PackageApplication -v
"/Users/XXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_26_29.app" -o
"/Users/XXXXX/source/digital_hub/cms/final/cms_repo/H1/45/ZD/0v/U9/Rr/gT/builds/Test_22_07_13_13_26_29.ipa" --sign "iPhone Distribution:"
--embed "/Users/XXXXX/source/digital_hub/cms/cms_local_repo/11330/80/XXXXXX_AppStore_11_07_1373
I am using xcoder gem to create temporary keychain to add my p12 in it. all verification on the archive are successful using the command line tools for codesign.
Looks like you have set minimus os smaller than possible in project settings, possible your icons have wrong size. Please read again your first log.
And be sure that you provide correct params to xcodebuild command.
For me clean works good with these args:
xcodebuild clean -sdk iphoneos5.1 -project '${PBXPROJ}.xcodeproj' -configuration '${MCONFIG}' -alltargets DSTROOT="${RELEASE_BUILDDIR}" PROVISIONING_PROFILE="${kPROVISONING_PROFILE}" CODE_SIGN_IDENTITY="${DEVELOPER_NAME}"
And build works good like that:
xcodebuild install -sdk iphoneos5.1 -project "${PBXPROJ}.xcodeproj" -configuration "${MCONFIG}" -target "${TARGET}" DSTROOT="${RELEASE_BUILDDIR}" PROVISIONING_PROFILE="${kPROVISONING_PROFILE}" CODE_SIGN_IDENTITY="${DEVELOPER_NAME}"
Hope it helps.