Last active
April 22, 2020 07:29
-
-
Save ampersanda/05e0e572a08ea39ff1d5bea19ae66b9c to your computer and use it in GitHub Desktop.
Flutter Release configuraton for ios
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Flutter | |
import GoogleMaps | |
@UIApplicationMain | |
@objc class AppDelegate: FlutterAppDelegate { | |
override func application( | |
_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? | |
) -> Bool { | |
// Add GoogleMapsAPIKey to reference MAPS_API_KEY in Info.plist | |
GMSServices.provideAPIKey(infoForKey("GoogleMapsAPIKey")!) | |
GeneratedPluginRegistrant.register(with: self) | |
return super.application(application, didFinishLaunchingWithOptions: launchOptions) | |
} | |
func infoForKey(_ key: String) -> String? { | |
return (Bundle.main.infoDictionary?[key] as? String) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ios/Flutter | |
APP_NAME = Debug App Name | |
#include "DebugMaps.xcconfig" | |
FLUTTER_TARGET_BUILD_MAIN = ${FLUTTER_APPLICATION_PATH}/lib/main_staging.dart | |
PRODUCT_BUNDLE_IDENTIFIER_BUILD = com.example.staging | |
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | |
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is inside root project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is inside root project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ios/Flutter | |
APP_NAME = Release App Name | |
#include "ReleaseMaps.xcconfig" | |
FLUTTER_TARGET_BUILD_MAIN = ${FLUTTER_APPLICATION_PATH}/lib/main_production.dart | |
PRODUCT_BUNDLE_IDENTIFIER_BUILD = com.example | |
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | |
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copy and rename correspond GoogleService-Info.plist to real path | |
cp GoogleService-Info-production.plist GoogleService-Info.plist | |
mv GoogleService-Info.plist ios/Runner/GoogleService-Info.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copy and rename correspond GoogleService-Info.plist to real path | |
cp GoogleService-Info-staging.plist GoogleService-Info.plist | |
mv GoogleService-Info.plist ios/Runner/GoogleService-Info.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment