I am trying to upload .ipa file to AppCenter using Jeinkins, but getting the following exception:
+ pwd
/Users/maniprasannakumar/.jenkins/workspace/IOS_Test
+ xcodebuild -exportArchive -archivePath /Users/maniprasannakumar/.jenkins/workspace/IOS_Test/builds/RemoteLync.xcarchive -exportOptionsPlist /Users/maniprasannakumar/Desktop/jenkinsarchinve/kiddeExportOptions.plist -exportPath /Users/maniprasannakumar/Desktop/jenkinsarchinve/
2022-01-03 12:09:16.138 xcodebuild[35412:1166670] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/hy/f06dhv196hx6bywh9lhm2ptr0000gn/T/RemoteLync_2022-01-03_12-09-16.136.xcdistributionlogs'.
Exported RemoteLync to: /Users/maniprasannakumar/Desktop/jenkinsarchinve
** EXPORT SUCCEEDED **
ERROR: Build step failed with exception
io.jenkins.plugins.appcenter.AppCenterException: No file found matching pattern: '/Users/maniprasannakumar/Desktop/jenkinsarchinve/RemoteLync.ipa'
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
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
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.
I want to make build scripts for my app to export xcarchive and ipa files.
I used following command to export xcarchive:
xcodebuild -scheme myscheme archive -archivePath path/appname.xcarchive
Which gave me an xcarchive file and I used following to export IPA file:
xcodebuild -exportArchive -exportFormat IPA -exportProvisioningProfile *** -archivePath path/appname.xcarchive -exportPath path/appname.ipa
And I got following error regardless of what I typed in front of exportProvisioningProfile.
no provisioning profile matches ***
** EXPORT FAILED **
What should I write insted of *** in front of exportProvisioningProfile?
The name of the provisioning profile. This is the same name as seen on the page (https://developer.apple.com/account/ios/profile/profileList.action). If you have spaces in that name you need to write the name with quotes. E.g.
xcodebuild -exportArchive -exportFormat IPA -archivePath
MyMobileApp.xcarchive -exportPath MyMobileApp.ipa
-exportProvisioningProfile 'MyMobileApp Distribution Profile'
It may also be that you have not downloaded the provisioning profile, try re-downloading it and opening it with Xcode to install it in the correct location.
I am trying to create ipa of my application using terminal.
I am able to successfully build my application, but when converting into an ipa, it throws the following error:
Check dependencies
Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “/Users/xxxx/Downloads/Certificate/xxxx.mobileprovision”, however, no such provisioning profile was found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'
** ARCHIVE FAILED **
When I try to build the same application using X-Code, it works fine with the same provisioning profile.
The script I am running to build the ipa is
xcodebuild -verbose -project Build_Project_From_Terminal.xcodeproj -scheme nameOfProject -configuration Release -sdk iphoneos clean archive CONFIGURATION_BUILD_DIR="/Users/xxxx/Desktop/xxxx/Project Name/build" PROVISIONING_PROFILE="/Users/xxxxx/Downloads/Certificate/xxxxx.mobileprovision"
EDIT 1:
I have changed my script to
DEVELOPER_NAME="xxxxxxxxx" APP_NAME="xxxxxx"
xcodebuild archive -project $APP_NAME.xcodeproj -scheme $APP_NAME -archivePath ./$APP_NAME.xcarchive
xcodebuild -exportArchive -exportFormat APP -archivePath ./$APP_NAME.xcarchive -exportPath ./$APP_NAME.ipa
iphoneos PackageApplication -v ./$APP_NAME.app -o ./$APP_NAME.ipa --sign $DEVELOPER_NAME --embed ./*.mobileprovision
With this I am getting $APP_NAME.ipa.app as output. When I try to install this, it does not install at all.
Any help will be appreciated.
Please use an alternate method. This is a working example
DEVELOPER_NAME="Your apple developer name"
APP_NAME="application name"
xcodebuild archive -workspace $APP_NAME.xcworkspace -scheme $APP_NAME -archivePath ./$APP_NAME.xcarchive
xcodebuild -exportArchive -exportFormat APP -archivePath ./$APP_NAME.xcarchive -exportPath ./$APP_NAME.ipa
iphoneos PackageApplication -v ./$APP_NAME.app -o ./$APP_NAME.ipa --sign $DEVELOPER_NAME --embed ./*.mobileprovision
Save above shell script in a file (abc.sh) and save that file in your project folder along with your provision profile. Run this script using terminal will save ipa in the project directory.