bamlab / fastlane-plugin-cordova

Integrate your Cordova build into your Fastlane setup
MIT License
115 stars 39 forks source link

Disabling ModernBuildSystem automatically for iOS ? #41

Open ptbrowne opened 6 years ago

ptbrowne commented 6 years ago

After updating XCode to version 10, I have the error:

[11:14:51]: ▸ error: archive not found at path '/Users/pbrowne/code/cozy/banks/src/targets/mobile/platforms/ios/Cozy Banks.xcarchive'
[11:14:51]: ▸ ** EXPORT FAILED **
[11:14:51]: ▸ Error: Error code 65 for command: xcodebuild with args: -exportArchive,-archivePath,Cozy Banks.xcarchive,-exportOptionsPlist,/Users/pbrowne/code/cozy/banks/src/targets/mobile/platforms/ios/exportOptions.plist,-exportPath,/Users/pbrowne/code/cozy/banks/src/targets/mobile/platforms/ios/build/device
+------------------------------------+---------------------------------------------------+
|                                      Lane Context                                      |
+------------------------------------+---------------------------------------------------+
| PLATFORM_NAME                      | ios                                               |
| LANE_NAME                          | ios deploy                                        |
| SIGH_PROFILE_TYPE                  | app-store                                         |
| MATCH_PROVISIONING_PROFILE_MAPPING | {"io.cozy.banks"=>"match AppStore io.cozy.banks"} |
+------------------------------------+---------------------------------------------------+
[11:14:51]: Exit status of command 'cordova compile ios --release --device --packageType=app-store --developmentTeam=3AKXFMV43J --provisioningProfile=82690009-5193-4c62-bf04-caead89c43de -- ' was 1 instead of 0.
Building project: /Users/pbrowne/code/cozy/banks/src/targets/mobile/platforms/ios/Cozy Banks.xcworkspace
        Configuration: Release
        Platform: device
User defaults from command line:
    IDEArchivePathOverride = /Users/pbrowne/code/cozy/banks/src/targets/mobile/platforms/ios/Cozy Banks.xcarchive

After adding the build flag, it works.

    cordova(platform: 'ios', build_flag: ['-UseModernBuildSystem=0'])

See https://stackoverflow.com/questions/52281848/cordova-build-ios-error-archive-not-found-at-path-path-to-myapp-xcarchive and https://github.com/apache/cordova-ios/issues/407.

Maybe this flag should be automatically set since cordova-ios does not support yet the new build system ?

blackholegalaxy commented 6 years ago

I think it's better to keep this manual at the moment. Since cordova ios should support the new build system in a near future.