bamlab/fastlane-plugin-cordova

Archive Failed for IOS

Closed this issue · 3 comments

Hello,

Sorry this is a last resort as I've been racking my head for hours. I'm able to archive my code through XCode but as soon as I try and use the cordova pluging it falls over. I get the following error message:

`Signing Identity: "iPhone Distribution: XXX"
Provisioning Profile: "XXXX"
(f6d04aa3-0026-4311-9f43-f486e8b4796d)

/usr/bin/codesign --force --sign 84AC4BFE0BAA833F902960E600EA1054E62A29ED --entitlements /Users/admin/Library/Developer/Xcode/DerivedData/Mobile-docjefssiebxqbdrjoaefctwkkad/Build/Intermediates.noindex/ArchiveIntermediates/IntermediateBuildFilesPath/Mobile.build/Release-iphoneos/Mobile.build/Mobile.app.xcent --timestamp=none /Users/admin/Library/Developer/Xcode/DerivedData/Mobile-docjefssiebxqbdrjoaefctwkkad/Build/Intermediates.noindex/ArchiveIntermediates/Mobile/InstallationBuildProductsLocation/Applications/Mobile.app

/Users/admin/Library/Developer/Xcode/DerivedData/Mobile-docjefssiebxqbdrjoaefctwkkad/Build/Intermediates.noindex/ArchiveIntermediates/Mobile/InstallationBuildProductsLocation/Applications/Mobile.app: errSecInternalComponent
Command /usr/bin/codesign failed with exit code 1

** ARCHIVE FAILED **

The following build commands failed:
CodeSign /Users/admin/Library/Developer/Xcode/DerivedData/Mobile-docjefssiebxqbdrjoaefctwkkad/Build/Intermediates.noindex/ArchiveIntermediates/Mobile/InstallationBuildProductsLocation/Applications/Mobile.app
(1 failure)
CordovaError: Promise rejected with non-error: 'Error code 65 for command: xcodebuild with args: -xcconfig,/Users/admin/Home/workspace/build/mobile/mobile-test/mcr-mobile-ionic3/platforms/ios/cordova/build-release.xcconfig,-workspace,Mobile.xcworkspace,-scheme,Mobile,-configuration,Release,-destination,generic/platform=iOS,-archivePath, Mobile.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/admin/Home/workspace/build/mobile/mobile-test/mcr-mobile-ionic3/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/admin/Home/workspace/build/mobile/mobile-test/mobile-ionic3/platforms/ios/build/sharedpch,-UseModernBuildSystem=0'
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at
at process._tickCallback (internal/process/next_tick.js:189:7)`

This might be unreleated to the plugin but I couldn't think of anything which might be causing this. My lane is:

lane :cordovaTest do cordova(platform: 'ios',release: true, type: 'enterprise', team_id: 'XXXXXX', build_flag: '-UseModernBuildSystem=0' ) end

Thank you in advance

Alex

Make sure to run match (or equivalent) before using cordova so the correct signing stuff is in place. Xcode might do some magic in the background that is not reflected in the xcodeproj.

Hello @janpio

I've added this to the lane but get the same error:

get_certificates( username: "XXXXX", team_id: "XXXXX" ) # invokes cert get_provisioning_profile( username: "xXXXXX", app_identifier: "XXXXXX", team_id: "XXXXX" ) # invokes sigh

Any ideas?

@alepeltier UseModernBuildSystem=0 was this maybe the problem? Or did you figure something else out?