[英]Using --dart-define with Xcode archive and distribute
When building an appbundle for android I am able to use --dart-define with the flutter build appbundle
shell command to define env variables for this bundle.在为 android 构建 appbundle 时,我可以使用 --dart-define 和
flutter build appbundle
shell 命令来定义此捆绑包的环境变量。 How can I do that with Xcode workflow of Archive and Distribute?如何使用存档和分发的 Xcode 工作流程做到这一点?
You can generate the.ipa with this command flutter build ipa --dart-define="HomCaepf=true" --export-options-plist=ios/fastlane/ExportOptions.plist
您可以使用此命令生成.ipa
flutter build ipa --dart-define="HomCaepf=true" --export-options-plist=ios/fastlane/ExportOptions.plist
And the ExportOptions.plist is something like that而 ExportOptions.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>destination</key>
<string>export</string>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
<key>your.app.id</key>
<string>Provisioning Profile Name</string>
</dict>
<key>signingCertificate</key>
<string>Apple Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>stripSwiftSymbols</key>
<true/>
<key>teamID</key>
<string>YOU_TEAM_ID</string>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.