TOP(About this memo)) > 一覧(Flutter) > 環境を入れ替え可能とする
flutter run --dart-define-from-file=dart_defines/dev.json
{
"appName": "my app",
"applinks": "example.my.app",
"bundleId": "com.example.my.app",
"developmentTeam": "XXXXXXXXXX",
"provisioningProfileSpecifier": "test app profile",
}
〜〜
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleDisplayName</key>
<string>$(appName)</string>
〜〜
〜〜
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:$(applinks)</string>
</array>
〜〜
/* ... */
buildSettings = {
/* ... */
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = "$(developmentTeam)";
/* ... */
PRODUCT_BUNDLE_IDENTIFIER = "$(bundleId)";
/* ... */
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "$(provisioningProfileSpecifier)";
/* ... */
};
/* ... */
final appName = const String.fromEnvironment('appName');