ionic cordova build:不能与-exportArchive一起指定-scheme标志

时间:2019-04-05 21:21:50

标签: xcode cordova ionic-framework xcodebuild

运行此命令:

  

ionic cordova build ios --buildConfig = ios-uat-build.json --automaticProvisioning --device --release

使用此构建配置:

{
   "ios": {
     "release": {
       "developmentTeam": "XXX",
       "codeSignIdentity": "iPhone Distribution",
       "packageType": "enterprise",
       "buildFlag": [
         "PRODUCT_BUNDLE_IDENTIFIER=com.yyy.xxxuat",
         "PRODUCT_NAME=Xxx UAT",
         "-exportArchive",
         "-exportPath",
         "./build/Xxx.ipa",
         "-exportOptionsPlist",
         "platforms/ios/config/UATExportOptions.plist",
         "-UseModernBuildSystem=0"
       ]
     }
   }
 }

产生此错误:

  

xcodebuild:错误:不能与-scheme标志一起指定   -exportArchive

更多上下文:

  

读取构建配置文件:构建项目:   /Users/sh4tx/Projects/Xxx/platforms/ios/Xxx.xcworkspace           配置:发布           平台:设备添加xcodebuildArg:PRODUCT_BUNDLE_IDENTIFIER = com.yyy.xxx添加xcodebuildArg:   PRODUCT_NAME = Xxx UAT添加xcodebuildArg:-exportArchive添加   xcodebuildArg:-exportPath添加xcodebuildArg:   ./build/Xxx.ipa添加xcodebuildArg:-exportOptionsPlist   添加xcodebuildArg:platform / ios / config / UATExportOptions.plist   添加xcodebuildArg:-UseModernBuildSystem = 0 xcodebuild:错误:   不能将-scheme标志与-exportArchive一起指定。

似乎在添加--release和--device时会发生这种情况,但是如果没有设备,则不会生成ipa,并且如果没有发布,js代码不会被最小化。

我计划最终根据当前时间戳将路径更改为某种路径,因此我不能简单地省略exportPath

编辑:

这是我的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>
        <false/>
        <key>method</key>
        <string>enterprise</string>
        <key>provisioningProfiles</key>
        <dict>
            <key>com.yyy.xxxuat</key>
            <string>Xxx Provisioning Profile</string>
        </dict>
        <key>signingCertificate</key>
        <string>iPhone Distribution</string>
        <key>signingStyle</key>
        <string>manual</string>
        <key>stripSwiftSymbols</key>
        <true/>
        <key>teamID</key>
        <string>XXX</string>
        <key>thinning</key>
        <string>&lt;none&gt;</string>
    </dict>
</plist>

0 个答案:

没有答案