From 1f60b0ba57a36b84e5af36c9d06b8dae606c8fff Mon Sep 17 00:00:00 2001 From: Maurice McCabe Date: Wed, 17 Jul 2019 22:14:32 -0700 Subject: [PATCH 1/6] Added support for flavors #55 --- bin/main.dart | 9 ++++++--- lib/src/globals.dart | 5 ++++- lib/src/run.dart | 39 +++++++++++++++++++++++++++++---------- 3 files changed, 39 insertions(+), 14 deletions(-) diff --git a/bin/main.dart b/bin/main.dart index 3641324c..06603fbd 100644 --- a/bin/main.dart +++ b/bin/main.dart @@ -5,7 +5,7 @@ import 'package:screenshots/screenshots.dart'; import 'package:path/path.dart' as path; const usage = - 'usage: screenshots [-h] [-c ] [-m ]'; + 'usage: screenshots [-h] [-c ] [-m ] [-f ]'; const sampleUsage = 'sample usage: screenshots'; void main(List arguments) async { @@ -13,6 +13,7 @@ void main(List arguments) async { final configArg = 'config'; final modeArg = 'mode'; + final flavorArg = 'flavor'; final helpArg = 'help'; final ArgParser argParser = ArgParser(allowTrailingOptions: false) ..addOption(configArg, @@ -24,9 +25,11 @@ void main(List arguments) async { abbr: 'm', defaultsTo: 'normal', help: - 'If mode is recording, screenshots will be saved for later comparison. \nIf mode is archive, screenshots will be archived and cannot be uploaded via fastlane.', + 'If mode is recording, screenshots will be saved for later comparison. \nIf mode is comparison, screenshots will be compared with recorded.\nIf mode is archive, screenshots will be archived (and cannot be uploaded via fastlane).', allowed: ['normal', 'recording', 'comparison', 'archive'], valueHelp: 'normal|recording|comparison|archive') + ..addOption(flavorArg, + abbr: 'f', help: 'Flavor name.', valueHelp: 'flavor name') ..addFlag(helpArg, abbr: 'h', help: 'Display this help information.', negatable: false); try { @@ -79,7 +82,7 @@ void main(List arguments) async { _handleError(argParser, "File not found: ${argResults[configArg]}"); } - await run(argResults[configArg], argResults[modeArg]); + await run(argResults[configArg], argResults[modeArg], argResults[flavorArg]); } void _handleError(ArgParser argParser, String msg) { diff --git a/lib/src/globals.dart b/lib/src/globals.dart index fef42534..46f06730 100644 --- a/lib/src/globals.dart +++ b/lib/src/globals.dart @@ -18,5 +18,8 @@ enum DeviceType { android, ios } /// Run mode enum RunMode { normal, recording, comparison, archive } -// singleton +/// singleton ImageMagick get im => ImageMagick(); + +/// No flavor +const String kNoFlavor = 'no flavor'; diff --git a/lib/src/run.dart b/lib/src/run.dart index 1f7acc2b..8f670451 100644 --- a/lib/src/run.dart +++ b/lib/src/run.dart @@ -24,7 +24,9 @@ import 'utils.dart' as utils; /// 4. Move processed screenshots to fastlane destination for upload to stores. /// 5. If not a real device, stop emulator/simulator. Future run( - [String configPath = kConfigFileName, String _runMode = 'normal']) async { + [String configPath = kConfigFileName, + String _runMode = 'normal', + String flavor = kNoFlavor]) async { final runMode = utils.getRunModeEnum(_runMode); final screens = Screens(); @@ -59,8 +61,8 @@ Future run( } // run integration tests in each real device (or emulator/simulator) for // each locale and process screenshots - await runTestsOnAll( - daemonClient, devices, emulators, config, screens, runMode, archive); + await runTestsOnAll(daemonClient, devices, emulators, config, screens, + runMode, archive, flavor); // shutdown daemon await daemonClient.stop; @@ -90,8 +92,15 @@ Future run( /// /// Assumes the integration tests capture the screen shots into a known directory using /// provided [capture_screen.screenshot()]. -Future runTestsOnAll(DaemonClient daemonClient, List devices, List emulators, - Config config, Screens screens, RunMode runMode, Archive archive) async { +Future runTestsOnAll( + DaemonClient daemonClient, + List devices, + List emulators, + Config config, + Screens screens, + RunMode runMode, + Archive archive, + String flavor) async { final configInfo = config.configInfo; final locales = configInfo['locales']; final stagingDir = configInfo['staging']; @@ -177,7 +186,8 @@ Future runTestsOnAll(DaemonClient daemonClient, List devices, List emulators, imageProcessor, runMode, archive, - 'unknown'); + 'unknown', + flavor); } else { // Function to check for a running android device or emulator bool isRunningAndroidDeviceOrEmulator(Map device, Map emulator) { @@ -282,7 +292,8 @@ Future runTestsOnAll(DaemonClient daemonClient, List devices, List emulators, imageProcessor, runMode, archive, - deviceOrientation); + deviceOrientation, + flavor); } // if an emulator was started, revert locale if necessary and shut it down @@ -310,14 +321,22 @@ Future runProcessTests( ImageProcessor imageProcessor, RunMode runMode, Archive archive, - String orientation) async { + String orientation, + String flavor) async { // store env for later use by tests // ignore: invalid_use_of_visible_for_testing_member await config.storeEnv(screens, configDeviceName, locale, utils.getStringFromEnum(deviceType), orientation); for (final testPath in testPaths) { - print('Running $testPath on \'$configDeviceName\' in locale $locale...'); - await utils.streamCmd('flutter', ['-d', deviceId, 'drive', testPath]); + if (flavor != kNoFlavor) { + print( + 'Running $testPath on \'$configDeviceName\' in locale $locale with flavor $flavor ...'); + await utils.streamCmd('flutter', + ['-d', deviceId, 'drive', '-t', testPath, '--flavor', flavor]); + } else { + print('Running $testPath on \'$configDeviceName\' in locale $locale...'); + await utils.streamCmd('flutter', ['-d', deviceId, 'drive', testPath]); + } // process screenshots await imageProcessor.process( deviceType, configDeviceName, locale, runMode, archive); From 0767c8b27dd47eceee13c1ee86125ef9cb8f20d4 Mon Sep 17 00:00:00 2001 From: Maurice McCabe Date: Wed, 17 Jul 2019 22:23:44 -0700 Subject: [PATCH 2/6] Fixed handling of flavor arg --- lib/src/run.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/run.dart b/lib/src/run.dart index 8f670451..86ef66fe 100644 --- a/lib/src/run.dart +++ b/lib/src/run.dart @@ -328,7 +328,7 @@ Future runProcessTests( await config.storeEnv(screens, configDeviceName, locale, utils.getStringFromEnum(deviceType), orientation); for (final testPath in testPaths) { - if (flavor != kNoFlavor) { + if (flavor != null && flavor != kNoFlavor) { print( 'Running $testPath on \'$configDeviceName\' in locale $locale with flavor $flavor ...'); await utils.streamCmd('flutter', From ae768613339b622b865745188fa62da389a7c609 Mon Sep 17 00:00:00 2001 From: Maurice McCabe Date: Thu, 18 Jul 2019 14:39:16 -0700 Subject: [PATCH 3/6] Added flavor param --- test/daemon_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/daemon_test.dart b/test/daemon_test.dart index bcb4691e..00fed103 100644 --- a/test/daemon_test.dart +++ b/test/daemon_test.dart @@ -206,7 +206,7 @@ main() { Directory.current = 'example'; await run.runTestsOnAll(daemonClient, devices, emulators, config, screens, - RunMode.normal, null); + RunMode.normal, null, kNoFlavor); // allow other tests to continue Directory.current = origDir; }, timeout: Timeout(Duration(minutes: 4))); From 88d8d10e995a512224a3ef605c1bdf274143fdb4 Mon Sep 17 00:00:00 2001 From: Maurice McCabe Date: Mon, 22 Jul 2019 20:04:49 -0700 Subject: [PATCH 4/6] Added delay after booting simulator to avoid simulator race condition --- lib/src/run.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/run.dart b/lib/src/run.dart index 86ef66fe..1d45619f 100644 --- a/lib/src/run.dart +++ b/lib/src/run.dart @@ -346,11 +346,13 @@ Future runProcessTests( Future shutdownSimulator(String deviceId) async { cmd('xcrun', ['simctl', 'shutdown', deviceId]); // shutdown apparently needs time when restarting + // see https://github.com/flutter/flutter/issues/10228 for race condition on simulator await Future.delayed(Duration(milliseconds: 2000)); } Future startSimulator(DaemonClient daemonClient, String deviceId) async { cmd('xcrun', ['simctl', 'boot', deviceId]); + await Future.delayed(Duration(milliseconds: 2000)); await waitForEmulatorToStart(daemonClient, deviceId); } From 0f392050175f7a0448397cc60a8f312175ce3ae7 Mon Sep 17 00:00:00 2001 From: Maurice McCabe Date: Mon, 22 Jul 2019 20:20:53 -0700 Subject: [PATCH 5/6] Added flavor example app and test #55 --- flavors/.gitignore | 71 +++ flavors/README.md | 3 + flavors/android/app/build.gradle | 63 ++ .../android/app/src/main/AndroidManifest.xml | 21 + .../com/yourcompany/flavors/MainActivity.java | 22 + flavors/android/build.gradle | 29 + flavors/android/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 6 + flavors/android/settings.gradle | 15 + flavors/ios/Flutter/AppFrameworkInfo.plist | 26 + flavors/ios/Flutter/Debug.xcconfig | 1 + flavors/ios/Flutter/Release.xcconfig | 1 + flavors/ios/Runner.xcodeproj/project.pbxproj | 555 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Free.xcscheme | 91 +++ .../xcshareddata/xcschemes/Paid.xcscheme | 91 +++ .../contents.xcworkspacedata | 7 + flavors/ios/Runner/AppDelegate.h | 6 + flavors/ios/Runner/AppDelegate.m | 19 + .../AppIcon.appiconset/Contents.json | 98 ++++ .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 5 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 ++ flavors/ios/Runner/Base.lproj/Main.storyboard | 26 + flavors/ios/Runner/Info.plist | 47 ++ flavors/ios/Runner/main.m | 9 + flavors/lib/main.dart | 37 ++ flavors/pubspec.yaml | 73 +++ flavors/screenshots.yaml | 22 + flavors/test_driver/main.dart | 8 + flavors/test_driver/main_test.dart | 26 + test/screenshots_test.dart | 12 + 36 files changed, 1466 insertions(+) create mode 100644 flavors/.gitignore create mode 100644 flavors/README.md create mode 100644 flavors/android/app/build.gradle create mode 100644 flavors/android/app/src/main/AndroidManifest.xml create mode 100644 flavors/android/app/src/main/java/com/yourcompany/flavors/MainActivity.java create mode 100644 flavors/android/build.gradle create mode 100644 flavors/android/gradle.properties create mode 100644 flavors/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 flavors/android/settings.gradle create mode 100644 flavors/ios/Flutter/AppFrameworkInfo.plist create mode 100644 flavors/ios/Flutter/Debug.xcconfig create mode 100644 flavors/ios/Flutter/Release.xcconfig create mode 100644 flavors/ios/Runner.xcodeproj/project.pbxproj create mode 100644 flavors/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 flavors/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 flavors/ios/Runner.xcodeproj/xcshareddata/xcschemes/Free.xcscheme create mode 100644 flavors/ios/Runner.xcodeproj/xcshareddata/xcschemes/Paid.xcscheme create mode 100644 flavors/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 flavors/ios/Runner/AppDelegate.h create mode 100644 flavors/ios/Runner/AppDelegate.m create mode 100644 flavors/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100644 flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100644 flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100644 flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100644 flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100644 flavors/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 flavors/ios/Runner/Base.lproj/Main.storyboard create mode 100644 flavors/ios/Runner/Info.plist create mode 100644 flavors/ios/Runner/main.m create mode 100644 flavors/lib/main.dart create mode 100644 flavors/pubspec.yaml create mode 100644 flavors/screenshots.yaml create mode 100644 flavors/test_driver/main.dart create mode 100644 flavors/test_driver/main_test.dart diff --git a/flavors/.gitignore b/flavors/.gitignore new file mode 100644 index 00000000..47e0b4d6 --- /dev/null +++ b/flavors/.gitignore @@ -0,0 +1,71 @@ +# Miscellaneous +*.class +*.lock +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# Visual Studio Code related +.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.packages +.pub-cache/ +.pub/ +build/ + +# Android related +**/android/**/gradle-wrapper.jar +**/android/.gradle +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/flavors/README.md b/flavors/README.md new file mode 100644 index 00000000..e4afcd41 --- /dev/null +++ b/flavors/README.md @@ -0,0 +1,3 @@ +# flavors + +Integration test of build flavors (Android product flavors, Xcode schemes). diff --git a/flavors/android/app/build.gradle b/flavors/android/app/build.gradle new file mode 100644 index 00000000..3898dfc0 --- /dev/null +++ b/flavors/android/app/build.gradle @@ -0,0 +1,63 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withInputStream { stream -> + localProperties.load(stream) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +apply plugin: 'com.android.application' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 28 + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + applicationId "com.yourcompany.flavors" + minSdkVersion 16 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + signingConfig signingConfigs.debug + } + } + + aaptOptions { + // TODO(goderbauer): remove when https://github.com/flutter/flutter/issues/8986 is resolved. + if(System.getenv("FLUTTER_CI_WIN")) { + println "AAPT cruncher disabled when running on Win CI." + cruncherEnabled false + } + } + + flavorDimensions "mode" + + productFlavors { + free {} + paid {} + } +} + +flutter { + source '../..' +} + +dependencies { + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' +} diff --git a/flavors/android/app/src/main/AndroidManifest.xml b/flavors/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..5cf4229c --- /dev/null +++ b/flavors/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + diff --git a/flavors/android/app/src/main/java/com/yourcompany/flavors/MainActivity.java b/flavors/android/app/src/main/java/com/yourcompany/flavors/MainActivity.java new file mode 100644 index 00000000..f306ca9a --- /dev/null +++ b/flavors/android/app/src/main/java/com/yourcompany/flavors/MainActivity.java @@ -0,0 +1,22 @@ +package com.yourcompany.flavors; + +import android.os.Bundle; + +import io.flutter.app.FlutterActivity; +import io.flutter.plugin.common.MethodCall; +import io.flutter.plugin.common.MethodChannel; +import io.flutter.plugins.GeneratedPluginRegistrant; + +public class MainActivity extends FlutterActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + GeneratedPluginRegistrant.registerWith(this); + new MethodChannel(getFlutterView(), "flavor").setMethodCallHandler(new MethodChannel.MethodCallHandler() { + @Override + public void onMethodCall(MethodCall methodCall, MethodChannel.Result result) { + result.success(BuildConfig.FLAVOR); + } + }); + } +} diff --git a/flavors/android/build.gradle b/flavors/android/build.gradle new file mode 100644 index 00000000..bb8a3038 --- /dev/null +++ b/flavors/android/build.gradle @@ -0,0 +1,29 @@ +buildscript { + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.2.1' + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/flavors/android/gradle.properties b/flavors/android/gradle.properties new file mode 100644 index 00000000..8bd86f68 --- /dev/null +++ b/flavors/android/gradle.properties @@ -0,0 +1 @@ +org.gradle.jvmargs=-Xmx1536M diff --git a/flavors/android/gradle/wrapper/gradle-wrapper.properties b/flavors/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..2819f022 --- /dev/null +++ b/flavors/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/flavors/android/settings.gradle b/flavors/android/settings.gradle new file mode 100644 index 00000000..115da6cb --- /dev/null +++ b/flavors/android/settings.gradle @@ -0,0 +1,15 @@ +include ':app' + +def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() + +def plugins = new Properties() +def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') +if (pluginsFile.exists()) { + pluginsFile.withInputStream { stream -> plugins.load(stream) } +} + +plugins.each { name, path -> + def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() + include ":$name" + project(":$name").projectDir = pluginDirectory +} diff --git a/flavors/ios/Flutter/AppFrameworkInfo.plist b/flavors/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..6b4c0f78 --- /dev/null +++ b/flavors/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/flavors/ios/Flutter/Debug.xcconfig b/flavors/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/flavors/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/flavors/ios/Flutter/Release.xcconfig b/flavors/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/flavors/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/flavors/ios/Runner.xcodeproj/project.pbxproj b/flavors/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..35735624 --- /dev/null +++ b/flavors/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,555 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; + 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B80C3931E831B6300D905FE /* App.framework */, + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEBA1CF902C7004384FC /* Flutter.framework */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 97C146F21CF9000F007C117D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + ORGANIZATIONNAME = "The Chromium Authors"; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, + 97C146F31CF9000F007C117D /* main.m in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 744E33D21F45D145007AB5E2 /* Debug Paid */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_FLAVOR = paid; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Debug Paid"; + }; + 744E33D31F45D145007AB5E2 /* Debug Paid */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.flavors; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = "Debug Paid"; + }; + 744E33D41F45D159007AB5E2 /* Release Paid */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_FLAVOR = paid; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = "Release Paid"; + }; + 744E33D51F45D159007AB5E2 /* Release Paid */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.flavors; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = "Release Paid"; + }; + 97C147031CF9000F007C117D /* Debug Free */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_FLAVOR = free; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = "Debug Free"; + }; + 97C147041CF9000F007C117D /* Release Free */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_FLAVOR = free; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = "Release Free"; + }; + 97C147061CF9000F007C117D /* Debug Free */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.flavors; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = "Debug Free"; + }; + 97C147071CF9000F007C117D /* Release Free */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.flavors; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = "Release Free"; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug Free */, + 744E33D21F45D145007AB5E2 /* Debug Paid */, + 97C147041CF9000F007C117D /* Release Free */, + 744E33D41F45D159007AB5E2 /* Release Paid */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Release Free"; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug Free */, + 744E33D31F45D145007AB5E2 /* Debug Paid */, + 97C147071CF9000F007C117D /* Release Free */, + 744E33D51F45D159007AB5E2 /* Release Paid */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Release Free"; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/flavors/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/flavors/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/flavors/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/flavors/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flavors/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/flavors/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/flavors/ios/Runner.xcodeproj/xcshareddata/xcschemes/Free.xcscheme b/flavors/ios/Runner.xcodeproj/xcshareddata/xcschemes/Free.xcscheme new file mode 100644 index 00000000..0a38b9d3 --- /dev/null +++ b/flavors/ios/Runner.xcodeproj/xcshareddata/xcschemes/Free.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flavors/ios/Runner.xcodeproj/xcshareddata/xcschemes/Paid.xcscheme b/flavors/ios/Runner.xcodeproj/xcshareddata/xcschemes/Paid.xcscheme new file mode 100644 index 00000000..50052dc0 --- /dev/null +++ b/flavors/ios/Runner.xcodeproj/xcshareddata/xcschemes/Paid.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flavors/ios/Runner.xcworkspace/contents.xcworkspacedata b/flavors/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1d526a16 --- /dev/null +++ b/flavors/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/flavors/ios/Runner/AppDelegate.h b/flavors/ios/Runner/AppDelegate.h new file mode 100644 index 00000000..cf210d21 --- /dev/null +++ b/flavors/ios/Runner/AppDelegate.h @@ -0,0 +1,6 @@ +#import +#import + +@interface AppDelegate : FlutterAppDelegate + +@end diff --git a/flavors/ios/Runner/AppDelegate.m b/flavors/ios/Runner/AppDelegate.m new file mode 100644 index 00000000..11b40785 --- /dev/null +++ b/flavors/ios/Runner/AppDelegate.m @@ -0,0 +1,19 @@ +#include "AppDelegate.h" +#include "GeneratedPluginRegistrant.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [GeneratedPluginRegistrant registerWithRegistry:self]; + // Override point for customization after application launch. + FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController; + FlutterMethodChannel* flavorChannel = [FlutterMethodChannel methodChannelWithName:@"flavor" binaryMessenger:controller]; + + [flavorChannel setMethodCallHandler:^(FlutterMethodCall *call, FlutterResult result) { + NSString* flavor = (NSString*)[[NSBundle mainBundle].infoDictionary valueForKey:@"Flavor"]; + result(flavor); + }]; + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +@end diff --git a/flavors/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flavors/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..410c3542 --- /dev/null +++ b/flavors/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/flavors/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/flavors/ios/Runner/Base.lproj/LaunchScreen.storyboard b/flavors/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/flavors/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flavors/ios/Runner/Base.lproj/Main.storyboard b/flavors/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/flavors/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flavors/ios/Runner/Info.plist b/flavors/ios/Runner/Info.plist new file mode 100644 index 00000000..2a7667ca --- /dev/null +++ b/flavors/ios/Runner/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + flavors + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + Flavor + ${PRODUCT_FLAVOR} + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/flavors/ios/Runner/main.m b/flavors/ios/Runner/main.m new file mode 100644 index 00000000..0ccc4500 --- /dev/null +++ b/flavors/ios/Runner/main.m @@ -0,0 +1,9 @@ +#import +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/flavors/lib/main.dart b/flavors/lib/main.dart new file mode 100644 index 00000000..5fe54582 --- /dev/null +++ b/flavors/lib/main.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +void main() { + runApp(Center(child: Flavor())); +} + +class Flavor extends StatefulWidget { + @override + _FlavorState createState() => _FlavorState(); +} + +class _FlavorState extends State { + String _flavor; + + @override + void initState() { + super.initState(); + const MethodChannel('flavor') + .invokeMethod('getFlavor') + .then((String flavor) { + setState(() { + _flavor = flavor; + }); + }); + } + + @override + Widget build(BuildContext context) { + return Directionality( + textDirection: TextDirection.ltr, + child: _flavor == null + ? const Text('Awaiting flavor...') + : Text(_flavor, key: const ValueKey('flavor')), + ); + } +} diff --git a/flavors/pubspec.yaml b/flavors/pubspec.yaml new file mode 100644 index 00000000..74dc1280 --- /dev/null +++ b/flavors/pubspec.yaml @@ -0,0 +1,73 @@ +name: flavors +description: Integration test for build flavors. + +environment: + # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite. + sdk: ">=2.0.0-dev.68.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + + analyzer: 0.36.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + args: 1.5.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + boolean_selector: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + charcode: 1.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + collection: 1.14.11 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + crypto: 2.0.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + csslib: 0.16.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + file: 5.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + front_end: 0.1.18 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + glob: 1.1.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + html: 0.14.0+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http: 0.12.0+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http_multi_server: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http_parser: 3.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + intl: 0.15.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + io: 0.3.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + js: 0.6.1+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + kernel: 0.3.18 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + matcher: 0.12.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.1.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + mime: 0.9.6+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + multi_server_socket: 1.0.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + node_preamble: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + package_config: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + package_resolver: 1.0.10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + path: 1.6.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pedantic: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pool: 1.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf_packages_handler: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_map_stack_trace: 1.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_maps: 0.10.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.5.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stack_trace: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + string_scanner: 1.0.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + test_api: 0.2.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + test_core: 0.2.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + typed_data: 1.1.6 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vector_math: 2.0.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + watcher: 0.9.7+10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + yaml: 2.1.16 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + +flutter: + uses-material-design: true + +# PUBSPEC CHECKSUM: 0f0b +dev_dependencies: + flutter_test: + sdk: flutter + flutter_driver: + sdk: flutter + test: 1.6.3 diff --git a/flavors/screenshots.yaml b/flavors/screenshots.yaml new file mode 100644 index 00000000..91e4b895 --- /dev/null +++ b/flavors/screenshots.yaml @@ -0,0 +1,22 @@ +# Screen capture tests +# Note: flutter driver expects a pair of files eg, main.dart and main_test.dart +tests: + - test_driver/main.dart + +# Interim location of screenshots from tests before processing +staging: /tmp/screenshots + +# A list of locales supported in app +locales: + - en-US + +# A list of devices to run tests on +devices: + ios: + iPhone XS Max: + iPad Pro (12.9-inch) (2nd generation): + android: + Nexus 6P: + +# Frame screenshots +frame: true \ No newline at end of file diff --git a/flavors/test_driver/main.dart b/flavors/test_driver/main.dart new file mode 100644 index 00000000..f0607655 --- /dev/null +++ b/flavors/test_driver/main.dart @@ -0,0 +1,8 @@ +import 'package:flavors/main.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_driver/driver_extension.dart'; + +void main() { + enableFlutterDriverExtension(); + runApp(Center(child: Flavor())); +} diff --git a/flavors/test_driver/main_test.dart b/flavors/test_driver/main_test.dart new file mode 100644 index 00000000..df910bb3 --- /dev/null +++ b/flavors/test_driver/main_test.dart @@ -0,0 +1,26 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter_driver/flutter_driver.dart'; +import 'package:test/test.dart' hide TypeMatcher, isInstanceOf; + +void main() { + group('flavors suite', () { + FlutterDriver driver; + + setUpAll(() async { + driver = await FlutterDriver.connect(); + }); + + test('check flavor', () async { + final SerializableFinder flavorField = find.byValueKey('flavor'); + final String flavor = await driver.getText(flavorField); + expect(flavor, 'paid'); + }); + + tearDownAll(() async { + await driver?.close(); + }); + }); +} diff --git a/test/screenshots_test.dart b/test/screenshots_test.dart index 0c111a6d..e38eaf97 100644 --- a/test/screenshots_test.dart +++ b/test/screenshots_test.dart @@ -758,4 +758,16 @@ devices: } }); }); + + group('flavors', () { + test('flavor run', () async { + final flavor = 'paid'; + final origDir = Directory.current; + Directory.current = 'flavors'; + final configPath = 'screenshots.yaml'; + await run.run( + configPath, utils.getStringFromEnum(RunMode.normal), flavor); + Directory.current = origDir; + }, timeout: Timeout(Duration(seconds: 240))); + }); } From 4a2b8107b099e8979f8844bf1ed10abe64fcc143 Mon Sep 17 00:00:00 2001 From: Maurice McCabe Date: Mon, 22 Jul 2019 20:42:30 -0700 Subject: [PATCH 6/6] Updated README for flavors --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4287efec..b2aa82f6 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ $ screenshots -c Other options: ``` $ screenshots -h -usage: screenshots [-h] [-c ] [-m ] +usage: screenshots [-h] [-c ] [-m ] [-f ] sample usage: screenshots @@ -97,9 +97,11 @@ sample usage: screenshots (defaults to "screenshots.yaml") -m, --mode= If mode is recording, screenshots will be saved for later comparison. - If mode is archive, screenshots will be archived and cannot be uploaded via fastlane. + If mode is comparison, screenshots will be compared with recorded. + If mode is archive, screenshots will be archived (and cannot be uploaded via fastlane). [normal (default), recording, comparison, archive] +-f, --flavor= Flavor name. -h, --help Display this help information. ``` @@ -134,7 +136,7 @@ Note: to turn off the debug banner on your screens, in your integration test's m ```` ## Modifying tests based on screenshots environment -In some cases it is useful to know what device, device type, screen size and locale you are currently testing with. To obtain this information in your test use: +In some cases it is useful to know what device, device type, screen size, screen orientation and locale you are currently testing with. To obtain this information in your test use: ``` final screenshotsEnv = config.screenshotsEnv; ```