From 3bb2523f4835dddc350bdc43ca1c15a9b09232b6 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 09:37:04 -0800 Subject: [PATCH 01/22] quick action stable --- packages/quick_actions/CHANGELOG.md | 2 +- .../example/integration_test/quick_actions_test.dart | 1 + packages/quick_actions/example/lib/main.dart | 2 +- packages/quick_actions/example/pubspec.yaml | 4 ++-- .../example/test_driver/integration_test.dart | 1 + packages/quick_actions/pubspec.yaml | 11 +++++------ 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/quick_actions/CHANGELOG.md b/packages/quick_actions/CHANGELOG.md index 774ccac1bb44..1b6de34ca375 100644 --- a/packages/quick_actions/CHANGELOG.md +++ b/packages/quick_actions/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.5.0-nullsafety +## 0.5.0 * Migrate to null safety. diff --git a/packages/quick_actions/example/integration_test/quick_actions_test.dart b/packages/quick_actions/example/integration_test/quick_actions_test.dart index 03ecfe491d93..43822c9e8b2b 100644 --- a/packages/quick_actions/example/integration_test/quick_actions_test.dart +++ b/packages/quick_actions/example/integration_test/quick_actions_test.dart @@ -2,6 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// @dart = 2.9 import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:quick_actions/quick_actions.dart'; diff --git a/packages/quick_actions/example/lib/main.dart b/packages/quick_actions/example/lib/main.dart index fc289810ea24..a7e9d5e4c031 100644 --- a/packages/quick_actions/example/lib/main.dart +++ b/packages/quick_actions/example/lib/main.dart @@ -25,7 +25,7 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - MyHomePage({Key key}) : super(key: key); + MyHomePage({Key? key}) : super(key: key); @override _MyHomePageState createState() => _MyHomePageState(); diff --git a/packages/quick_actions/example/pubspec.yaml b/packages/quick_actions/example/pubspec.yaml index deba400ccd9f..ded88685c41b 100644 --- a/packages/quick_actions/example/pubspec.yaml +++ b/packages/quick_actions/example/pubspec.yaml @@ -17,11 +17,11 @@ dev_dependencies: sdk: flutter integration_test: path: ../../integration_test - pedantic: ^1.8.0 + pedantic: ^1.10.0 flutter: uses-material-design: true environment: - sdk: ">=2.0.0-dev.28.0 <3.0.0" + sdk: ">=2.12.0-259.9.beta <3.0.0" flutter: ">=1.9.1+hotfix.2" diff --git a/packages/quick_actions/example/test_driver/integration_test.dart b/packages/quick_actions/example/test_driver/integration_test.dart index 7a2c21338786..0352d4aaeb2d 100644 --- a/packages/quick_actions/example/test_driver/integration_test.dart +++ b/packages/quick_actions/example/test_driver/integration_test.dart @@ -2,6 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// @dart = 2.9 import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/packages/quick_actions/pubspec.yaml b/packages/quick_actions/pubspec.yaml index 46bc53e63ce6..dc500e2516e1 100644 --- a/packages/quick_actions/pubspec.yaml +++ b/packages/quick_actions/pubspec.yaml @@ -2,7 +2,7 @@ name: quick_actions description: Flutter plugin for creating shortcuts on home screen, also known as Quick Actions on iOS and App Shortcuts on Android. homepage: https://github.com/flutter/plugins/tree/master/packages/quick_actions -version: 0.5.0-nullsafety +version: 0.5.0 flutter: plugin: @@ -16,17 +16,16 @@ flutter: dependencies: flutter: sdk: flutter - meta: ^1.3.0-nullsafety + meta: ^1.3.0 dev_dependencies: - test: ^1.16.0-nullsafety - mockito: ^5.0.0-nullsafety.0 + test: ^1.16.3 flutter_test: sdk: flutter integration_test: path: ../integration_test - pedantic: ^1.10.0-nullsafety + pedantic: ^1.10.0 environment: - sdk: ">=2.12.0-0 <3.0.0" + sdk: ">=2.12.0-259.9.beta <3.0.0" flutter: ">=1.12.13+hotfix.5" From 070e8bb92e7842cbd287c96d91961f913c07466f Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 11:07:20 -0800 Subject: [PATCH 02/22] fix ios delegate not caleld --- packages/quick_actions/ios/Classes/FLTQuickActionsPlugin.m | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/quick_actions/ios/Classes/FLTQuickActionsPlugin.m b/packages/quick_actions/ios/Classes/FLTQuickActionsPlugin.m index 88ff7397af8a..c99c016ed1ed 100644 --- a/packages/quick_actions/ios/Classes/FLTQuickActionsPlugin.m +++ b/packages/quick_actions/ios/Classes/FLTQuickActionsPlugin.m @@ -19,6 +19,7 @@ + (void)registerWithRegistrar:(NSObject *)registrar { FLTQuickActionsPlugin *instance = [[FLTQuickActionsPlugin alloc] init]; instance.channel = channel; [registrar addMethodCallDelegate:instance channel:channel]; + [registrar addApplicationDelegate:instance]; } - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result { From 9c12df96532f67d336098fe77147179ceb74f026 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 11:49:22 -0800 Subject: [PATCH 03/22] add tests --- .cirrus.yml | 2 +- .../example/ios/Flutter/Flutter.podspec | 18 ++ .../ios/Runner.xcodeproj/project.pbxproj | 161 ++++++++++++++---- .../contents.xcworkspacedata | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 10 ++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../example/ios/RunnerUITests/Info.plist | 22 +++ .../example/ios/RunnerUITests/RunnerUITests.m | 61 +++++++ packages/quick_actions/example/lib/main.dart | 10 +- 9 files changed, 261 insertions(+), 33 deletions(-) create mode 100644 packages/quick_actions/example/ios/Flutter/Flutter.podspec create mode 100644 packages/quick_actions/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 packages/quick_actions/example/ios/RunnerUITests/Info.plist create mode 100644 packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m diff --git a/.cirrus.yml b/.cirrus.yml index 2b6ee2b7f969..698cf2b8b7ce 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -183,7 +183,7 @@ task: - name: build-ipas+drive-examples env: PATH: $PATH:/usr/local/bin - PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera/camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter" + PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera/camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter" matrix: PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" diff --git a/packages/quick_actions/example/ios/Flutter/Flutter.podspec b/packages/quick_actions/example/ios/Flutter/Flutter.podspec new file mode 100644 index 000000000000..2c4421cfe51e --- /dev/null +++ b/packages/quick_actions/example/ios/Flutter/Flutter.podspec @@ -0,0 +1,18 @@ +# +# NOTE: This podspec is NOT to be published. It is only used as a local source! +# This is a generated file; do not edit or check into version control. +# + +Pod::Spec.new do |s| + s.name = 'Flutter' + s.version = '1.0.0' + s.summary = 'High-performance, high-fidelity mobile apps.' + s.homepage = 'https://flutter.io' + s.license = { :type => 'MIT' } + s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } + s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } + s.ios.deployment_target = '8.0' + # Framework linking is handled by Flutter tooling, not CocoaPods. + # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. + s.vendored_frameworks = 'path/to/nothing' +end diff --git a/packages/quick_actions/example/ios/Runner.xcodeproj/project.pbxproj b/packages/quick_actions/example/ios/Runner.xcodeproj/project.pbxproj index fdd275fcede5..dba32819ce42 100644 --- a/packages/quick_actions/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/quick_actions/example/ios/Runner.xcodeproj/project.pbxproj @@ -9,11 +9,8 @@ /* 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, ); }; }; + 686BE83025E58CCF00862533 /* RunnerUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 686BE82F25E58CCF00862533 /* RunnerUITests.m */; }; 83C36CAF23D629E5ABE75B2A /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CCC799F2B0AB50A9C34344F0 /* libPods-Runner.a */; }; - 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, ); }; }; 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 */; }; @@ -21,6 +18,16 @@ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 686BE83225E58CCF00862533 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 9705A1C41CF9048500538489 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -28,8 +35,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -40,14 +45,15 @@ 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 = ""; }; 5278439583922091276A37C9 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 686BE82D25E58CCF00862533 /* RunnerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 686BE82F25E58CCF00862533 /* RunnerUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RunnerUITests.m; sourceTree = ""; }; + 686BE83125E58CCF00862533 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; 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 = ""; }; @@ -59,12 +65,17 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 686BE82A25E58CCF00862533 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 83C36CAF23D629E5ABE75B2A /* libPods-Runner.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -72,12 +83,19 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 686BE82E25E58CCF00862533 /* RunnerUITests */ = { + isa = PBXGroup; + children = ( + 686BE82F25E58CCF00862533 /* RunnerUITests.m */, + 686BE83125E58CCF00862533 /* Info.plist */, + ); + path = RunnerUITests; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -90,6 +108,7 @@ children = ( 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, + 686BE82E25E58CCF00862533 /* RunnerUITests */, 97C146EF1CF9000F007C117D /* Products */, D0FE95BE2380323DD75CB891 /* Pods */, A44AD0D63DEF785A2A2DEE28 /* Frameworks */, @@ -100,6 +119,7 @@ isa = PBXGroup; children = ( 97C146EE1CF9000F007C117D /* Runner.app */, + 686BE82D25E58CCF00862533 /* RunnerUITests.xctest */, ); name = Products; sourceTree = ""; @@ -148,6 +168,24 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 686BE82C25E58CCF00862533 /* RunnerUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 686BE83625E58CCF00862533 /* Build configuration list for PBXNativeTarget "RunnerUITests" */; + buildPhases = ( + 686BE82925E58CCF00862533 /* Sources */, + 686BE82A25E58CCF00862533 /* Frameworks */, + 686BE82B25E58CCF00862533 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 686BE83325E58CCF00862533 /* PBXTargetDependency */, + ); + name = RunnerUITests; + productName = RunnerUITests; + productReference = 686BE82D25E58CCF00862533 /* RunnerUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; @@ -159,7 +197,6 @@ 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - FEDDF02AA7C2BA0D1905BD95 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -179,6 +216,11 @@ LastUpgradeCheck = 1100; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { + 686BE82C25E58CCF00862533 = { + CreatedOnToolsVersion = 12.4; + ProvisioningStyle = Automatic; + TestTargetID = 97C146ED1CF9000F007C117D; + }; 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; }; @@ -198,11 +240,19 @@ projectRoot = ""; targets = ( 97C146ED1CF9000F007C117D /* Runner */, + 686BE82C25E58CCF00862533 /* RunnerUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 686BE82B25E58CCF00862533 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EC1CF9000F007C117D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -229,7 +279,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; @@ -263,24 +313,17 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - FEDDF02AA7C2BA0D1905BD95 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 686BE82925E58CCF00862533 /* Sources */ = { + isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( + 686BE83025E58CCF00862533 /* RunnerUITests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ 97C146EA1CF9000F007C117D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -293,6 +336,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 686BE83325E58CCF00862533 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 686BE83225E58CCF00862533 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 97C146FA1CF9000F007C117D /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -313,9 +364,53 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 686BE83425E58CCF00862533 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = RunnerUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Runner; + }; + name = Debug; + }; + 686BE83525E58CCF00862533 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = RunnerUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = Runner; + }; + name = Release; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -372,7 +467,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; @@ -466,6 +560,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 686BE83625E58CCF00862533 /* Build configuration list for PBXNativeTarget "RunnerUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 686BE83425E58CCF00862533 /* Debug */, + 686BE83525E58CCF00862533 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16ed0f..919434a6254f 100644 --- a/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/packages/quick_actions/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/quick_actions/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 3bb3697ef41c..9850cc113026 100644 --- a/packages/quick_actions/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/quick_actions/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -37,6 +37,16 @@ + + + + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/quick_actions/example/ios/RunnerUITests/Info.plist b/packages/quick_actions/example/ios/RunnerUITests/Info.plist new file mode 100644 index 000000000000..64d65ca49577 --- /dev/null +++ b/packages/quick_actions/example/ios/RunnerUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m new file mode 100644 index 000000000000..3d28c5350044 --- /dev/null +++ b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m @@ -0,0 +1,61 @@ +// Copyright 2019 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 +#import + +const int kElementWaitingTime = 30; + +@interface RunnerUITests : XCTestCase + +@end + +@implementation RunnerUITests + +- (void)setUp { + self.continueAfterFailure = NO; +} + + +- (void)testQuickAction { + XCUIApplication *app = [[XCUIApplication alloc] init]; + [app launch]; + + XCUIElement *actionsReady = app.otherElements[@"actions ready"]; + if (![actionsReady waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); + XCTFail(@"Failed due to not able to find the actionsReady in the app with %@ seconds", + @(kElementWaitingTime)); + } + + [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome]; + + XCUIApplication *springboard = [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"]; + XCUIElement *quickActionsAppIcon = springboard.icons[@"quick_actions_example"]; + if (![quickActionsAppIcon waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); + XCTFail(@"Failed due to not able to find the example app from springboard with %@ seconds", + @(kElementWaitingTime)); + } + + [quickActionsAppIcon pressForDuration:2]; + XCUIElement *actionOne = springboard.buttons[@"Action one"]; + if (![actionOne waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); + XCTFail(@"Failed due to not able to find the actionOne button from springboard with %@ seconds", + @(kElementWaitingTime)); + } + + [actionOne tap]; + + XCUIElement *actionOneConfirmation = app.otherElements[@"action_one"]; + if (![actionOneConfirmation waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); + XCTFail(@"Failed due to not able to find the actionOneConfirmation in the app with %@ seconds", + @(kElementWaitingTime)); + } + XCTAssertTrue(actionOneConfirmation.exists); +} + +@end diff --git a/packages/quick_actions/example/lib/main.dart b/packages/quick_actions/example/lib/main.dart index a7e9d5e4c031..08d8f4a1fbce 100644 --- a/packages/quick_actions/example/lib/main.dart +++ b/packages/quick_actions/example/lib/main.dart @@ -41,7 +41,9 @@ class _MyHomePageState extends State { final QuickActions quickActions = QuickActions(); quickActions.initialize((String shortcutType) { setState(() { - if (shortcutType != null) shortcut = shortcutType; + if (shortcutType != null) { + shortcut = shortcutType; + } }); }); @@ -59,7 +61,11 @@ class _MyHomePageState extends State { type: 'action_two', localizedTitle: 'Action two', icon: 'ic_launcher'), - ]); + ]).then((value) { + setState(() { + shortcut = "actions ready"; + }); + }); } @override From 6f49499ea08b47d37f8bd2978c0124c2867d1428 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 11:52:40 -0800 Subject: [PATCH 04/22] remove wrong checkin --- .../example/ios/Flutter/Flutter.podspec | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 packages/quick_actions/example/ios/Flutter/Flutter.podspec diff --git a/packages/quick_actions/example/ios/Flutter/Flutter.podspec b/packages/quick_actions/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 2c4421cfe51e..000000000000 --- a/packages/quick_actions/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# This is a generated file; do not edit or check into version control. -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - # Framework linking is handled by Flutter tooling, not CocoaPods. - # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. - s.vendored_frameworks = 'path/to/nothing' -end From bd29bca1bc07dc806ad0956b4304639f108c67a8 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 11:57:27 -0800 Subject: [PATCH 05/22] revert --- .../project.xcworkspace/contents.xcworkspacedata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 919434a6254f..1d526a16ed0f 100644 --- a/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "group:Runner.xcodeproj"> From bb477a84fb72a8c4e9b23d9013d77cb93ac5ba28 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 11:58:19 -0800 Subject: [PATCH 06/22] format --- .../example/ios/RunnerUITests/RunnerUITests.m | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m index 3d28c5350044..6ea6b874473a 100644 --- a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m +++ b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m @@ -14,48 +14,48 @@ @interface RunnerUITests : XCTestCase @implementation RunnerUITests - (void)setUp { - self.continueAfterFailure = NO; + self.continueAfterFailure = NO; } - - (void)testQuickAction { - XCUIApplication *app = [[XCUIApplication alloc] init]; - [app launch]; - - XCUIElement *actionsReady = app.otherElements[@"actions ready"]; - if (![actionsReady waitForExistenceWithTimeout:kElementWaitingTime]) { - os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); - XCTFail(@"Failed due to not able to find the actionsReady in the app with %@ seconds", - @(kElementWaitingTime)); - } - - [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome]; - - XCUIApplication *springboard = [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"]; - XCUIElement *quickActionsAppIcon = springboard.icons[@"quick_actions_example"]; - if (![quickActionsAppIcon waitForExistenceWithTimeout:kElementWaitingTime]) { - os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); - XCTFail(@"Failed due to not able to find the example app from springboard with %@ seconds", - @(kElementWaitingTime)); - } - - [quickActionsAppIcon pressForDuration:2]; - XCUIElement *actionOne = springboard.buttons[@"Action one"]; - if (![actionOne waitForExistenceWithTimeout:kElementWaitingTime]) { - os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); - XCTFail(@"Failed due to not able to find the actionOne button from springboard with %@ seconds", - @(kElementWaitingTime)); - } - - [actionOne tap]; - - XCUIElement *actionOneConfirmation = app.otherElements[@"action_one"]; - if (![actionOneConfirmation waitForExistenceWithTimeout:kElementWaitingTime]) { - os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); - XCTFail(@"Failed due to not able to find the actionOneConfirmation in the app with %@ seconds", - @(kElementWaitingTime)); - } - XCTAssertTrue(actionOneConfirmation.exists); + XCUIApplication *app = [[XCUIApplication alloc] init]; + [app launch]; + + XCUIElement *actionsReady = app.otherElements[@"actions ready"]; + if (![actionsReady waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); + XCTFail(@"Failed due to not able to find the actionsReady in the app with %@ seconds", + @(kElementWaitingTime)); + } + + [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome]; + + XCUIApplication *springboard = + [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"]; + XCUIElement *quickActionsAppIcon = springboard.icons[@"quick_actions_example"]; + if (![quickActionsAppIcon waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); + XCTFail(@"Failed due to not able to find the example app from springboard with %@ seconds", + @(kElementWaitingTime)); + } + + [quickActionsAppIcon pressForDuration:2]; + XCUIElement *actionOne = springboard.buttons[@"Action one"]; + if (![actionOne waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); + XCTFail(@"Failed due to not able to find the actionOne button from springboard with %@ seconds", + @(kElementWaitingTime)); + } + + [actionOne tap]; + + XCUIElement *actionOneConfirmation = app.otherElements[@"action_one"]; + if (![actionOneConfirmation waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); + XCTFail(@"Failed due to not able to find the actionOneConfirmation in the app with %@ seconds", + @(kElementWaitingTime)); + } + XCTAssertTrue(actionOneConfirmation.exists); } @end From b58ac6399790bb030881d962b0fc192bb22718cf Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 12:47:44 -0800 Subject: [PATCH 07/22] review' --- packages/quick_actions/CHANGELOG.md | 1 + .../quick_actions/example/ios/RunnerUITests/RunnerUITests.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/quick_actions/CHANGELOG.md b/packages/quick_actions/CHANGELOG.md index 1b6de34ca375..08dc8607d34c 100644 --- a/packages/quick_actions/CHANGELOG.md +++ b/packages/quick_actions/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.5.0 * Migrate to null safety. +* Fixes quick action not working on iOS. ## 0.4.0+12 diff --git a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m index 6ea6b874473a..eb90b73c29a8 100644 --- a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m +++ b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m @@ -5,7 +5,7 @@ #import #import -const int kElementWaitingTime = 30; +static const int kElementWaitingTime = 30; @interface RunnerUITests : XCTestCase From e96a091c7ab8e00479035719cef082b0b75f0b3a Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 12:48:16 -0800 Subject: [PATCH 08/22] Update CHANGELOG.md --- packages/quick_actions/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/quick_actions/CHANGELOG.md b/packages/quick_actions/CHANGELOG.md index 08dc8607d34c..276ddfbf24c4 100644 --- a/packages/quick_actions/CHANGELOG.md +++ b/packages/quick_actions/CHANGELOG.md @@ -1,7 +1,7 @@ ## 0.5.0 * Migrate to null safety. -* Fixes quick action not working on iOS. +* Fixes quick actions not working on iOS. ## 0.4.0+12 From 8d5612feff203a007299892fa5e94661c6974a5c Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 14:20:29 -0800 Subject: [PATCH 09/22] add uitest scheme --- .../xcschemes/RunnerUITests.xcscheme | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 packages/quick_actions/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/RunnerUITests.xcscheme diff --git a/packages/quick_actions/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/RunnerUITests.xcscheme b/packages/quick_actions/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/RunnerUITests.xcscheme new file mode 100644 index 000000000000..0164e94407dd --- /dev/null +++ b/packages/quick_actions/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/RunnerUITests.xcscheme @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + From 641c6bfa518c5e1c09f2a034cf31b054c9aa4dc2 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 17:51:19 -0800 Subject: [PATCH 10/22] add debug code --- .../example/ios/RunnerUITests/RunnerUITests.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m index eb90b73c29a8..8e5f2581eb74 100644 --- a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m +++ b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m @@ -21,8 +21,16 @@ - (void)testQuickAction { XCUIApplication *app = [[XCUIApplication alloc] init]; [app launch]; + XCUIElement *appTitle = app.otherElements[@"quick_actions_example"]; + if (![appTitle waitForExistenceWithTimeout:0.01]) { + os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); + XCTFail(@"Failed due to not able to find the appTitle in the app with %@ seconds", + @(kElementWaitingTime)); + } + os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); + XCUIElement *actionsReady = app.otherElements[@"actions ready"]; - if (![actionsReady waitForExistenceWithTimeout:kElementWaitingTime]) { + if (![actionsReady waitForExistenceWithTimeout:0.01]) { os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCTFail(@"Failed due to not able to find the actionsReady in the app with %@ seconds", @(kElementWaitingTime)); From 3958465c30d0836e4a04f6e3d1b9f9b2ddd26535 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 20:06:32 -0800 Subject: [PATCH 11/22] try ios 14.4 --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 698cf2b8b7ce..cd58685bb38c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -151,7 +151,7 @@ task: only_if: $CIRRUS_TAG == '' use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' osx_instance: - image: big-sur-xcode-12.3 + image: big-sur-xcode-12.4 upgrade_script: - sudo gem install cocoapods - flutter channel stable @@ -166,7 +166,7 @@ task: - git submodule update create_simulator_script: - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-12 com.apple.CoreSimulator.SimRuntime.iOS-14-4 | xargs xcrun simctl boot matrix: - name: build_all_plugins_ipa env: From f2cd527d97c8a93b7960055acc893fcd56ef2c7c Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 20:11:03 -0800 Subject: [PATCH 12/22] remove other tests --- .cirrus.yml | 412 ++++++++++++++++++++++++++-------------------------- 1 file changed, 206 insertions(+), 206 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index cd58685bb38c..679be34b6a12 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,149 +1,149 @@ -task: - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' - container: - dockerfile: .ci/Dockerfile - cpu: 8 - memory: 16G - env: - INTEGRATION_TEST_PATH: "./packages/integration_test" - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel beta - - flutter upgrade - - flutter channel master - - flutter upgrade - - git fetch origin master - submodules_script: - - git submodule init - - git submodule update - matrix: - - name: publishable - script: - - flutter channel master - - ./script/check_publish.sh - - name: format - install_script: - - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" - - sudo apt-get update - - sudo apt-get install -y --allow-unauthenticated clang-format-7 - format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 - - name: test - env: - matrix: - CHANNEL: "master" - CHANNEL: "beta" - CHANNEL: "stable" - test_script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/incremental_build.sh test - - name: analyze - env: - matrix: - CHANNEL: "master" - CHANNEL: "beta" - CHANNEL: "stable" - script: ./script/incremental_build.sh analyze - - name: build_all_plugins_apk - env: - matrix: - CHANNEL: "master" - CHANNEL: "beta" - CHANNEL: "stable" - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/build_all_plugins_app.sh apk - - name: integration_web_smoke_test - # Tests integration example test in web. - only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" - install_script: - - flutter config --enable-web - - git clone https://github.com/flutter/web_installers.git - - cd web_installers/packages/web_drivers/ - - pub get - - dart lib/web_driver_installer.dart chromedriver --install-only - - ./chromedriver/chromedriver --port=4444 & - test_script: - - cd $INTEGRATION_TEST_PATH/example/ - - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome - - name: build-apks+java-test+firebase-test-lab - env: - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - matrix: - CHANNEL: "master" - CHANNEL: "beta" - CHANNEL: "stable" - MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they - # might include non-ASCII characters which makes Gradle crash. - # See: https://github.com/flutter/flutter/issues/24935 - # This is a temporary workaround until we figure how to properly configure - # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). - # TODO(amirh): Set the locale to UTF8. - - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt - - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt - - export CIRRUS_CHANGE_MESSAGE="" - - export CIRRUS_COMMIT_MESSAGE="" - - ./script/incremental_build.sh build-examples --apk - - ./script/incremental_build.sh java-test # must come after apk build - - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then - - echo "This user does not have permission to run Firebase Test Lab tests." - - else - - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json - - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 - - fi - - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` - - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` +# task: +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' +# container: +# dockerfile: .ci/Dockerfile +# cpu: 8 +# memory: 16G +# env: +# INTEGRATION_TEST_PATH: "./packages/integration_test" +# upgrade_script: +# - flutter channel stable +# - flutter upgrade +# - flutter channel beta +# - flutter upgrade +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# submodules_script: +# - git submodule init +# - git submodule update +# matrix: +# - name: publishable +# script: +# - flutter channel master +# - ./script/check_publish.sh +# - name: format +# install_script: +# - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - +# - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" +# - sudo apt-get update +# - sudo apt-get install -y --allow-unauthenticated clang-format-7 +# format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 +# - name: test +# env: +# matrix: +# CHANNEL: "master" +# CHANNEL: "beta" +# CHANNEL: "stable" +# test_script: +# # TODO(jackson): Allow web plugins once supported on stable +# # https://github.com/flutter/flutter/issues/42864 +# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi +# - flutter channel $CHANNEL +# - ./script/incremental_build.sh test +# - name: analyze +# env: +# matrix: +# CHANNEL: "master" +# CHANNEL: "beta" +# CHANNEL: "stable" +# script: ./script/incremental_build.sh analyze +# - name: build_all_plugins_apk +# env: +# matrix: +# CHANNEL: "master" +# CHANNEL: "beta" +# CHANNEL: "stable" +# script: +# # TODO(jackson): Allow web plugins once supported on stable +# # https://github.com/flutter/flutter/issues/42864 +# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi +# - flutter channel $CHANNEL +# - ./script/build_all_plugins_app.sh apk +# - name: integration_web_smoke_test +# # Tests integration example test in web. +# only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" +# install_script: +# - flutter config --enable-web +# - git clone https://github.com/flutter/web_installers.git +# - cd web_installers/packages/web_drivers/ +# - pub get +# - dart lib/web_driver_installer.dart chromedriver --install-only +# - ./chromedriver/chromedriver --port=4444 & +# test_script: +# - cd $INTEGRATION_TEST_PATH/example/ +# - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome +# - name: build-apks+java-test+firebase-test-lab +# env: +# matrix: +# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" +# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" +# PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" +# PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" +# matrix: +# CHANNEL: "master" +# CHANNEL: "beta" +# CHANNEL: "stable" +# MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] +# GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] +# script: +# # TODO(jackson): Allow web plugins once supported on stable +# # https://github.com/flutter/flutter/issues/42864 +# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi +# - flutter channel $CHANNEL +# # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they +# # might include non-ASCII characters which makes Gradle crash. +# # See: https://github.com/flutter/flutter/issues/24935 +# # This is a temporary workaround until we figure how to properly configure +# # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). +# # TODO(amirh): Set the locale to UTF8. +# - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt +# - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt +# - export CIRRUS_CHANGE_MESSAGE="" +# - export CIRRUS_COMMIT_MESSAGE="" +# - ./script/incremental_build.sh build-examples --apk +# - ./script/incremental_build.sh java-test # must come after apk build +# - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then +# - echo "This user does not have permission to run Firebase Test Lab tests." +# - else +# - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json +# - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 +# - fi +# - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` +# - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` -task: - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' - container: - dockerfile: .ci/Dockerfile-LinuxDesktop - cpu: 8 - memory: 16G - env: - INTEGRATION_TEST_PATH: "./packages/integration_test" - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel beta - - flutter upgrade - - flutter channel master - - flutter upgrade - - git fetch origin master - submodules_script: - - git submodule init - - git submodule update - matrix: - - name: build-linux+drive-examples - install_script: - - flutter config --enable-linux-desktop - build_script: - # TODO(stuartmorgan): Include stable once Linux is supported on stable. - - flutter channel master - - ./script/incremental_build.sh build-examples --linux - - xvfb-run ./script/incremental_build.sh drive-examples --linux +# task: +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' +# container: +# dockerfile: .ci/Dockerfile-LinuxDesktop +# cpu: 8 +# memory: 16G +# env: +# INTEGRATION_TEST_PATH: "./packages/integration_test" +# upgrade_script: +# - flutter channel stable +# - flutter upgrade +# - flutter channel beta +# - flutter upgrade +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# submodules_script: +# - git submodule init +# - git submodule update +# matrix: +# - name: build-linux+drive-examples +# install_script: +# - flutter config --enable-linux-desktop +# build_script: +# # TODO(stuartmorgan): Include stable once Linux is supported on stable. +# - flutter channel master +# - ./script/incremental_build.sh build-examples --linux +# - xvfb-run ./script/incremental_build.sh drive-examples --linux task: # Xcode 12 task @@ -204,65 +204,65 @@ task: - ./script/incremental_build.sh drive-examples --ios - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" -task: - # Xcode 11 task - # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' - osx_instance: - image: catalina-xcode-11.3.1-flutter - upgrade_script: - - sudo gem install cocoapods - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - git fetch origin master - submodules_script: - - git submodule init - - git submodule update - create_simulator_script: - - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot - matrix: - - name: lint_darwin_plugins - env: - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" - script: - # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. - - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm - # Skip the dummy podspecs used to placate the tool. - - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm - - ./script/incremental_build.sh podspecs +# task: +# # Xcode 11 task +# # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' +# osx_instance: +# image: catalina-xcode-11.3.1-flutter +# upgrade_script: +# - sudo gem install cocoapods +# - flutter channel stable +# - flutter upgrade +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# submodules_script: +# - git submodule init +# - git submodule update +# create_simulator_script: +# - xcrun simctl list +# - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot +# matrix: +# - name: lint_darwin_plugins +# env: +# matrix: +# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" +# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" +# script: +# # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. +# - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm +# # Skip the dummy podspecs used to placate the tool. +# - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm +# - ./script/incremental_build.sh podspecs -task: - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' - osx_instance: - image: big-sur-xcode-12.3 - setup_script: - - flutter config --enable-macos-desktop - upgrade_script: - - sudo gem install cocoapods - - flutter channel master - - flutter upgrade - - git fetch origin master - submodules_script: - - git submodule init - - git submodule update - matrix: - - name: build_all_plugins_app - script: - - flutter channel master - - ./script/build_all_plugins_app.sh macos - - name: build-apps+drive-examples - env: - PATH: $PATH:/usr/local/bin - build_script: - - flutter channel master - - ./script/incremental_build.sh build-examples --macos --no-ipa - - ./script/incremental_build.sh drive-examples --macos +# task: +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG .cirrus.yml== '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' +# osx_instance: +# image: big-sur-xcode-12.3 +# setup_script: +# - flutter config --enable-macos-desktop +# upgrade_script: +# - sudo gem install cocoapods +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# submodules_script: +# - git submodule init +# - git submodule update +# matrix: +# - name: build_all_plugins_app +# script: +# - flutter channel master +# - ./script/build_all_plugins_app.sh macos +# - name: build-apps+drive-examples +# env: +# PATH: $PATH:/usr/local/bin +# build_script: +# - flutter channel master +# - ./script/incremental_build.sh build-examples --macos --no-ipa +# - ./script/incremental_build.sh drive-examples --macos From 90e590141c5df74887e0a1e139feb22595e8a880 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 23 Feb 2021 20:21:21 -0800 Subject: [PATCH 13/22] fix ios version --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 679be34b6a12..f9d04cc4fabe 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -202,7 +202,7 @@ task: - flutter upgrade - ./script/incremental_build.sh build-examples --ipa - ./script/incremental_build.sh drive-examples --ios - - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" + - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.4" # task: # # Xcode 11 task From 11c8bc3447828feece7ed4393e7f2fe157ed66cb Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 24 Feb 2021 09:39:58 -0800 Subject: [PATCH 14/22] test ci with simple launch --- .cirrus.yml | 6 +- .../example/ios/RunnerUITests/RunnerUITests.m | 68 +++++++++---------- 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index f9d04cc4fabe..c56711fc16a5 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -151,7 +151,7 @@ task: only_if: $CIRRUS_TAG == '' use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' osx_instance: - image: big-sur-xcode-12.4 + image: big-sur-xcode-12.3 upgrade_script: - sudo gem install cocoapods - flutter channel stable @@ -166,7 +166,7 @@ task: - git submodule update create_simulator_script: - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-12 com.apple.CoreSimulator.SimRuntime.iOS-14-4 | xargs xcrun simctl boot + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot matrix: - name: build_all_plugins_ipa env: @@ -202,7 +202,7 @@ task: - flutter upgrade - ./script/incremental_build.sh build-examples --ipa - ./script/incremental_build.sh drive-examples --ios - - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.4" + - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" # task: # # Xcode 11 task diff --git a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m index 8e5f2581eb74..891e4ac70869 100644 --- a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m +++ b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m @@ -14,56 +14,50 @@ @interface RunnerUITests : XCTestCase @implementation RunnerUITests - (void)setUp { + [super setUp]; self.continueAfterFailure = NO; } - (void)testQuickAction { XCUIApplication *app = [[XCUIApplication alloc] init]; [app launch]; - - XCUIElement *appTitle = app.otherElements[@"quick_actions_example"]; - if (![appTitle waitForExistenceWithTimeout:0.01]) { - os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); - XCTFail(@"Failed due to not able to find the appTitle in the app with %@ seconds", - @(kElementWaitingTime)); - } os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); - XCUIElement *actionsReady = app.otherElements[@"actions ready"]; if (![actionsReady waitForExistenceWithTimeout:0.01]) { os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCTFail(@"Failed due to not able to find the actionsReady in the app with %@ seconds", @(kElementWaitingTime)); } - - [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome]; - - XCUIApplication *springboard = - [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"]; - XCUIElement *quickActionsAppIcon = springboard.icons[@"quick_actions_example"]; - if (![quickActionsAppIcon waitForExistenceWithTimeout:kElementWaitingTime]) { - os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); - XCTFail(@"Failed due to not able to find the example app from springboard with %@ seconds", - @(kElementWaitingTime)); - } - - [quickActionsAppIcon pressForDuration:2]; - XCUIElement *actionOne = springboard.buttons[@"Action one"]; - if (![actionOne waitForExistenceWithTimeout:kElementWaitingTime]) { - os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); - XCTFail(@"Failed due to not able to find the actionOne button from springboard with %@ seconds", - @(kElementWaitingTime)); - } - - [actionOne tap]; - - XCUIElement *actionOneConfirmation = app.otherElements[@"action_one"]; - if (![actionOneConfirmation waitForExistenceWithTimeout:kElementWaitingTime]) { - os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); - XCTFail(@"Failed due to not able to find the actionOneConfirmation in the app with %@ seconds", - @(kElementWaitingTime)); - } - XCTAssertTrue(actionOneConfirmation.exists); + os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); +// +// [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome]; +// +// XCUIApplication *springboard = +// [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"]; +// XCUIElement *quickActionsAppIcon = springboard.icons[@"quick_actions_example"]; +// if (![quickActionsAppIcon waitForExistenceWithTimeout:kElementWaitingTime]) { +// os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); +// XCTFail(@"Failed due to not able to find the example app from springboard with %@ seconds", +// @(kElementWaitingTime)); +// } +// +// [quickActionsAppIcon pressForDuration:2]; +// XCUIElement *actionOne = springboard.buttons[@"Action one"]; +// if (![actionOne waitForExistenceWithTimeout:kElementWaitingTime]) { +// os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); +// XCTFail(@"Failed due to not able to find the actionOne button from springboard with %@ seconds", +// @(kElementWaitingTime)); +// } +// +// [actionOne tap]; +// +// XCUIElement *actionOneConfirmation = app.otherElements[@"action_one"]; +// if (![actionOneConfirmation waitForExistenceWithTimeout:kElementWaitingTime]) { +// os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); +// XCTFail(@"Failed due to not able to find the actionOneConfirmation in the app with %@ seconds", +// @(kElementWaitingTime)); +// } +// XCTAssertTrue(actionOneConfirmation.exists); } @end From 64e02c4b9ed64c10261b4de13c4d82643085fc53 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 24 Feb 2021 09:53:43 -0800 Subject: [PATCH 15/22] remove quick action code in main.dart --- .cirrus.yml | 24 +++---- .../example/ios/RunnerUITests/RunnerUITests.m | 2 +- packages/quick_actions/example/lib/main.dart | 62 +++++++++---------- 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c56711fc16a5..6a5be75d4c01 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -168,18 +168,18 @@ task: - xcrun simctl list - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot matrix: - - name: build_all_plugins_ipa - env: - matrix: - CHANNEL: "master" - CHANNEL: "beta" - CHANNEL: "stable" - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/build_all_plugins_app.sh ios --no-codesign + # - name: build_all_plugins_ipa + # env: + # matrix: + # CHANNEL: "master" + # CHANNEL: "beta" + # CHANNEL: "stable" + # script: + # # TODO(jackson): Allow web plugins once supported on stable + # # https://github.com/flutter/flutter/issues/42864 + # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + # - flutter channel $CHANNEL + # - ./script/build_all_plugins_app.sh ios --no-codesign - name: build-ipas+drive-examples env: PATH: $PATH:/usr/local/bin diff --git a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m index 891e4ac70869..7edc9e401db9 100644 --- a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m +++ b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m @@ -23,7 +23,7 @@ - (void)testQuickAction { [app launch]; os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCUIElement *actionsReady = app.otherElements[@"actions ready"]; - if (![actionsReady waitForExistenceWithTimeout:0.01]) { + if (![actionsReady waitForExistenceWithTimeout:1]) { os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCTFail(@"Failed due to not able to find the actionsReady in the app with %@ seconds", @(kElementWaitingTime)); diff --git a/packages/quick_actions/example/lib/main.dart b/packages/quick_actions/example/lib/main.dart index 08d8f4a1fbce..3eff6737eb97 100644 --- a/packages/quick_actions/example/lib/main.dart +++ b/packages/quick_actions/example/lib/main.dart @@ -34,39 +34,39 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { String shortcut = "no action set"; - @override - void initState() { - super.initState(); + // @override + // void initState() { + // super.initState(); - final QuickActions quickActions = QuickActions(); - quickActions.initialize((String shortcutType) { - setState(() { - if (shortcutType != null) { - shortcut = shortcutType; - } - }); - }); + // final QuickActions quickActions = QuickActions(); + // quickActions.initialize((String shortcutType) { + // setState(() { + // if (shortcutType != null) { + // shortcut = shortcutType; + // } + // }); + // }); - quickActions.setShortcutItems([ - // NOTE: This first action icon will only work on iOS. - // In a real world project keep the same file name for both platforms. - const ShortcutItem( - type: 'action_one', - localizedTitle: 'Action one', - icon: 'AppIcon', - ), - // NOTE: This second action icon will only work on Android. - // In a real world project keep the same file name for both platforms. - const ShortcutItem( - type: 'action_two', - localizedTitle: 'Action two', - icon: 'ic_launcher'), - ]).then((value) { - setState(() { - shortcut = "actions ready"; - }); - }); - } + // quickActions.setShortcutItems([ + // // NOTE: This first action icon will only work on iOS. + // // In a real world project keep the same file name for both platforms. + // const ShortcutItem( + // type: 'action_one', + // localizedTitle: 'Action one', + // icon: 'AppIcon', + // ), + // // NOTE: This second action icon will only work on Android. + // // In a real world project keep the same file name for both platforms. + // const ShortcutItem( + // type: 'action_two', + // localizedTitle: 'Action two', + // icon: 'ic_launcher'), + // ]).then((value) { + // setState(() { + // shortcut = "actions ready"; + // }); + // }); + // } @override Widget build(BuildContext context) { From a37cb34ba0ac1c5eda8d4fc46e24cba9059a4d7d Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 24 Feb 2021 10:24:49 -0800 Subject: [PATCH 16/22] add meta data files --- .../example/ios/Flutter/Flutter.podspec | 18 ++++++++++++++++++ .../contents.xcworkspacedata | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 packages/quick_actions/example/ios/Flutter/Flutter.podspec diff --git a/packages/quick_actions/example/ios/Flutter/Flutter.podspec b/packages/quick_actions/example/ios/Flutter/Flutter.podspec new file mode 100644 index 000000000000..2c4421cfe51e --- /dev/null +++ b/packages/quick_actions/example/ios/Flutter/Flutter.podspec @@ -0,0 +1,18 @@ +# +# NOTE: This podspec is NOT to be published. It is only used as a local source! +# This is a generated file; do not edit or check into version control. +# + +Pod::Spec.new do |s| + s.name = 'Flutter' + s.version = '1.0.0' + s.summary = 'High-performance, high-fidelity mobile apps.' + s.homepage = 'https://flutter.io' + s.license = { :type => 'MIT' } + s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } + s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } + s.ios.deployment_target = '8.0' + # Framework linking is handled by Flutter tooling, not CocoaPods. + # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. + s.vendored_frameworks = 'path/to/nothing' +end diff --git a/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16ed0f..919434a6254f 100644 --- a/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> From 3edc158bffa79e7d09eabc03c6d7b044b90bef24 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 24 Feb 2021 10:26:30 -0800 Subject: [PATCH 17/22] try remove drive test --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 6a5be75d4c01..12aa27b7c162 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -201,7 +201,7 @@ task: - flutter channel $CHANNEL - flutter upgrade - ./script/incremental_build.sh build-examples --ipa - - ./script/incremental_build.sh drive-examples --ios + # - ./script/incremental_build.sh drive-examples --ios - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" # task: From 408a65863cff6d10711122583b72169c708dfe0b Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 24 Feb 2021 10:43:29 -0800 Subject: [PATCH 18/22] move drive test after xctest --- .cirrus.yml | 2 +- .../example/ios/RunnerUITests/RunnerUITests.m | 60 +++++++++--------- packages/quick_actions/example/lib/main.dart | 62 +++++++++---------- 3 files changed, 62 insertions(+), 62 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 12aa27b7c162..373d2d9642eb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -201,8 +201,8 @@ task: - flutter channel $CHANNEL - flutter upgrade - ./script/incremental_build.sh build-examples --ipa - # - ./script/incremental_build.sh drive-examples --ios - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" + - ./script/incremental_build.sh drive-examples --ios # task: # # Xcode 11 task diff --git a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m index 7edc9e401db9..78fb2e3330a2 100644 --- a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m +++ b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m @@ -23,41 +23,41 @@ - (void)testQuickAction { [app launch]; os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCUIElement *actionsReady = app.otherElements[@"actions ready"]; - if (![actionsReady waitForExistenceWithTimeout:1]) { + if (![actionsReady waitForExistenceWithTimeout:kElementWaitingTime]) { os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCTFail(@"Failed due to not able to find the actionsReady in the app with %@ seconds", @(kElementWaitingTime)); } os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); -// -// [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome]; -// -// XCUIApplication *springboard = -// [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"]; -// XCUIElement *quickActionsAppIcon = springboard.icons[@"quick_actions_example"]; -// if (![quickActionsAppIcon waitForExistenceWithTimeout:kElementWaitingTime]) { -// os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); -// XCTFail(@"Failed due to not able to find the example app from springboard with %@ seconds", -// @(kElementWaitingTime)); -// } -// -// [quickActionsAppIcon pressForDuration:2]; -// XCUIElement *actionOne = springboard.buttons[@"Action one"]; -// if (![actionOne waitForExistenceWithTimeout:kElementWaitingTime]) { -// os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); -// XCTFail(@"Failed due to not able to find the actionOne button from springboard with %@ seconds", -// @(kElementWaitingTime)); -// } -// -// [actionOne tap]; -// -// XCUIElement *actionOneConfirmation = app.otherElements[@"action_one"]; -// if (![actionOneConfirmation waitForExistenceWithTimeout:kElementWaitingTime]) { -// os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); -// XCTFail(@"Failed due to not able to find the actionOneConfirmation in the app with %@ seconds", -// @(kElementWaitingTime)); -// } -// XCTAssertTrue(actionOneConfirmation.exists); + + [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome]; + + XCUIApplication *springboard = + [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"]; + XCUIElement *quickActionsAppIcon = springboard.icons[@"quick_actions_example"]; + if (![quickActionsAppIcon waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); + XCTFail(@"Failed due to not able to find the example app from springboard with %@ seconds", + @(kElementWaitingTime)); + } + + [quickActionsAppIcon pressForDuration:2]; + XCUIElement *actionOne = springboard.buttons[@"Action one"]; + if (![actionOne waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); + XCTFail(@"Failed due to not able to find the actionOne button from springboard with %@ seconds", + @(kElementWaitingTime)); + } + + [actionOne tap]; + + XCUIElement *actionOneConfirmation = app.otherElements[@"action_one"]; + if (![actionOneConfirmation waitForExistenceWithTimeout:kElementWaitingTime]) { + os_log_error(OS_LOG_DEFAULT, "%@", springboard.debugDescription); + XCTFail(@"Failed due to not able to find the actionOneConfirmation in the app with %@ seconds", + @(kElementWaitingTime)); + } + XCTAssertTrue(actionOneConfirmation.exists); } @end diff --git a/packages/quick_actions/example/lib/main.dart b/packages/quick_actions/example/lib/main.dart index 3eff6737eb97..08d8f4a1fbce 100644 --- a/packages/quick_actions/example/lib/main.dart +++ b/packages/quick_actions/example/lib/main.dart @@ -34,39 +34,39 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { String shortcut = "no action set"; - // @override - // void initState() { - // super.initState(); + @override + void initState() { + super.initState(); - // final QuickActions quickActions = QuickActions(); - // quickActions.initialize((String shortcutType) { - // setState(() { - // if (shortcutType != null) { - // shortcut = shortcutType; - // } - // }); - // }); + final QuickActions quickActions = QuickActions(); + quickActions.initialize((String shortcutType) { + setState(() { + if (shortcutType != null) { + shortcut = shortcutType; + } + }); + }); - // quickActions.setShortcutItems([ - // // NOTE: This first action icon will only work on iOS. - // // In a real world project keep the same file name for both platforms. - // const ShortcutItem( - // type: 'action_one', - // localizedTitle: 'Action one', - // icon: 'AppIcon', - // ), - // // NOTE: This second action icon will only work on Android. - // // In a real world project keep the same file name for both platforms. - // const ShortcutItem( - // type: 'action_two', - // localizedTitle: 'Action two', - // icon: 'ic_launcher'), - // ]).then((value) { - // setState(() { - // shortcut = "actions ready"; - // }); - // }); - // } + quickActions.setShortcutItems([ + // NOTE: This first action icon will only work on iOS. + // In a real world project keep the same file name for both platforms. + const ShortcutItem( + type: 'action_one', + localizedTitle: 'Action one', + icon: 'AppIcon', + ), + // NOTE: This second action icon will only work on Android. + // In a real world project keep the same file name for both platforms. + const ShortcutItem( + type: 'action_two', + localizedTitle: 'Action two', + icon: 'ic_launcher'), + ]).then((value) { + setState(() { + shortcut = "actions ready"; + }); + }); + } @override Widget build(BuildContext context) { From 1c42b2d2ff152624733463229d71b68e79b89f8c Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 24 Feb 2021 11:00:10 -0800 Subject: [PATCH 19/22] remove unncessary files --- .../example/ios/Flutter/Flutter.podspec | 18 ------------------ .../contents.xcworkspacedata | 7 ------- .../xcshareddata/IDEWorkspaceChecks.plist | 8 -------- 3 files changed, 33 deletions(-) delete mode 100644 packages/quick_actions/example/ios/Flutter/Flutter.podspec delete mode 100644 packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 packages/quick_actions/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/packages/quick_actions/example/ios/Flutter/Flutter.podspec b/packages/quick_actions/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 2c4421cfe51e..000000000000 --- a/packages/quick_actions/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# This is a generated file; do not edit or check into version control. -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - # Framework linking is handled by Flutter tooling, not CocoaPods. - # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. - s.vendored_frameworks = 'path/to/nothing' -end diff --git a/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6254f..000000000000 --- a/packages/quick_actions/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/quick_actions/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/quick_actions/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d68..000000000000 --- a/packages/quick_actions/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - From 0ae46b6b53fbbdeeaa6133dfeb790ad05a4efc92 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 24 Feb 2021 11:01:57 -0800 Subject: [PATCH 20/22] revert testing code in cirrus script --- .cirrus.yml | 439 ++++++++++++++++++++++++++-------------------------- 1 file changed, 221 insertions(+), 218 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 373d2d9642eb..78992f149c26 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,149 +1,149 @@ -# task: -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' -# container: -# dockerfile: .ci/Dockerfile -# cpu: 8 -# memory: 16G -# env: -# INTEGRATION_TEST_PATH: "./packages/integration_test" -# upgrade_script: -# - flutter channel stable -# - flutter upgrade -# - flutter channel beta -# - flutter upgrade -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# submodules_script: -# - git submodule init -# - git submodule update -# matrix: -# - name: publishable -# script: -# - flutter channel master -# - ./script/check_publish.sh -# - name: format -# install_script: -# - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - -# - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" -# - sudo apt-get update -# - sudo apt-get install -y --allow-unauthenticated clang-format-7 -# format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 -# - name: test -# env: -# matrix: -# CHANNEL: "master" -# CHANNEL: "beta" -# CHANNEL: "stable" -# test_script: -# # TODO(jackson): Allow web plugins once supported on stable -# # https://github.com/flutter/flutter/issues/42864 -# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi -# - flutter channel $CHANNEL -# - ./script/incremental_build.sh test -# - name: analyze -# env: -# matrix: -# CHANNEL: "master" -# CHANNEL: "beta" -# CHANNEL: "stable" -# script: ./script/incremental_build.sh analyze -# - name: build_all_plugins_apk -# env: -# matrix: -# CHANNEL: "master" -# CHANNEL: "beta" -# CHANNEL: "stable" -# script: -# # TODO(jackson): Allow web plugins once supported on stable -# # https://github.com/flutter/flutter/issues/42864 -# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi -# - flutter channel $CHANNEL -# - ./script/build_all_plugins_app.sh apk -# - name: integration_web_smoke_test -# # Tests integration example test in web. -# only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" -# install_script: -# - flutter config --enable-web -# - git clone https://github.com/flutter/web_installers.git -# - cd web_installers/packages/web_drivers/ -# - pub get -# - dart lib/web_driver_installer.dart chromedriver --install-only -# - ./chromedriver/chromedriver --port=4444 & -# test_script: -# - cd $INTEGRATION_TEST_PATH/example/ -# - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome -# - name: build-apks+java-test+firebase-test-lab -# env: -# matrix: -# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" -# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" -# PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" -# PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" -# matrix: -# CHANNEL: "master" -# CHANNEL: "beta" -# CHANNEL: "stable" -# MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] -# GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] -# script: -# # TODO(jackson): Allow web plugins once supported on stable -# # https://github.com/flutter/flutter/issues/42864 -# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi -# - flutter channel $CHANNEL -# # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they -# # might include non-ASCII characters which makes Gradle crash. -# # See: https://github.com/flutter/flutter/issues/24935 -# # This is a temporary workaround until we figure how to properly configure -# # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). -# # TODO(amirh): Set the locale to UTF8. -# - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt -# - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt -# - export CIRRUS_CHANGE_MESSAGE="" -# - export CIRRUS_COMMIT_MESSAGE="" -# - ./script/incremental_build.sh build-examples --apk -# - ./script/incremental_build.sh java-test # must come after apk build -# - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then -# - echo "This user does not have permission to run Firebase Test Lab tests." -# - else -# - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json -# - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 -# - fi -# - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` -# - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` +task: + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' + container: + dockerfile: .ci/Dockerfile + cpu: 8 + memory: 16G + env: + INTEGRATION_TEST_PATH: "./packages/integration_test" + upgrade_script: + - flutter channel stable + - flutter upgrade + - flutter channel beta + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + submodules_script: + - git submodule init + - git submodule update + matrix: + - name: publishable + script: + - flutter channel master + - ./script/check_publish.sh + - name: format + install_script: + - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" + - sudo apt-get update + - sudo apt-get install -y --allow-unauthenticated clang-format-7 + format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 + - name: test + env: + matrix: + CHANNEL: "master" + CHANNEL: "beta" + CHANNEL: "stable" + test_script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/incremental_build.sh test + - name: analyze + env: + matrix: + CHANNEL: "master" + CHANNEL: "beta" + CHANNEL: "stable" + script: ./script/incremental_build.sh analyze + - name: build_all_plugins_apk + env: + matrix: + CHANNEL: "master" + CHANNEL: "beta" + CHANNEL: "stable" + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/build_all_plugins_app.sh apk + - name: integration_web_smoke_test + # Tests integration example test in web. + only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" + install_script: + - flutter config --enable-web + - git clone https://github.com/flutter/web_installers.git + - cd web_installers/packages/web_drivers/ + - pub get + - dart lib/web_driver_installer.dart chromedriver --install-only + - ./chromedriver/chromedriver --port=4444 & + test_script: + - cd $INTEGRATION_TEST_PATH/example/ + - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome + - name: build-apks+java-test+firebase-test-lab + env: + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + matrix: + CHANNEL: "master" + CHANNEL: "beta" + CHANNEL: "stable" + MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they + # might include non-ASCII characters which makes Gradle crash. + # See: https://github.com/flutter/flutter/issues/24935 + # This is a temporary workaround until we figure how to properly configure + # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). + # TODO(amirh): Set the locale to UTF8. + - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt + - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt + - export CIRRUS_CHANGE_MESSAGE="" + - export CIRRUS_COMMIT_MESSAGE="" + - ./script/incremental_build.sh build-examples --apk + - ./script/incremental_build.sh java-test # must come after apk build + - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then + - echo "This user does not have permission to run Firebase Test Lab tests." + - else + - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json + - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 + - fi + - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` + - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` -# task: -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' -# container: -# dockerfile: .ci/Dockerfile-LinuxDesktop -# cpu: 8 -# memory: 16G -# env: -# INTEGRATION_TEST_PATH: "./packages/integration_test" -# upgrade_script: -# - flutter channel stable -# - flutter upgrade -# - flutter channel beta -# - flutter upgrade -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# submodules_script: -# - git submodule init -# - git submodule update -# matrix: -# - name: build-linux+drive-examples -# install_script: -# - flutter config --enable-linux-desktop -# build_script: -# # TODO(stuartmorgan): Include stable once Linux is supported on stable. -# - flutter channel master -# - ./script/incremental_build.sh build-examples --linux -# - xvfb-run ./script/incremental_build.sh drive-examples --linux +task: + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' + container: + dockerfile: .ci/Dockerfile-LinuxDesktop + cpu: 8 + memory: 16G + env: + INTEGRATION_TEST_PATH: "./packages/integration_test" + upgrade_script: + - flutter channel stable + - flutter upgrade + - flutter channel beta + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + submodules_script: + - git submodule init + - git submodule update + matrix: + - name: build-linux+drive-examples + install_script: + - flutter config --enable-linux-desktop + build_script: + # TODO(stuartmorgan): Include stable once Linux is supported on stable. + - flutter channel master + - ./script/incremental_build.sh build-examples --linux + - xvfb-run ./script/incremental_build.sh drive-examples --linux task: # Xcode 12 task @@ -168,18 +168,18 @@ task: - xcrun simctl list - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot matrix: - # - name: build_all_plugins_ipa - # env: - # matrix: - # CHANNEL: "master" - # CHANNEL: "beta" - # CHANNEL: "stable" - # script: - # # TODO(jackson): Allow web plugins once supported on stable - # # https://github.com/flutter/flutter/issues/42864 - # - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - # - flutter channel $CHANNEL - # - ./script/build_all_plugins_app.sh ios --no-codesign + - name: build_all_plugins_ipa + env: + matrix: + CHANNEL: "master" + CHANNEL: "beta" + CHANNEL: "stable" + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/build_all_plugins_app.sh ios --no-codesign - name: build-ipas+drive-examples env: PATH: $PATH:/usr/local/bin @@ -202,67 +202,70 @@ task: - flutter upgrade - ./script/incremental_build.sh build-examples --ipa - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" + # `drive-examples` contains integration tests, which changes the UI of the application. + # This UI change sometimes affects `xctest`. + # So we run `drive-examples` after `xctest`, changing the order will result ci failure. - ./script/incremental_build.sh drive-examples --ios -# task: -# # Xcode 11 task -# # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' -# osx_instance: -# image: catalina-xcode-11.3.1-flutter -# upgrade_script: -# - sudo gem install cocoapods -# - flutter channel stable -# - flutter upgrade -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# submodules_script: -# - git submodule init -# - git submodule update -# create_simulator_script: -# - xcrun simctl list -# - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot -# matrix: -# - name: lint_darwin_plugins -# env: -# matrix: -# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" -# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" -# script: -# # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. -# - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm -# # Skip the dummy podspecs used to placate the tool. -# - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm -# - ./script/incremental_build.sh podspecs +task: + # Xcode 11 task + # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + osx_instance: + image: catalina-xcode-11.3.1-flutter + upgrade_script: + - sudo gem install cocoapods + - flutter channel stable + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + submodules_script: + - git submodule init + - git submodule update + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot + matrix: + - name: lint_darwin_plugins + env: + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" + script: + # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. + - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm + # Skip the dummy podspecs used to placate the tool. + - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm + - ./script/incremental_build.sh podspecs -# task: -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG .cirrus.yml== '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' -# osx_instance: -# image: big-sur-xcode-12.3 -# setup_script: -# - flutter config --enable-macos-desktop -# upgrade_script: -# - sudo gem install cocoapods -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# submodules_script: -# - git submodule init -# - git submodule update -# matrix: -# - name: build_all_plugins_app -# script: -# - flutter channel master -# - ./script/build_all_plugins_app.sh macos -# - name: build-apps+drive-examples -# env: -# PATH: $PATH:/usr/local/bin -# build_script: -# - flutter channel master -# - ./script/incremental_build.sh build-examples --macos --no-ipa -# - ./script/incremental_build.sh drive-examples --macos +task: + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG .cirrus.yml== '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + osx_instance: + image: big-sur-xcode-12.3 + setup_script: + - flutter config --enable-macos-desktop + upgrade_script: + - sudo gem install cocoapods + - flutter channel master + - flutter upgrade + - git fetch origin master + submodules_script: + - git submodule init + - git submodule update + matrix: + - name: build_all_plugins_app + script: + - flutter channel master + - ./script/build_all_plugins_app.sh macos + - name: build-apps+drive-examples + env: + PATH: $PATH:/usr/local/bin + build_script: + - flutter channel master + - ./script/incremental_build.sh build-examples --macos --no-ipa + - ./script/incremental_build.sh drive-examples --macos From 99425b8f9c8d6b1d55a4d83edb9205696fd64887 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 24 Feb 2021 13:44:35 -0800 Subject: [PATCH 21/22] review --- .cirrus.yml | 2 +- .../quick_actions/example/ios/RunnerUITests/RunnerUITests.m | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 78992f149c26..6b3614178b11 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -243,7 +243,7 @@ task: task: # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG .cirrus.yml== '' + only_if: $CIRRUS_TAG == '' use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' osx_instance: image: big-sur-xcode-12.3 diff --git a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m index 78fb2e3330a2..f78081b98a01 100644 --- a/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m +++ b/packages/quick_actions/example/ios/RunnerUITests/RunnerUITests.m @@ -21,14 +21,12 @@ - (void)setUp { - (void)testQuickAction { XCUIApplication *app = [[XCUIApplication alloc] init]; [app launch]; - os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCUIElement *actionsReady = app.otherElements[@"actions ready"]; if (![actionsReady waitForExistenceWithTimeout:kElementWaitingTime]) { os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); XCTFail(@"Failed due to not able to find the actionsReady in the app with %@ seconds", @(kElementWaitingTime)); } - os_log_error(OS_LOG_DEFAULT, "%@", app.debugDescription); [[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome]; From abf9ce0ea59db595d80e1e26a2ef329b96d6e776 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Wed, 24 Feb 2021 16:40:23 -0800 Subject: [PATCH 22/22] rerun ci