From 4c31e805e388eae7c3508aaa184cf4c6dc5ede91 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 15:29:58 -0800 Subject: [PATCH 001/120] Create deep link test runners for Android and iOS --- .github/workflows/pr_validation.yaml | 46 ++ .run/Example_ Deep Links.run.xml | 6 + melos_flutter_testing.iml | 5 +- .../example_deep_links/.gitignore | 45 ++ .../example_deep_links/.metadata | 33 + .../example_deep_links/README.md | 3 + .../example_deep_links/analysis_options.yaml | 28 + .../example_deep_links/android/.gitignore | 13 + .../android/app/build.gradle | 43 ++ .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 58 ++ .../deeplinks/example/MainActivity.kt | 5 + .../res/drawable-v21/launch_background.xml | 12 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 + .../app/src/main/res/values/styles.xml | 18 + .../app/src/profile/AndroidManifest.xml | 7 + .../example_deep_links/android/build.gradle | 18 + .../android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 5 + .../android/settings.gradle | 25 + .../apple_deep_links_hosting/.firebaserc | 15 + .../apple_deep_links_hosting/.gitignore | 69 ++ .../apple_deep_links_hosting/README.md | 23 + .../apple_deep_links_hosting/firebase.json | 22 + .../.well-known/apple-app-site-association | 25 + .../example_deep_links/ios/.gitignore | 34 + .../ios/Flutter/AppFrameworkInfo.plist | 26 + .../ios/Flutter/Debug.xcconfig | 1 + .../ios/Flutter/Release.xcconfig | 1 + .../ios/Runner.xcodeproj/project.pbxproj | 624 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 98 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../ios/Runner/AppDelegate.swift | 13 + .../AppIcon.appiconset/Contents.json | 122 ++++ .../Icon-App-1024x1024@1x.png | Bin 0 -> 10932 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 295 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 450 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 282 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 462 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 704 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 586 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 1674 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 762 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 1226 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 1418 bytes .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 5 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 ++ .../ios/Runner/Base.lproj/Main.storyboard | 26 + .../example_deep_links/ios/Runner/Info.plist | 49 ++ .../ios/Runner/Runner-Bridging-Header.h | 1 + .../ios/Runner/Runner.entitlements | 10 + .../ios/RunnerTests/RunnerTests.swift | 12 + .../example_deep_links/lib/main.dart | 129 ++++ .../example_deep_links/pubspec.lock | 560 ++++++++++++++++ .../example_deep_links/pubspec.yaml | 65 ++ .../test_driver/deep_link_android_test.dart | 42 ++ .../test_driver/deep_link_ios_test.dart | 42 ++ .../lib/flutter_test_runners.dart | 3 + .../src/deep_links/deep_links_android.dart | 192 ++++++ .../lib/src/deep_links/deep_links_ios.dart | 201 ++++++ .../lib/src/platform_comms/android/adb.dart | 108 +++ .../lib/src/platform_comms/ios/xcrun.dart | 108 +++ packages/flutter_test_runners/pubspec.yaml | 7 + pubspec.lock | 222 ++++++- pubspec.yaml | 1 - 84 files changed, 3363 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/pr_validation.yaml create mode 100644 .run/Example_ Deep Links.run.xml create mode 100644 packages/flutter_test_runners/example_deep_links/.gitignore create mode 100644 packages/flutter_test_runners/example_deep_links/.metadata create mode 100644 packages/flutter_test_runners/example_deep_links/README.md create mode 100644 packages/flutter_test_runners/example_deep_links/analysis_options.yaml create mode 100644 packages/flutter_test_runners/example_deep_links/android/.gitignore create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/build.gradle create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/debug/AndroidManifest.xml create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/AndroidManifest.xml create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/kotlin/com/flutterbountyhunters/deeplinks/example/MainActivity.kt create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/res/drawable/launch_background.xml create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/res/values-night/styles.xml create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/main/res/values/styles.xml create mode 100644 packages/flutter_test_runners/example_deep_links/android/app/src/profile/AndroidManifest.xml create mode 100644 packages/flutter_test_runners/example_deep_links/android/build.gradle create mode 100644 packages/flutter_test_runners/example_deep_links/android/gradle.properties create mode 100644 packages/flutter_test_runners/example_deep_links/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 packages/flutter_test_runners/example_deep_links/android/settings.gradle create mode 100644 packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/.firebaserc create mode 100644 packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/.gitignore create mode 100644 packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/README.md create mode 100644 packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/firebase.json create mode 100644 packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/public/.well-known/apple-app-site-association create mode 100644 packages/flutter_test_runners/example_deep_links/ios/.gitignore create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Flutter/AppFrameworkInfo.plist create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Flutter/Debug.xcconfig create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Flutter/Release.xcconfig create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/AppDelegate.swift create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Base.lproj/Main.storyboard create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Info.plist create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Runner-Bridging-Header.h create mode 100644 packages/flutter_test_runners/example_deep_links/ios/Runner/Runner.entitlements create mode 100644 packages/flutter_test_runners/example_deep_links/ios/RunnerTests/RunnerTests.swift create mode 100644 packages/flutter_test_runners/example_deep_links/lib/main.dart create mode 100644 packages/flutter_test_runners/example_deep_links/pubspec.lock create mode 100644 packages/flutter_test_runners/example_deep_links/pubspec.yaml create mode 100644 packages/flutter_test_runners/example_deep_links/test_driver/deep_link_android_test.dart create mode 100644 packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart create mode 100644 packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart create mode 100644 packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart create mode 100644 packages/flutter_test_runners/lib/src/platform_comms/android/adb.dart create mode 100644 packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml new file mode 100644 index 0000000..518b167 --- /dev/null +++ b/.github/workflows/pr_validation.yaml @@ -0,0 +1,46 @@ +name: Validate PR + +on: [pull_request, workflow_dispatch] + +jobs: + test_flutter-test-runners_deep-links_android: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./flutter_test_runners/example_deep_links + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: stable + + - name: Install Android SDK and launch emulator + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 34 + target: default + arch: x86_64 + profile: Pixel_8_API_34 + emulator-options: "-no-snapshot -no-boot-anim -camera-back none -camera-front none" # Emulator options (optional) + + - name: Wait for Emulator to Start + run: | + adb wait-for-device + adb shell input keyevent 82 # Unlock the emulator screen if it's locked + + - name: Install Flutter Dependencies + run: flutter pub get + + - name: Build Flutter App (Debug Mode) + # Must be debug mode so we can enable Flutter Driver. + run: flutter build apk --debug + + - name: Install App on Emulator + run: flutter install --debug + + - name: Run deep link tests + run: flutter test test_driver diff --git a/.run/Example_ Deep Links.run.xml b/.run/Example_ Deep Links.run.xml new file mode 100644 index 0000000..fe7fa30 --- /dev/null +++ b/.run/Example_ Deep Links.run.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/melos_flutter_testing.iml b/melos_flutter_testing.iml index 9681559..01e7ecf 100644 --- a/melos_flutter_testing.iml +++ b/melos_flutter_testing.iml @@ -4,9 +4,12 @@ + + + - + \ No newline at end of file diff --git a/packages/flutter_test_runners/example_deep_links/.gitignore b/packages/flutter_test_runners/example_deep_links/.gitignore new file mode 100644 index 0000000..79c113f --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/.gitignore @@ -0,0 +1,45 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/flutter_test_runners/example_deep_links/.metadata b/packages/flutter_test_runners/example_deep_links/.metadata new file mode 100644 index 0000000..556b647 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "17025dd88227cd9532c33fa78f5250d548d87e9a" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a + base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a + - platform: android + create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a + base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a + - platform: ios + create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a + base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/flutter_test_runners/example_deep_links/README.md b/packages/flutter_test_runners/example_deep_links/README.md new file mode 100644 index 0000000..3b05925 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/README.md @@ -0,0 +1,3 @@ +# Example: Deep Links +This app is configured for deep links so that `flutter_test_runner` deep link +verification tools can be validated. diff --git a/packages/flutter_test_runners/example_deep_links/analysis_options.yaml b/packages/flutter_test_runners/example_deep_links/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/packages/flutter_test_runners/example_deep_links/android/.gitignore b/packages/flutter_test_runners/example_deep_links/android/.gitignore new file mode 100644 index 0000000..55afd91 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/packages/flutter_test_runners/example_deep_links/android/app/build.gradle b/packages/flutter_test_runners/example_deep_links/android/app/build.gradle new file mode 100644 index 0000000..d38b7ef --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/app/build.gradle @@ -0,0 +1,43 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +android { + namespace = "com.flutterbountyhunters.deeplinks.example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 + } + + defaultConfig { + applicationId = "com.flutterbountyhunters.deeplinks.example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.debug + } + } +} + +flutter { + source = "../.." +} diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/debug/AndroidManifest.xml b/packages/flutter_test_runners/example_deep_links/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/AndroidManifest.xml b/packages/flutter_test_runners/example_deep_links/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f21c4cd --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/kotlin/com/flutterbountyhunters/deeplinks/example/MainActivity.kt b/packages/flutter_test_runners/example_deep_links/android/app/src/main/kotlin/com/flutterbountyhunters/deeplinks/example/MainActivity.kt new file mode 100644 index 0000000..1cdafcc --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/app/src/main/kotlin/com/flutterbountyhunters/deeplinks/example/MainActivity.kt @@ -0,0 +1,5 @@ +package com.flutterbountyhunters.deeplinks.example; + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/drawable/launch_background.xml b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/values-night/styles.xml b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/values/styles.xml b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/android/app/src/profile/AndroidManifest.xml b/packages/flutter_test_runners/example_deep_links/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/flutter_test_runners/example_deep_links/android/build.gradle b/packages/flutter_test_runners/example_deep_links/android/build.gradle new file mode 100644 index 0000000..d2ffbff --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/packages/flutter_test_runners/example_deep_links/android/gradle.properties b/packages/flutter_test_runners/example_deep_links/android/gradle.properties new file mode 100644 index 0000000..2597170 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/flutter_test_runners/example_deep_links/android/gradle/wrapper/gradle-wrapper.properties b/packages/flutter_test_runners/example_deep_links/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..7bb2df6 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/packages/flutter_test_runners/example_deep_links/android/settings.gradle b/packages/flutter_test_runners/example_deep_links/android/settings.gradle new file mode 100644 index 0000000..b9e43bd --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false +} + +include ":app" diff --git a/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/.firebaserc b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/.firebaserc new file mode 100644 index 0000000..6b945cd --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/.firebaserc @@ -0,0 +1,15 @@ +{ + "projects": { + "default": "flutter-bounty-hunters" + }, + "targets": { + "flutter-bounty-hunters": { + "hosting": { + "deeplinks-flutter-bounty-hunters": [ + "deeplinks-flutter-bounty-hunters" + ] + } + } + }, + "etags": {} +} \ No newline at end of file diff --git a/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/.gitignore b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/.gitignore new file mode 100644 index 0000000..b17f631 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/.gitignore @@ -0,0 +1,69 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +firebase-debug.log* +firebase-debug.*.log* + +# Firebase cache +.firebase/ + +# Firebase config + +# Uncomment this if you'd like others to create their own Firebase project. +# For a team working on the same Firebase project(s), it is recommended to leave +# it commented so all members can deploy to the same project(s) in .firebaserc. +# .firebaserc + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# dataconnect generated files +.dataconnect diff --git a/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/README.md b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/README.md new file mode 100644 index 0000000..da49598 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/README.md @@ -0,0 +1,23 @@ +# Apple Deep Link Hosting Website +This directory holds a website with the explicit purpose of hosting a +`apple-app-site-association` file, as required by Apple, to associate +an app with a Universal Link. + +This website defines an association for `deeplinks.flutterbountyhunters.com`, +which is used only by `example_deep_links` in this repository. This +association makes it possible for the FBH team to run the iOS deep link +tests locally, and (maybe) run them in CI. + +If you're not a member of the FBH team, you won't be able to run the deep +links in this example project, as-is. That's because you can't sign the app, +because you're not a member of our Apple developer organization. If you +want to run the iOS deep link code in this repository, you should do the following: + + 1. Change the example app iOS app bundle ID to one that you own, e.g., `com.mydomain.myapp`. + 2. Change the Universal Links in this repo to point to a domain you own, e.g., `https://myapp.mydomain.com`. + 3. (If not done already) Upload an `apple-app-site-association` file to the domain you own. + +### Hosting +This website is hosted on Firebase. This was chosen only because it was trivial +to setup, and the configuration can be saved in this directory. It doesn't generally +matter how the hosting is accomplished. diff --git a/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/firebase.json b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/firebase.json new file mode 100644 index 0000000..4497ded --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/firebase.json @@ -0,0 +1,22 @@ +{ + "hosting": { + "target": "deeplinks-flutter-bounty-hunters", + "public": "public", + "headers": [ + { + "source": ".well-known/apple-app-site-association", + "headers": [ + { + "key": "Content-Type", + "value": "application/json" + } + ] + } + ], + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } +} diff --git a/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/public/.well-known/apple-app-site-association b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/public/.well-known/apple-app-site-association new file mode 100644 index 0000000..5ce8221 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/apple_deep_links_hosting/public/.well-known/apple-app-site-association @@ -0,0 +1,25 @@ +{ + "applinks": { + "apps": [], + "details": [ + { + "appIDs": [ + "2X9AB296W2.com.flutterbountyhunters.deeplinks.example" + ], + "paths": [ + "*" + ], + "components": [ + { + "/": "/*" + } + ] + } + ] + }, + "webcredentials": { + "apps": [ + "2X9AB296W2.com.flutterbountyhunters.deeplinks.example" + ] + } +} \ No newline at end of file diff --git a/packages/flutter_test_runners/example_deep_links/ios/.gitignore b/packages/flutter_test_runners/example_deep_links/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Flutter/AppFrameworkInfo.plist b/packages/flutter_test_runners/example_deep_links/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..7c56964 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Flutter/Debug.xcconfig b/packages/flutter_test_runners/example_deep_links/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/flutter_test_runners/example_deep_links/ios/Flutter/Release.xcconfig b/packages/flutter_test_runners/example_deep_links/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..2378dfa --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,624 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 84F387BE2D1FE87400CD6E2C /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; 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 = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 84F387BE2D1FE87400CD6E2C /* Runner.entitlements */, + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 2X9AB296W2; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example.exampleDeepLinks.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example.exampleDeepLinks.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example.exampleDeepLinks.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 2X9AB296W2; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 2X9AB296W2; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..8e3ca5d --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/AppDelegate.swift b/packages/flutter_test_runners/example_deep_links/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..6266644 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..dc9ada4725e9b0ddb1deab583e5b5102493aa332 GIT binary patch literal 10932 zcmeHN2~<R zh`|8`A_PQ1nSu(UMFx?8j8PC!!VDphaL#`F42fd#7Vlc`zIE4n%Y~eiz4y1j|NDpi z?<@|pSJ-HM`qifhf@m%MamgwK83`XpBA<+azdF#2QsT{X@z0A9Bq>~TVErigKH1~P zRX-!h-f0NJ4Mh++{D}J+K>~~rq}d%o%+4dogzXp7RxX4C>Km5XEI|PAFDmo;DFm6G zzjVoB`@qW98Yl0Kvc-9w09^PrsobmG*Eju^=3f?0o-t$U)TL1B3;sZ^!++3&bGZ!o-*6w?;oOhf z=A+Qb$scV5!RbG+&2S}BQ6YH!FKb0``VVX~T$dzzeSZ$&9=X$3)_7Z{SspSYJ!lGE z7yig_41zpQ)%5dr4ff0rh$@ky3-JLRk&DK)NEIHecf9c*?Z1bUB4%pZjQ7hD!A0r-@NF(^WKdr(LXj|=UE7?gBYGgGQV zidf2`ZT@pzXf7}!NH4q(0IMcxsUGDih(0{kRSez&z?CFA0RVXsVFw3^u=^KMtt95q z43q$b*6#uQDLoiCAF_{RFc{!H^moH_cmll#Fc^KXi{9GDl{>%+3qyfOE5;Zq|6#Hb zp^#1G+z^AXfRKaa9HK;%b3Ux~U@q?xg<2DXP%6k!3E)PA<#4$ui8eDy5|9hA5&{?v z(-;*1%(1~-NTQ`Is1_MGdQ{+i*ccd96ab$R$T3=% zw_KuNF@vI!A>>Y_2pl9L{9h1-C6H8<)J4gKI6{WzGBi<@u3P6hNsXG=bRq5c+z;Gc3VUCe;LIIFDmQAGy+=mRyF++u=drBWV8-^>0yE9N&*05XHZpPlE zxu@?8(ZNy7rm?|<+UNe0Vs6&o?l`Pt>P&WaL~M&#Eh%`rg@Mbb)J&@DA-wheQ>hRV z<(XhigZAT z>=M;URcdCaiO3d^?H<^EiEMDV+7HsTiOhoaMX%P65E<(5xMPJKxf!0u>U~uVqnPN7T!X!o@_gs3Ct1 zlZ_$5QXP4{Aj645wG_SNT&6m|O6~Tsl$q?nK*)(`{J4b=(yb^nOATtF1_aS978$x3 zx>Q@s4i3~IT*+l{@dx~Hst21fR*+5}S1@cf>&8*uLw-0^zK(+OpW?cS-YG1QBZ5q! zgTAgivzoF#`cSz&HL>Ti!!v#?36I1*l^mkrx7Y|K6L#n!-~5=d3;K<;Zqi|gpNUn_ z_^GaQDEQ*jfzh;`j&KXb66fWEk1K7vxQIMQ_#Wu_%3 z4Oeb7FJ`8I>Px;^S?)}2+4D_83gHEq>8qSQY0PVP?o)zAv3K~;R$fnwTmI-=ZLK`= zTm+0h*e+Yfr(IlH3i7gUclNH^!MU>id$Jw>O?2i0Cila#v|twub21@e{S2v}8Z13( zNDrTXZVgris|qYm<0NU(tAPouG!QF4ZNpZPkX~{tVf8xY690JqY1NVdiTtW+NqyRP zZ&;T0ikb8V{wxmFhlLTQ&?OP7 z;(z*<+?J2~z*6asSe7h`$8~Se(@t(#%?BGLVs$p``;CyvcT?7Y!{tIPva$LxCQ&4W z6v#F*);|RXvI%qnoOY&i4S*EL&h%hP3O zLsrFZhv&Hu5tF$Lx!8(hs&?!Kx5&L(fdu}UI5d*wn~A`nPUhG&Rv z2#ixiJdhSF-K2tpVL=)5UkXRuPAFrEW}7mW=uAmtVQ&pGE-&az6@#-(Te^n*lrH^m@X-ftVcwO_#7{WI)5v(?>uC9GG{lcGXYJ~Q8q zbMFl7;t+kV;|;KkBW2!P_o%Czhw&Q(nXlxK9ak&6r5t_KH8#1Mr-*0}2h8R9XNkr zto5-b7P_auqTJb(TJlmJ9xreA=6d=d)CVbYP-r4$hDn5|TIhB>SReMfh&OVLkMk-T zYf%$taLF0OqYF?V{+6Xkn>iX@TuqQ?&cN6UjC9YF&%q{Ut3zv{U2)~$>-3;Dp)*(? zg*$mu8^i=-e#acaj*T$pNowo{xiGEk$%DusaQiS!KjJH96XZ-hXv+jk%ard#fu=@Q z$AM)YWvE^{%tDfK%nD49=PI|wYu}lYVbB#a7wtN^Nml@CE@{Gv7+jo{_V?I*jkdLD zJE|jfdrmVbkfS>rN*+`#l%ZUi5_bMS<>=MBDNlpiSb_tAF|Zy`K7kcp@|d?yaTmB^ zo?(vg;B$vxS|SszusORgDg-*Uitzdi{dUV+glA~R8V(?`3GZIl^egW{a919!j#>f` znL1o_^-b`}xnU0+~KIFLQ)$Q6#ym%)(GYC`^XM*{g zv3AM5$+TtDRs%`2TyR^$(hqE7Y1b&`Jd6dS6B#hDVbJlUXcG3y*439D8MrK!2D~6gn>UD4Imctb z+IvAt0iaW73Iq$K?4}H`7wq6YkTMm`tcktXgK0lKPmh=>h+l}Y+pDtvHnG>uqBA)l zAH6BV4F}v$(o$8Gfo*PB>IuaY1*^*`OTx4|hM8jZ?B6HY;F6p4{`OcZZ(us-RVwDx zUzJrCQlp@mz1ZFiSZ*$yX3c_#h9J;yBE$2g%xjmGF4ca z&yL`nGVs!Zxsh^j6i%$a*I3ZD2SoNT`{D%mU=LKaEwbN(_J5%i-6Va?@*>=3(dQy` zOv%$_9lcy9+(t>qohkuU4r_P=R^6ME+wFu&LA9tw9RA?azGhjrVJKy&8=*qZT5Dr8g--d+S8zAyJ$1HlW3Olryt`yE zFIph~Z6oF&o64rw{>lgZISC6p^CBer9C5G6yq%?8tC+)7*d+ib^?fU!JRFxynRLEZ zj;?PwtS}Ao#9whV@KEmwQgM0TVP{hs>dg(1*DiMUOKHdQGIqa0`yZnHk9mtbPfoLx zo;^V6pKUJ!5#n`w2D&381#5#_t}AlTGEgDz$^;u;-vxDN?^#5!zN9ngytY@oTv!nc zp1Xn8uR$1Z;7vY`-<*?DfPHB;x|GUi_fI9@I9SVRv1)qETbNU_8{5U|(>Du84qP#7 z*l9Y$SgA&wGbj>R1YeT9vYjZuC@|{rajTL0f%N@>3$DFU=`lSPl=Iv;EjuGjBa$Gw zHD-;%YOE@<-!7-Mn`0WuO3oWuL6tB2cpPw~Nvuj|KM@))ixuDK`9;jGMe2d)7gHin zS<>k@!x;!TJEc#HdL#RF(`|4W+H88d4V%zlh(7#{q2d0OQX9*FW^`^_<3r$kabWAB z$9BONo5}*(%kx zOXi-yM_cmB3>inPpI~)duvZykJ@^^aWzQ=eQ&STUa}2uT@lV&WoRzkUoE`rR0)`=l zFT%f|LA9fCw>`enm$p7W^E@U7RNBtsh{_-7vVz3DtB*y#*~(L9+x9*wn8VjWw|Q~q zKFsj1Yl>;}%MG3=PY`$g$_mnyhuV&~O~u~)968$0b2!Jkd;2MtAP#ZDYw9hmK_+M$ zb3pxyYC&|CuAbtiG8HZjj?MZJBFbt`ryf+c1dXFuC z0*ZQhBzNBd*}s6K_G}(|Z_9NDV162#y%WSNe|FTDDhx)K!c(mMJh@h87@8(^YdK$&d*^WQe8Z53 z(|@MRJ$Lk-&ii74MPIs80WsOFZ(NX23oR-?As+*aq6b?~62@fSVmM-_*cb1RzZ)`5$agEiL`-E9s7{GM2?(KNPgK1(+c*|-FKoy}X(D_b#etO|YR z(BGZ)0Ntfv-7R4GHoXp?l5g#*={S1{u-QzxCGng*oWr~@X-5f~RA14b8~B+pLKvr4 zfgL|7I>jlak9>D4=(i(cqYf7#318!OSR=^`xxvI!bBlS??`xxWeg?+|>MxaIdH1U~#1tHu zB{QMR?EGRmQ_l4p6YXJ{o(hh-7Tdm>TAX380TZZZyVkqHNzjUn*_|cb?T? zt;d2s-?B#Mc>T-gvBmQZx(y_cfkXZO~{N zT6rP7SD6g~n9QJ)8F*8uHxTLCAZ{l1Y&?6v)BOJZ)=R-pY=Y=&1}jE7fQ>USS}xP#exo57uND0i*rEk@$;nLvRB@u~s^dwRf?G?_enN@$t* zbL%JO=rV(3Ju8#GqUpeE3l_Wu1lN9Y{D4uaUe`g>zlj$1ER$6S6@{m1!~V|bYkhZA z%CvrDRTkHuajMU8;&RZ&itnC~iYLW4DVkP<$}>#&(`UO>!n)Po;Mt(SY8Yb`AS9lt znbX^i?Oe9r_o=?})IHKHoQGKXsps_SE{hwrg?6dMI|^+$CeC&z@*LuF+P`7LfZ*yr+KN8B4{Nzv<`A(wyR@!|gw{zB6Ha ziwPAYh)oJ(nlqSknu(8g9N&1hu0$vFK$W#mp%>X~AU1ay+EKWcFdif{% z#4!4aoVVJ;ULmkQf!ke2}3hqxLK>eq|-d7Ly7-J9zMpT`?dxo6HdfJA|t)?qPEVBDv z{y_b?4^|YA4%WW0VZd8C(ZgQzRI5(I^)=Ub`Y#MHc@nv0w-DaJAqsbEHDWG8Ia6ju zo-iyr*sq((gEwCC&^TYBWt4_@|81?=B-?#P6NMff(*^re zYqvDuO`K@`mjm_Jd;mW_tP`3$cS?R$jR1ZN09$YO%_iBqh5ftzSpMQQtxKFU=FYmP zeY^jph+g<4>YO;U^O>-NFLn~-RqlHvnZl2yd2A{Yc1G@Ga$d+Q&(f^tnPf+Z7serIU};17+2DU_f4Z z@GaPFut27d?!YiD+QP@)T=77cR9~MK@bd~pY%X(h%L={{OIb8IQmf-!xmZkm8A0Ga zQSWONI17_ru5wpHg3jI@i9D+_Y|pCqVuHJNdHUauTD=R$JcD2K_liQisqG$(sm=k9;L* z!L?*4B~ql7uioSX$zWJ?;q-SWXRFhz2Jt4%fOHA=Bwf|RzhwqdXGr78y$J)LR7&3T zE1WWz*>GPWKZ0%|@%6=fyx)5rzUpI;bCj>3RKzNG_1w$fIFCZ&UR0(7S?g}`&Pg$M zf`SLsz8wK82Vyj7;RyKmY{a8G{2BHG%w!^T|Njr!h9TO2LaP^_f22Q1=l$QiU84ao zHe_#{S6;qrC6w~7{y(hs-?-j?lbOfgH^E=XcSgnwW*eEz{_Z<_xN#0001NP)t-s|Ns9~ z#rXRE|M&d=0au&!`~QyF`q}dRnBDt}*!qXo`c{v z{Djr|@Adh0(D_%#_&mM$D6{kE_x{oE{l@J5@%H*?%=t~i_`ufYOPkAEn!pfkr2$fs z652Tz0001XNklqeeKN4RM4i{jKqmiC$?+xN>3Apn^ z0QfuZLym_5b<*QdmkHjHlj811{If)dl(Z2K0A+ekGtrFJb?g|wt#k#pV-#A~bK=OT ts8>{%cPtyC${m|1#B1A6#u!Q;umknL1chzTM$P~L002ovPDHLkV1lTfnu!1a literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..797d452e458972bab9d994556c8305db4c827017 GIT binary patch literal 406 zcmV;H0crk;P))>cdjpWt&rLJgVp-t?DREyuq1A%0Z4)6_WsQ7{nzjN zo!X zGXV)2i3kcZIL~_j>uIKPK_zib+3T+Nt3Mb&Br)s)UIaA}@p{wDda>7=Q|mGRp7pqY zkJ!7E{MNz$9nOwoVqpFb)}$IP24Wn2JJ=Cw(!`OXJBr45rP>>AQr$6c7slJWvbpNW z@KTwna6d?PP>hvXCcp=4F;=GR@R4E7{4VU^0p4F>v^#A|>07*qoM6N<$f*5nx ACIA2c literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..6ed2d933e1120817fe9182483a228007b18ab6ae GIT binary patch literal 450 zcmV;z0X_bSP)iGWQ_5NJQ_~rNh*z)}eT%KUb z`7gNk0#AwF^#0T0?hIa^`~Ck;!}#m+_uT050aTR(J!bU#|IzRL%^UsMS#KsYnTF*!YeDOytlP4VhV?b} z%rz_<=#CPc)tU1MZTq~*2=8~iZ!lSa<{9b@2Jl;?IEV8)=fG217*|@)CCYgFze-x? zIFODUIA>nWKpE+bn~n7;-89sa>#DR>TSlqWk*!2hSN6D~Qb#VqbP~4Fk&m`@1$JGr zXPIdeRE&b2Thd#{MtDK$px*d3-Wx``>!oimf%|A-&-q*6KAH)e$3|6JV%HX{Hig)k suLT-RhftRq8b9;(V=235Wa|I=027H2wCDra;{X5v07*qoM6N<$f;9x^2LJ#7 literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..4cd7b0099ca80c806f8fe495613e8d6c69460d76 GIT binary patch literal 282 zcmV+#0p(^bcu7P-R4C8Q z&e;xxFbF_Vrezo%_kH*OKhshZ6BFpG-Y1e10`QXJKbND7AMQ&cMj60B5TNObaZxYybcN07*qoM6N<$g3m;S%K!iX literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..fe730945a01f64a61e2235dbe3f45b08f7729182 GIT binary patch literal 462 zcmV;<0WtoGP)-}iV`2<;=$?g5M=KQbZ{F&YRNy7Nn@%_*5{gvDM0aKI4?ESmw z{NnZg)A0R`+4?NF_RZexyVB&^^ZvN!{I28tr{Vje;QNTz`dG&Jz0~Ek&f2;*Z7>B|cg}xYpxEFY+0YrKLF;^Q+-HreN0P{&i zK~zY`?b7ECf-n?@;d<&orQ*Q7KoR%4|C>{W^h6@&01>0SKS`dn{Q}GT%Qj_{PLZ_& zs`MFI#j-(>?bvdZ!8^xTwlY{qA)T4QLbY@j(!YJ7aXJervHy6HaG_2SB`6CC{He}f zHVw(fJWApwPq!6VY7r1w-Fs)@ox~N+q|w~e;JI~C4Vf^@d>Wvj=fl`^u9x9wd9 zR%3*Q+)t%S!MU_`id^@&Y{y7-r98lZX0?YrHlfmwb?#}^1b{8g&KzmkE(L>Z&)179 zp<)v6Y}pRl100G2FL_t(o!|l{-Q-VMg#&MKg7c{O0 z2wJImOS3Gy*Z2Qifdv~JYOp;v+U)a|nLoc7hNH;I$;lzDt$}rkaFw1mYK5_0Q(Sut zvbEloxON7$+HSOgC9Z8ltuC&0OSF!-mXv5caV>#bc3@hBPX@I$58-z}(ZZE!t-aOG zpjNkbau@>yEzH(5Yj4kZiMH32XI!4~gVXNnjAvRx;Sdg^`>2DpUEwoMhTs_st8pKG z(%SHyHdU&v%f36~uERh!bd`!T2dw;z6PrOTQ7Vt*#9F2uHlUVnb#ev_o^fh}Dzmq} zWtlk35}k=?xj28uO|5>>$yXadTUE@@IPpgH`gJ~Ro4>jd1IF|(+IX>8M4Ps{PNvmI zNj4D+XgN83gPt_Gm}`Ybv{;+&yu-C(Grdiahmo~BjG-l&mWM+{e5M1sm&=xduwgM9 z`8OEh`=F3r`^E{n_;%9weN{cf2%7=VzC@cYj+lg>+3|D|_1C@{hcU(DyQG_BvBWe? zvTv``=%b1zrol#=R`JB)>cdjpWt&rLJgVp-t?DREyuq1A%0Z4)6_WsQ7{nzjN zo!X zGXV)2i3kcZIL~_j>uIKPK_zib+3T+Nt3Mb&Br)s)UIaA}@p{wDda>7=Q|mGRp7pqY zkJ!7E{MNz$9nOwoVqpFb)}$IP24Wn2JJ=Cw(!`OXJBr45rP>>AQr$6c7slJWvbpNW z@KTwna6d?PP>hvXCcp=4F;=GR@R4E7{4VU^0p4F>v^#A|>07*qoM6N<$f*5nx ACIA2c literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..502f463a9bc882b461c96aadf492d1729e49e725 GIT binary patch literal 586 zcmV-Q0=4~#P)+}#`wDE{8-2Mebf5<{{PqV{TgVcv*r8?UZ3{-|G?_}T*&y;@cqf{ z{Q*~+qr%%p!1pS*_Uicl#q9lc(D`!D`LN62sNwq{oYw(Wmhk)k<@f$!$@ng~_5)Ru z0Z)trIA5^j{DIW^c+vT2%lW+2<(RtE2wR;4O@)Tm`Xr*?A(qYoM}7i5Yxw>D(&6ou zxz!_Xr~yNF+waPe00049Nkl*;a!v6h%{rlvIH#gW3s8p;bFr=l}mRqpW2h zw=OA%hdyL~z+UHOzl0eKhEr$YYOL-c-%Y<)=j?(bzDweB7{b+%_ypvm_cG{SvM=DK zhv{K@m>#Bw>2W$eUI#iU)Wdgs8Y3U+A$Gd&{+j)d)BmGKx+43U_!tik_YlN)>$7G! zhkE!s;%oku3;IwG3U^2kw?z+HM)jB{@zFhK8P#KMSytSthr+4!c(5c%+^UBn`0X*2 zy3(k600_CSZj?O$Qu%&$;|TGUJrptR(HzyIx>5E(2r{eA(<6t3e3I0B)7d6s7?Z5J zZ!rtKvA{MiEBm&KFtoifx>5P^Z=vl)95XJn()aS5%ad(s?4-=Tkis9IGu{`Fy8r+H07*qoM6N<$f20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0ec303439225b78712f49115768196d8d76f6790 GIT binary patch literal 862 zcmV-k1EKthP)20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f5fea27c705180eb716271f41b582e76dcbd90 GIT binary patch literal 1674 zcmV;526g#~P){YQnis^a@{&-nmRmq)<&%Mztj67_#M}W?l>kYSliK<%xAp;0j{!}J0!o7b zE>q9${Lb$D&h7k=+4=!ek^n+`0zq>LL1O?lVyea53S5x`Nqqo2YyeuIrQrJj9XjOp z{;T5qbj3}&1vg1VK~#9!?b~^C5-}JC@Pyrv-6dSEqJqT}#j9#dJ@GzT@B8}x zU&J@bBI>f6w6en+CeI)3^kC*U?}X%OD8$Fd$H&LV$H&LV$H&LV#|K5~mLYf|VqzOc zkc7qL~0sOYuM{tG`rYEDV{DWY`Z8&)kW*hc2VkBuY+^Yx&92j&StN}Wp=LD zxoGxXw6f&8sB^u})h@b@z0RBeD`K7RMR9deyL(ZJu#39Z>rT)^>v}Khq8U-IbIvT> z?4pV9qGj=2)TNH3d)=De<+^w;>S7m_eFKTvzeaBeir45xY!^m!FmxnljbSS_3o=g( z->^wC9%qkR{kbGnW8MfFew_o9h3(r55Is`L$8KI@d+*%{=Nx+FXJ98L0PjFIu;rGnnfY zn1R5Qnp<{Jq0M1vX=X&F8gtLmcWv$1*M@4ZfF^9``()#hGTeKeP`1!iED ztNE(TN}M5}3Bbc*d=FIv`DNv&@|C6yYj{sSqUj5oo$#*0$7pu|Dd2TLI>t5%I zIa4Dvr(iayb+5x=j*Vum9&irk)xV1`t509lnPO0%skL8_1c#Xbamh(2@f?4yUI zhhuT5<#8RJhGz4%b$`PJwKPAudsm|at?u;*hGgnA zU1;9gnxVBC)wA(BsB`AW54N{|qmikJR*%x0c`{LGsSfa|NK61pYH(r-UQ4_JXd!Rsz)=k zL{GMc5{h138)fF5CzHEDM>+FqY)$pdN3}Ml+riTgJOLN0F*Vh?{9ESR{SVVg>*>=# zix;VJHPtvFFCRY$Ks*F;VX~%*r9F)W`PmPE9F!(&s#x07n2<}?S{(ygpXgX-&B&OM zONY&BRQ(#%0%jeQs?oJ4P!p*R98>qCy5p8w>_gpuh39NcOlp)(wOoz0sY-Qz55eB~ z7OC-fKBaD1sE3$l-6QgBJO!n?QOTza`!S_YK z_v-lm^7{VO^8Q@M_^8F)09Ki6%=s?2_5eupee(w1FB%aqSweusQ-T+CH0Xt{` zFjMvW{@C&TB)k25()nh~_yJ9coBRL(0oO@HK~z}7?bm5j;y@69;bvlHb2tf!$ReA~x{22wTq550 z?f?Hnw(;m3ip30;QzdV~7pi!wyMYhDtXW#cO7T>|f=bdFhu+F!zMZ2UFj;GUKX7tI z;hv3{q~!*pMj75WP_c}>6)IWvg5_yyg<9Op()eD1hWC19M@?_9_MHec{Z8n3FaF{8 z;u`Mw0ly(uE>*CgQYv{be6ab2LWhlaH1^iLIM{olnag$78^Fd}%dR7;JECQ+hmk|o z!u2&!3MqPfP5ChDSkFSH8F2WVOEf0(E_M(JL17G}Y+fg0_IuW%WQ zG(mG&u?|->YSdk0;8rc{yw2@2Z&GA}z{Wb91Ooz9VhA{b2DYE7RmG zjL}?eq#iX%3#k;JWMx_{^2nNax`xPhByFiDX+a7uTGU|otOvIAUy|dEKkXOm-`aWS z27pUzD{a)Ct<6p{{3)+lq@i`t@%>-wT4r?*S}k)58e09WZYP0{{R3FC5Sl00039P)t-s|Ns9~ z#rP?<_5oL$Q^olD{r_0T`27C={r>*`|Nj71npVa5OTzc(_WfbW_({R{p56NV{r*M2 z_xt?)2V0#0NsfV0u>{42ctGP(8vQj-Btk1n|O0ZD=YLwd&R{Ko41Gr9H= zY@z@@bOAMB5Ltl$E>bJJ{>JP30ZxkmI%?eW{k`b?Wy<&gOo;dS`~CR$Vwb@XWtR|N zi~t=w02?-0&j0TD{>bb6sNwsK*!p?V`RMQUl(*DVjk-9Cx+-z1KXab|Ka2oXhX5f% z`$|e!000AhNklrxs)5QTeTVRiEmz~MKK1WAjCw(c-JK6eox;2O)?`? zTG`AHia671e^vgmp!llKp|=5sVHk#C7=~epA~VAf-~%aPC=%Qw01h8mnSZ|p?hz91 z7p83F3%LVu9;S$tSI$C^%^yud1dfTM_6p2|+5Ejp$bd`GDvbR|xit>i!ZD&F>@CJrPmu*UjD&?DfZs=$@e3FQA(vNiU+$A*%a} z?`XcG2jDxJ_ZQ#Md`H{4Lpf6QBDp81_KWZ6Tk#yCy1)32zO#3<7>b`eT7UyYH1eGz z;O(rH$=QR*L%%ZcBpc=eGua?N55nD^K(8<#gl2+pN_j~b2MHs4#mcLmv%DkspS-3< zpI1F=^9siI0s-;IN_IrA;5xm~3?3!StX}pUv0vkxMaqm+zxrg7X7(I&*N~&dEd0kD z-FRV|g=|QuUsuh>-xCI}vD2imzYIOIdcCVV=$Bz@*u0+Bs<|L^)32nN*=wu3n%Ynw z@1|eLG>!8ruU1pFXUfb`j>(=Gy~?Rn4QJ-c3%3T|(Frd!bI`9u&zAnyFYTqlG#&J7 zAkD(jpw|oZLNiA>;>hgp1KX7-wxC~31II47gc zHcehD6Uxlf%+M^^uN5Wc*G%^;>D5qT{>=uxUhX%WJu^Z*(_Wq9y}npFO{Hhb>s6<9 zNi0pHXWFaVZnb)1+RS&F)xOv6&aeILcI)`k#0YE+?e)5&#r7J#c`3Z7x!LpTc01dx zrdC3{Z;joZ^KN&))zB_i)I9fWedoN>Zl-6_Iz+^G&*ak2jpF07*qoM6N<$f;w%0(f|Me literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0467bf12aa4d28f374bb26596605a46dcbb3e7c8 GIT binary patch literal 1418 zcmV;51$Fv~P)q zKfU)WzW*n(@|xWGCA9ScMt*e9`2kdxPQ&&>|-UCa7_51w+ zLUsW@ZzZSW0y$)Hp~e9%PvP|a03ks1`~K?q{u;6NC8*{AOqIUq{CL&;p56Lf$oQGq z^={4hPQv)y=I|4n+?>7Fim=dxt1 z2H+Dm+1+fh+IF>G0SjJMkQQre1x4|G*Z==(Ot&kCnUrL4I(rf(ucITwmuHf^hXiJT zkdTm&kdTm&kdTm&kdP`esgWG0BcWCVkVZ&2dUwN`cgM8QJb`Z7Z~e<&Yj2(}>Tmf` zm1{eLgw!b{bXkjWbF%dTkTZEJWyWOb##Lfw4EK2}<0d6%>AGS{po>WCOy&f$Tay_> z?NBlkpo@s-O;0V%Y_Xa-G#_O08q5LR*~F%&)}{}r&L%Sbs8AS4t7Y0NEx*{soY=0MZExqA5XHQkqi#4gW3 zqODM^iyZl;dvf)-bOXtOru(s)Uc7~BFx{w-FK;2{`VA?(g&@3z&bfLFyctOH!cVsF z7IL=fo-qBndRUm;kAdXR4e6>k-z|21AaN%ubeVrHl*<|s&Ax@W-t?LR(P-24A5=>a z*R9#QvjzF8n%@1Nw@?CG@6(%>+-0ASK~jEmCV|&a*7-GKT72W<(TbSjf)&Eme6nGE z>Gkj4Sq&2e+-G%|+NM8OOm5zVl9{Z8Dd8A5z3y8mZ=4Bv4%>as_{9cN#bm~;h>62( zdqY93Zy}v&c4n($Vv!UybR8ocs7#zbfX1IY-*w~)p}XyZ-SFC~4w>BvMVr`dFbelV{lLL0bx7@*ZZdebr3`sP;? zVImji)kG)(6Juv0lz@q`F!k1FE;CQ(D0iG$wchPbKZQELlsZ#~rt8#90Y_Xh&3U-< z{s<&cCV_1`^TD^ia9!*mQDq& zn2{r`j};V|uV%_wsP!zB?m%;FeaRe+X47K0e+KE!8C{gAWF8)lCd1u1%~|M!XNRvw zvtqy3iz0WSpWdhn6$hP8PaRBmp)q`#PCA`Vd#Tc$@f1tAcM>f_I@bC)hkI9|o(Iqv zo}Piadq!j76}004RBio<`)70k^`K1NK)q>w?p^C6J2ZC!+UppiK6&y3Kmbv&O!oYF z34$0Z;QO!JOY#!`qyGH<3Pd}Pt@q*A0V=3SVtWKRR8d8Z&@)3qLPA19LPA19LPEUC YUoZo%k(ykuW&i*H07*qoM6N<$f+CH{y8r+H literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/flutter_test_runners/example_deep_links/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Base.lproj/Main.storyboard b/packages/flutter_test_runners/example_deep_links/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Info.plist b/packages/flutter_test_runners/example_deep_links/ios/Runner/Info.plist new file mode 100644 index 0000000..9fa709d --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Example Deep Links + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + example_deep_links + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Runner-Bridging-Header.h b/packages/flutter_test_runners/example_deep_links/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner/Runner.entitlements b/packages/flutter_test_runners/example_deep_links/ios/Runner/Runner.entitlements new file mode 100644 index 0000000..c16c78e --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner/Runner.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.developer.associated-domains + + applinks:deeplinks.flutterbountyhunters.com + + + diff --git a/packages/flutter_test_runners/example_deep_links/ios/RunnerTests/RunnerTests.swift b/packages/flutter_test_runners/example_deep_links/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/packages/flutter_test_runners/example_deep_links/lib/main.dart b/packages/flutter_test_runners/example_deep_links/lib/main.dart new file mode 100644 index 0000000..cf26659 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/lib/main.dart @@ -0,0 +1,129 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_driver/driver_extension.dart'; +import 'package:go_router/go_router.dart'; + +void main() { + enableFlutterDriverExtension(); + + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + @override + Widget build(BuildContext context) { + return MaterialApp.router( + title: 'Flutter Demo', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + routerConfig: router, + ); + } +} + +final router = GoRouter( + routes: [ + GoRoute( + path: '/', + builder: (_, __) => Scaffold( + appBar: AppBar(title: const Text('Home Screen')), + ), + routes: [ + GoRoute( + path: 'signup', + builder: (_, __) => Scaffold( + appBar: AppBar(title: const Text('Sign Up')), + ), + ), + GoRoute( + path: 'user/profile', + builder: (_, __) => Scaffold( + appBar: AppBar(title: const Text('User Profile')), + ), + ), + ], + ), + ], +); + +class MyHomePage extends StatefulWidget { + const MyHomePage({super.key, required this.title}); + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int _counter = 0; + + void _incrementCounter() { + setState(() { + // This call to setState tells the Flutter framework that something has + // changed in this State, which causes it to rerun the build method below + // so that the display can reflect the updated values. If we changed + // _counter without calling setState(), then the build method would not be + // called again, and so nothing would appear to happen. + _counter++; + }); + } + + @override + Widget build(BuildContext context) { + // This method is rerun every time setState is called, for instance as done + // by the _incrementCounter method above. + // + // The Flutter framework has been optimized to make rerunning build methods + // fast, so that you can just rebuild anything that needs updating rather + // than having to individually change instances of widgets. + return Scaffold( + appBar: AppBar( + // TRY THIS: Try changing the color here to a specific color (to + // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar + // change color while the other colors stay the same. + backgroundColor: Theme.of(context).colorScheme.inversePrimary, + // Here we take the value from the MyHomePage object that was created by + // the App.build method, and use it to set our appbar title. + title: Text(widget.title), + ), + body: Center( + // Center is a layout widget. It takes a single child and positions it + // in the middle of the parent. + child: Column( + // Column is also a layout widget. It takes a list of children and + // arranges them vertically. By default, it sizes itself to fit its + // children horizontally, and tries to be as tall as its parent. + // + // Column has various properties to control how it sizes itself and + // how it positions its children. Here we use mainAxisAlignment to + // center the children vertically; the main axis here is the vertical + // axis because Columns are vertical (the cross axis would be + // horizontal). + // + // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" + // action in the IDE, or press "p" in the console), to see the + // wireframe for each widget. + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text( + 'You have pushed the button this many times:', + ), + Text( + '$_counter', + style: Theme.of(context).textTheme.headlineMedium, + ), + ], + ), + ), + floatingActionButton: FloatingActionButton( + onPressed: _incrementCounter, + tooltip: 'Increment', + child: const Icon(Icons.add), + ), // This trailing comma makes auto-formatting nicer for build methods. + ); + } +} diff --git a/packages/flutter_test_runners/example_deep_links/pubspec.lock b/packages/flutter_test_runners/example_deep_links/pubspec.lock new file mode 100644 index 0000000..f999e31 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/pubspec.lock @@ -0,0 +1,560 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" + url: "https://pub.dev" + source: hosted + version: "76.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.3" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" + url: "https://pub.dev" + source: hosted + version: "6.11.0" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + url: "https://pub.dev" + source: hosted + version: "1.19.0" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 + url: "https://pub.dev" + source: hosted + version: "1.11.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_test_runners: + dependency: "direct dev" + description: + path: ".." + relative: true + source: path + version: "0.0.4" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + go_router: + dependency: "direct main" + description: + name: go_router + sha256: "2fd11229f59e23e967b0775df8d5948a519cd7e1e8b6e849729e010587b46539" + url: "https://pub.dev" + source: hosted + version: "14.6.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" + source: hosted + version: "3.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360" + url: "https://pub.dev" + source: hosted + version: "4.1.1" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + url: "https://pub.dev" + source: hosted + version: "10.0.7" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" + url: "https://pub.dev" + source: hosted + version: "0.1.3-main.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + process: + dependency: transitive + description: + name: process + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + shelf: + dependency: transitive + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" + source: hosted + version: "1.4.2" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" + url: "https://pub.dev" + source: hosted + version: "0.10.13" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: "direct dev" + description: + name: test + sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f" + url: "https://pub.dev" + source: hosted + version: "1.25.8" + test_api: + dependency: transitive + description: + name: test_api + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + url: "https://pub.dev" + source: hosted + version: "0.7.3" + test_core: + dependency: transitive + description: + name: test_core + sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d" + url: "https://pub.dev" + source: hosted + version: "0.6.5" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + url: "https://pub.dev" + source: hosted + version: "14.3.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + url: "https://pub.dev" + source: hosted + version: "3.0.4" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" +sdks: + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/packages/flutter_test_runners/example_deep_links/pubspec.yaml b/packages/flutter_test_runners/example_deep_links/pubspec.yaml new file mode 100644 index 0000000..b21a890 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/pubspec.yaml @@ -0,0 +1,65 @@ +name: example_deep_links +description: "Example app for testing deep links." +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +version: 1.0.0+1 + +environment: + sdk: ^3.6.0 + +dependencies: + flutter: + sdk: flutter + flutter_driver: + sdk: flutter + + cupertino_icons: ^1.0.8 + go_router: ^14.6.2 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + + test: any + + flutter_test_runners: + path: ../ + +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/to/resolution-aware-images + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/to/asset-from-package + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/to/font-from-package diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_android_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_android_test.dart new file mode 100644 index 0000000..e3d16a2 --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_android_test.dart @@ -0,0 +1,42 @@ +import 'package:flutter_driver/flutter_driver.dart'; +import 'package:flutter_test_runners/flutter_test_runners.dart'; +import 'package:test/test.dart'; + +void main() { + const appPackage = "com.flutterbountyhunters.deeplinks.example"; + + // Command you can use to directly check a deep link: + // adb shell am start -W -a android.intent.action.VIEW -d "app://deeplinks.flutterbountyhunters.com/user/profile" com.flutterbountyhunters.deeplinks.example + + group("Deep link launches app > Android >", () { + testDeepLinkAndroidAppLaunch( + "home screen", + appPackage: appPackage, + deepLink: "app://deeplinks.flutterbountyhunters.com", + (driver) async { + await driver.waitFor(find.text("Home Screen")); + await Future.delayed(const Duration(seconds: 3)); + }, + ); + + testDeepLinkAndroidAppLaunch( + "sign-up screen", + appPackage: appPackage, + deepLink: "app://deeplinks.flutterbountyhunters.com/signup", + (driver) async { + await driver.waitFor(find.text("Sign Up")); + await Future.delayed(const Duration(seconds: 3)); + }, + ); + + testDeepLinkAndroidAppLaunch( + "profile screen", + appPackage: appPackage, + deepLink: "app://deeplinks.flutterbountyhunters.com/user/profile", + (driver) async { + await driver.waitFor(find.text("User Profile")); + await Future.delayed(const Duration(seconds: 3)); + }, + ); + }); +} diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart new file mode 100644 index 0000000..289a38d --- /dev/null +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -0,0 +1,42 @@ +import 'package:flutter_driver/flutter_driver.dart'; +import 'package:flutter_test_runners/flutter_test_runners.dart'; +import 'package:test/test.dart'; + +void main() { + const appBundleId = "com.flutterbountyhunters.deeplinks.example"; + + // Command you can use to directly check a Universal Link: + // xcrun simctl openurl booted https://deeplinks.flutterbountyhunters.com + + group("Deep link launches app > iOS >", () { + testDeepLinkIosAppLaunch( + "home screen", + appBundleId: appBundleId, + deepLink: "https://deeplinks.flutterbountyhunters.com", + (driver) async { + await driver.waitFor(find.text("Home Screen")); + await Future.delayed(const Duration(seconds: 3)); + }, + ); + + testDeepLinkIosAppLaunch( + "sign-up screen", + appBundleId: appBundleId, + deepLink: "https://deeplinks.flutterbountyhunters.com/signup", + (driver) async { + await driver.waitFor(find.text("Sign Up")); + await Future.delayed(const Duration(seconds: 3)); + }, + ); + + testDeepLinkIosAppLaunch( + "profile screen", + appBundleId: appBundleId, + deepLink: "https://deeplinks.flutterbountyhunters.com/user/profile", + (driver) async { + await driver.waitFor(find.text("User Profile")); + await Future.delayed(const Duration(seconds: 3)); + }, + ); + }); +} diff --git a/packages/flutter_test_runners/lib/flutter_test_runners.dart b/packages/flutter_test_runners/lib/flutter_test_runners.dart index 53a51c8..6655eaa 100644 --- a/packages/flutter_test_runners/lib/flutter_test_runners.dart +++ b/packages/flutter_test_runners/lib/flutter_test_runners.dart @@ -2,3 +2,6 @@ library flutter_test_runners; export 'src/platform_messages.dart'; export 'src/platform_runners.dart'; + +export 'src/deep_links/deep_links_android.dart'; +export 'src/deep_links/deep_links_ios.dart'; diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart new file mode 100644 index 0000000..2138581 --- /dev/null +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart @@ -0,0 +1,192 @@ +import 'dart:convert'; + +import 'package:flutter_driver/flutter_driver.dart'; +import 'package:flutter_test_runners/src/platform_comms/android/adb.dart'; +import 'package:logging/logging.dart'; +import 'package:test/test.dart'; +import 'package:vm_service/vm_service.dart'; +import 'package:vm_service/vm_service_io.dart'; + +/// A test that runs after launching the Android app with the given +/// [appPackage], with the given [deepLink]. +/// +/// The test implementation is defined by the caller within [testRunner]. +/// The [testRunner] works the same way as a typical `test()` callback, +/// except that the [testRunner] is given a [FlutterDriver] to inspect +/// the app. +/// +/// Tests that launch apps with deep links must use a [FlutterDriver], +/// instead of a [WidgetTester], because [WidgetTester]s require building +/// and launching the app with instrumentation. Launching an app with a +/// deep link doesn't have instrumentation. Instead, the host machine +/// users the [FlutterDriver] to talk to the running app. +void testDeepLinkAndroidAppLaunch( + String description, + Future Function(FlutterDriver driver) testRunner, { + required String appPackage, + required String deepLink, + bool verbose = false, +}) { + test(description, () async { + _initLogs(verbose); + _log.info("Running deep link test driver..."); + + // Pre-emptively the kill the app, in case it's already running. + await Adb.killApp(appPackage); + + late final FlutterDriver? driver; + addTearDown(() async { + _log.info("Cleaning up after the test"); + // Dispose the FlutterDriver connection. + driver?.serviceClient.dispose(); + + // Kill the app when we're done. + await Adb.killApp(appPackage); + }); + + // Ensure the app isn't running yet. + expect(await Adb.isAppRunning(appPackage), isFalse); + + // Clear previous logcat messages so we don't try to connect to a previous + // Dart VM service listing. + await Adb.clearLogcat(); + + // Listen to logcat to find the Dart VM service for the running app. + String? dartVmService; + await Adb.listenToAdbForFlutterLogs(onLog: (data) { + if (data.contains("Dart VM service")) { + _log.info("Found Dart VM log:\n$data"); + + final regex = RegExp(r'.*Dart VM service.*(http[s]?://[^\s]+)'); + final httpUrl = Uri.parse(regex.firstMatch(data)!.group(1)!); + + dartVmService = Uri(scheme: "ws", host: httpUrl.host, port: httpUrl.port, path: "${httpUrl.path}ws").toString(); + } + }, onError: (error) { + _log.shout("LOGCAT ERROR:"); + _log.shout(error); + }); + + // Send the deep link. + await Adb.launchAppWithDeepLink(appPackage: appPackage, deepLink: deepLink); + + // Wait until the deep link launches the app. + final isAppRunning = await Adb.waitForAppToLaunch(appPackage); + expect( + isAppRunning, + isTrue, + reason: "The app never launched after sending the deeplink. Package: $appPackage, Deeplink: $deepLink", + ); + + // Wait for a moment so that the app has time to start the Dart VM + // service and report it in the ADB logs. + _log.info("Waiting a moment so that app can launch the Dart VM service."); + await Future.delayed(const Duration(seconds: 1)); + + // Ensure that we found the Dart VM service URL. + expect( + dartVmService, + isNotNull, + reason: "Couldn't find the Dart VM service for the app that was launched with a deep link.", + ); + expect( + dartVmService, + isNotEmpty, + reason: "Couldn't find the Dart VM service for the app that was launched with a deep link.", + ); + + // Setup port forwarding between the host machine running the test, and the + // Android device that's running the app, so we can talk to the Dart VM service. + final port = Uri.parse(dartVmService!).port; + await Adb.forwardTcpPort(port); + + // Connect to the Dart VM service in the app with Flutter Driver. + try { + driver = await FlutterDriver.connect( + dartVmServiceUrl: dartVmService, + ); + } catch (exception) { + if (verbose) { + await _logVmDetailsAfterConnectionFailure(dartVmService!); + } + + throw TestFailure( + "Couldn't connect FlutterDriver to the app's Dart VM service (the app successfully launched with the deep link, though)", + ); + } + + // Run the test. + await testRunner(driver); + }); +} + +Future _logVmDetailsAfterConnectionFailure(String dartVmService) async { + _log.warning("Failed to connect to the FlutterDriver!"); + + // Connect to the Dart VM service to query info. + late final VmService vmService; + try { + vmService = await vmServiceConnectUri(dartVmService); + } catch (exception) { + _log.warning("Tried to connect to the Dart VM service to provide more details, but we couldn't connect to it."); + _log.warning(exception); + return; + } + + // Get the VM. + late final VM vm; + try { + vm = await vmService.getVM(); + } catch (exception) { + _log.warning("Tried to get the VM from the Dart VM service, but we failed to query it."); + _log.warning(exception); + return; + } + + _log.info(''' +Additional VM service info: + - name: ${vm.name} + - type: ${vm.type} + - host CPU: ${vm.hostCPU} + - target CPU: ${vm.targetCPU} + - OS: ${vm.operatingSystem} + - PID: ${vm.pid} +'''); + + if (vm.isolates != null) { + _log.info("Isolates attached to the Dart VM service:"); + for (final remoteIsolate in vm.isolates!) { + late final Isolate isolate; + try { + isolate = await vmService.getIsolate(remoteIsolate.id!); + } catch (exception) { + _log.warning("Tried to load isolate data for '${remoteIsolate.id}', but failed."); + continue; + } + + _log.info('''Isolate: + - ID: ${isolate.id} + - name: ${isolate.name} + - type: ${isolate.type} + - is system isolate: ${isolate.isSystemIsolate} + - registered extensions: + + ${isolate.extensionRPCs} +'''); + } + } +} + +void _initLogs(bool writeLogs) { + if (!writeLogs) { + return; + } + + Logger.root.level = Level.ALL; + Logger.root.onRecord.listen((record) { + // ignore: avoid_print + print('${record.level.name}: ${record.time}: ${record.message}'); + }); +} + +final _log = Logger("flutter_test_runners.deep_links"); diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart new file mode 100644 index 0000000..aca1319 --- /dev/null +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -0,0 +1,201 @@ +import 'package:flutter_driver/flutter_driver.dart'; +import 'package:flutter_test_runners/src/platform_comms/ios/xcrun.dart'; +import 'package:logging/logging.dart'; +import 'package:test/test.dart'; +import 'package:vm_service/vm_service.dart'; +import 'package:vm_service/vm_service_io.dart'; + +/// A test that runs after launching the iOS app with the given +/// [appBundleId], with the given [deepLink]. +/// +/// The test implementation is defined by the caller within [testRunner]. +/// The [testRunner] works the same way as a typical `test()` callback, +/// except that the [testRunner] is given a [FlutterDriver] to inspect +/// the app. +/// +/// Tests that launch apps with deep links must use a [FlutterDriver], +/// instead of a [WidgetTester], because [WidgetTester]s require building +/// and launching the app with instrumentation. Launching an app with a +/// deep link doesn't have instrumentation. Instead, the host machine +/// users the [FlutterDriver] to talk to the running app. +void testDeepLinkIosAppLaunch( + String description, + Future Function(FlutterDriver driver) testRunner, { + required String appBundleId, + required String deepLink, + bool verbose = false, +}) { + test(description, () async { + _initLogs(verbose); + _log.info("Running deep link test driver..."); + + // Pre-emptively the kill the app, in case it's already running. + await Xcrun.killApp(appBundleId); + + FlutterDriver? driver; + addTearDown(() async { + _log.info("Cleaning up after the test"); + // Dispose the FlutterDriver connection. + driver?.serviceClient.dispose(); + + // Kill the app when we're done. + await Xcrun.killApp(appBundleId); + }); + + // Ensure the app isn't running yet. + expect(await Xcrun.isAppRunning(appBundleId), isFalse); + _log.info("We've verified the app isn't running"); + + // Clear previous logcat messages so we don't try to connect to a previous + // Dart VM service listing. + await Xcrun.clearLogcat(); + _log.info("We've cleared old logs"); + + // Listen to iOS logs to find the Dart VM service for the running app. + String? dartVmService; + await Xcrun.listenToXcrunForFlutterLogs( + appBundleId, + onLog: (log) { + _log.info(log); + if (log.contains("Dart VM service")) { + _log.info("Found Dart VM log:\n$log"); + + final regex = RegExp(r'.*Dart VM service.*(http[s]?://[^\s]+)'); + final httpUrl = Uri.parse(regex.firstMatch(log)!.group(1)!); + + dartVmService = + Uri(scheme: "ws", host: httpUrl.host, port: httpUrl.port, path: "${httpUrl.path}ws").toString(); + } + }, + onError: (error) { + _log.shout("LOGCAT ERROR:"); + _log.shout(error); + }, + ); + _log.info("We're now listening to logs and errors from iOS"); + + // Send the deep link. + _log.info("Sending the deep link: $deepLink"); + await Xcrun.launchAppWithUniversalLink(universalLink: deepLink); + + // Wait until the deep link launches the app. + _log.info("Waiting for app to launch: $appBundleId"); + final isAppRunning = await Xcrun.waitForAppToLaunch(appBundleId); + expect( + isAppRunning, + isTrue, + reason: "The app never launched after sending the deeplink. Package: $appBundleId, Deeplink: $deepLink", + ); + + // Wait for a moment so that the app has time to start the Dart VM + // service and report it in the device logs. + _log.info("Waiting a moment so that app can launch the Dart VM service."); + await Future.delayed(const Duration(seconds: 1)); + + // Ensure that we found the Dart VM service URL. + expect( + dartVmService, + isNotNull, + reason: "Couldn't find the Dart VM service for the app that was launched with a deep link.", + ); + expect( + dartVmService, + isNotEmpty, + reason: "Couldn't find the Dart VM service for the app that was launched with a deep link.", + ); + + // Setup port forwarding between the host machine running the test, and the + // Android device that's running the app, so we can talk to the Dart VM service. + final port = Uri.parse(dartVmService!).port; + await Xcrun.forwardTcpPort(port); + + // Connect to the Dart VM service in the app with Flutter Driver. + try { + driver = await FlutterDriver.connect( + dartVmServiceUrl: dartVmService, + ); + } catch (exception) { + if (verbose) { + await _logVmDetailsAfterConnectionFailure(dartVmService!); + } + + throw TestFailure( + "Couldn't connect FlutterDriver to the app's Dart VM service (the app successfully launched with the deep link, though)", + ); + } + + // Run the test. + await testRunner(driver); + }); +} + +Future _logVmDetailsAfterConnectionFailure(String dartVmService) async { + _log.warning("Failed to connect to the FlutterDriver!"); + + // Connect to the Dart VM service to query info. + late final VmService vmService; + try { + vmService = await vmServiceConnectUri(dartVmService); + } catch (exception) { + _log.warning("Tried to connect to the Dart VM service to provide more details, but we couldn't connect to it."); + _log.warning(exception); + return; + } + + // Get the VM. + late final VM vm; + try { + vm = await vmService.getVM(); + } catch (exception) { + _log.warning("Tried to get the VM from the Dart VM service, but we failed to query it."); + _log.warning(exception); + return; + } + + _log.info(''' +Additional VM service info: + - name: ${vm.name} + - type: ${vm.type} + - host CPU: ${vm.hostCPU} + - target CPU: ${vm.targetCPU} + - OS: ${vm.operatingSystem} + - PID: ${vm.pid} +'''); + + if (vm.isolates != null) { + _log.info("Isolates attached to the Dart VM service:"); + for (final remoteIsolate in vm.isolates!) { + late final Isolate isolate; + try { + isolate = await vmService.getIsolate(remoteIsolate.id!); + } catch (exception) { + _log.warning("Tried to load isolate data for '${remoteIsolate.id}', but failed."); + continue; + } + + _log.info('''Isolate: + - ID: ${isolate.id} + - name: ${isolate.name} + - type: ${isolate.type} + - is system isolate: ${isolate.isSystemIsolate} + - registered extensions: + + ${isolate.extensionRPCs} +'''); + } + } +} + +void _initLogs(bool writeLogs) { + if (!writeLogs) { + return; + } + + Logger.root.level = Level.ALL; + Logger.root.onRecord.listen((record) { + // ignore: avoid_print + print('${record.level.name}: ${record.time}: ${record.message}'); + }); +} + +final _log = Logger("flutter_test_runners.deep_links"); diff --git a/packages/flutter_test_runners/lib/src/platform_comms/android/adb.dart b/packages/flutter_test_runners/lib/src/platform_comms/android/adb.dart new file mode 100644 index 0000000..1da93a0 --- /dev/null +++ b/packages/flutter_test_runners/lib/src/platform_comms/android/adb.dart @@ -0,0 +1,108 @@ +import 'dart:convert'; +import 'dart:io'; + +/// A Dart interface for common Android Debug Bridge (ADB) commands. +class Adb { + /// Returns `true` if the app with the given [appPackage] ID is currently + /// in memory on the Android device. + /// + /// A return value of `true` doesn't mean the app is visible. The app might + /// be in the background, but still in memory. + static Future isAppRunning(String appPackage) async { + final result = await Process.run( + "sh", + ["-c", "adb shell ps | grep $appPackage"], + ); + final output = result.stdout; + return output != null && output is String && output.isNotEmpty; + } + + /// Starts listening to ADB logcat for Android logs, and returns the + /// [Process] that's listening to logcat. + /// + /// This method assumes that `stdout` and `stderr` from Logcat send messages + /// with UTF8 encoding. If anything else is received, the behavior is undefined, + /// but probably an error. + static Future listenToAdbForFlutterLogs({ + void Function(String)? onLog, + void Function(String)? onError, + }) async { + final result = await Process.start("adb", ["logcat", "-s", "flutter"]); + + result.stdout.transform(utf8.decoder).listen(onLog); + result.stderr.transform(utf8.decoder).listen(onError); + + return result; + } + + /// Connects the given TCP [port] from the host machine to the running Android + /// device. + /// + /// This is useful, for example, when you want to connect to the Dart VM service + /// running in a debug Flutter app on an Android device. + static Future forwardTcpPort(int port) async { + await Process.run("adb", ["forward", "tcp:$port", "tcp:$port"]); + } + + /// Tells Android to launch the app with the given [appPackage] ID using + /// the given [deepLink]. + /// + /// The structure of the deep link is determined by the given app. + static Future launchAppWithDeepLink({ + required String appPackage, + required String deepLink, + }) async { + await Process.start("adb", [ + "shell", + "am", + "start", + "-W", + "-a", + "android.intent.action.VIEW", + "-d", + "\"$deepLink\"", + appPackage, + ]); + } + + /// Waits for the app with the given [appPackage] to appear in memory. + /// + /// This method polls the OS to check if the app is running. To use a custom + /// polling duration, provide a [pollDuration]. + /// + /// This method fails if the app hasn't launched within the given [timeout] + /// duration. + static Future waitForAppToLaunch( + String appPackage, { + Duration pollDuration = const Duration(milliseconds: 250), + Duration timeout = const Duration(seconds: 10), + }) async { + final now = DateTime.now(); + + bool isAppRunning = false; + do { + isAppRunning = await Adb.isAppRunning(appPackage); + if (!isAppRunning) { + await Future.delayed(pollDuration); + } + } while (!isAppRunning && (DateTime.now().difference(now) < timeout)); + + return isAppRunning; + } + + /// Kills the app with the given [package] ID, e.g., com.acme.myapp. + static Future killApp(String package) async { + await Process.run("adb", ["shell", "am", "force-stop", package]); + } + + /// Clears all logs in logcat. + /// + /// Note: Logcat retains logs such that connecting to logcat will + /// initially print a bunch of old logs before printing new logs. + /// When searching logs for specific info, like a URL, those old logs + /// can lead to an attempt to connect to dead services. This method + /// clears those logs before listening for new logs. + static Future clearLogcat() async { + await Process.run("adb", ["logcat", "-b", "all", "-c"]); + } +} diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart new file mode 100644 index 0000000..247e6ee --- /dev/null +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -0,0 +1,108 @@ +import 'dart:convert'; +import 'dart:io'; + +/// A Dart interface for common `xcrun` commands. +class Xcrun { + /// Returns `true` if the app with the given [appBundleId] ID is currently + /// in memory on the iOS device. + /// + /// A return value of `true` doesn't mean the app is visible. The app might + /// be in the background, but still in memory. + static Future isAppRunning(String appBundleId) async { + final result = await Process.run( + "sh", + ["-c", "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\""], + ); + final output = result.stdout; + return output != null && output is String && output.isNotEmpty; + } + + /// Starts listening to the running iOS device's log stream, and returns the + /// [Process] that's listening. + /// + /// This method assumes that `stdout` and `stderr` from Logcat send messages + /// with UTF8 encoding. If anything else is received, the behavior is undefined, + /// but probably an error. + static Future listenToXcrunForFlutterLogs( + String appBundleId, { + void Function(String)? onLog, + void Function(String)? onError, + }) async { + final result = await Process.start("xcrun", [ + "simctl", + "spawn", + "booted", + "log", + "stream", + "--level", + "debug", + // Only log things related to the desired app. + "--predicate", + "(eventMessage CONTAINS '$appBundleId' OR eventMessage CONTAINS 'flutter')", + ]); + + result.stdout.transform(utf8.decoder).listen(onLog); + result.stderr.transform(utf8.decoder).listen(onError); + + return result; + } + + /// Connects the given TCP [port] from the host machine to the running iOS + /// device. + /// + /// This is useful, for example, when you want to connect to the Dart VM service + /// running in a debug Flutter app on an iOS device. + static Future forwardTcpPort(int port) async { + await Process.run("xcrun", ["simctl", "port", "forward", "booted", "$port:$port"]); + } + + /// Tells iOS to launch the given Universal Link, which might launch an app, if + /// an app is registered to handle the domain of the link. + /// + /// The structure of the deep link is determined by the given app. + static Future launchAppWithUniversalLink({ + required String universalLink, + }) async { + // Not sure why we need to dispatch through a shell, but if we try to + // run the xcrun command directly, the deep link doesn't launch. + await Process.run("sh", [ + "-c", + "xcrun simctl openurl booted \"$universalLink\"", + ]); + } + + /// Waits for the app with the given [appBundleId] to appear in memory. + /// + /// This method polls the OS to check if the app is running. To use a custom + /// polling duration, provide a [pollDuration]. + /// + /// This method fails if the app hasn't launched within the given [timeout] + /// duration. + static Future waitForAppToLaunch( + String appBundleId, { + Duration pollDuration = const Duration(milliseconds: 250), + Duration timeout = const Duration(seconds: 10), + }) async { + final now = DateTime.now(); + + bool isAppRunning = false; + do { + isAppRunning = await Xcrun.isAppRunning(appBundleId); + if (!isAppRunning) { + await Future.delayed(pollDuration); + } + } while (!isAppRunning && (DateTime.now().difference(now) < timeout)); + + return isAppRunning; + } + + /// Kills the app with the given [appBundleId] ID, e.g., `com.acme.myapp`. + static Future killApp(String appBundleId) async { + await Process.run("xcrun", ["simctl", "terminate", "booted", appBundleId]); + } + + /// Clears all logs in the iOS log stream. + static Future clearLogcat() async { + await Process.run("xcrun", ["simctl", "spawn", "booted", "log", "erase"]); + } +} diff --git a/packages/flutter_test_runners/pubspec.yaml b/packages/flutter_test_runners/pubspec.yaml index ede39a4..4824344 100644 --- a/packages/flutter_test_runners/pubspec.yaml +++ b/packages/flutter_test_runners/pubspec.yaml @@ -12,7 +12,14 @@ dependencies: sdk: flutter flutter_test: sdk: flutter + flutter_driver: + sdk: flutter + meta: ^1.9.1 + test: any + vm_service: any + logging: ^1.3.0 + dev_dependencies: flutter_lints: ^2.0.0 diff --git a/pubspec.lock b/pubspec.lock index 949529f..5c7e4d3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" ansi_styles: dependency: transitive description: @@ -73,6 +89,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.0+1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: e3493833ea012784c740e341952298f1cc77f1f01b1bbc3eb4eecf6984fb7f43 + url: "https://pub.dev" + source: hosted + version: "1.11.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" file: dependency: transitive description: @@ -81,6 +121,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" glob: dependency: transitive description: @@ -105,6 +153,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" + source: hosted + version: "3.2.2" http_parser: dependency: transitive description: @@ -121,6 +177,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" json_annotation: dependency: transitive description: @@ -129,14 +193,22 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.17" melos: dependency: "direct main" description: @@ -149,10 +221,18 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "2.0.0" mustache_template: dependency: transitive description: @@ -161,6 +241,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" + url: "https://pub.dev" + source: hosted + version: "2.1.1" path: dependency: transitive description: @@ -233,6 +329,54 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.1" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" + url: "https://pub.dev" + source: hosted + version: "0.10.13" source_span: dependency: transitive description: @@ -273,14 +417,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" + test: + dependency: "direct main" + description: + name: test + sha256: "8391fbe68d520daf2314121764d38e37f934c02fd7301ad18307bd93bd6b725d" + url: "https://pub.dev" + source: hosted + version: "1.25.14" test_api: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.4" + test_core: + dependency: transitive + description: + name: test_core + sha256: "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa" + url: "https://pub.dev" + source: hosted + version: "0.6.8" typed_data: dependency: transitive description: @@ -297,6 +457,54 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + vm_service: + dependency: "direct main" + description: + name: vm_service + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + url: "https://pub.dev" + source: hosted + version: "15.0.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" yaml: dependency: transitive description: @@ -314,4 +522,4 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.2.0-122.0.dev <4.0.0" + dart: ">=3.5.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3c523ae..9254500 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,4 +5,3 @@ environment: dependencies: melos: ^3.1.1 - From c4e2fd051fe189efaae252bf2358e72356c09333 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 15:33:26 -0800 Subject: [PATCH 002/120] Fix Flutter setup in GitHub action --- .github/workflows/pr_validation.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 518b167..c873556 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -17,6 +17,7 @@ jobs: uses: subosito/flutter-action@v2 with: flutter-version: stable + architecture: x64 - name: Install Android SDK and launch emulator uses: reactivecircus/android-emulator-runner@v2 From 988b237a783a1b8b645c6f5a117a498d5a2acabc Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 15:34:57 -0800 Subject: [PATCH 003/120] Fix Flutter setup in GitHub action --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index c873556..8acea5f 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -16,7 +16,7 @@ jobs: - name: Set up Flutter uses: subosito/flutter-action@v2 with: - flutter-version: stable + channel: stable architecture: x64 - name: Install Android SDK and launch emulator From 835362e0ec958b371623aef6189f661fcd9cf57a Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 15:40:42 -0800 Subject: [PATCH 004/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 8acea5f..53850c2 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -27,6 +27,8 @@ jobs: arch: x86_64 profile: Pixel_8_API_34 emulator-options: "-no-snapshot -no-boot-anim -camera-back none -camera-front none" # Emulator options (optional) + script: | + echo "Emulator is running" - name: Wait for Emulator to Start run: | From e4fd095170013f6e2953760bc9333d1de62a5961 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 15:46:10 -0800 Subject: [PATCH 005/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 53850c2..c23ad55 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -22,10 +22,10 @@ jobs: - name: Install Android SDK and launch emulator uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 34 + api-level: 35 target: default arch: x86_64 - profile: Pixel_8_API_34 + profile: pixel_9_pro emulator-options: "-no-snapshot -no-boot-anim -camera-back none -camera-front none" # Emulator options (optional) script: | echo "Emulator is running" From 78fe26a03731e52da452becf0f552574fe4884ce Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 15:49:19 -0800 Subject: [PATCH 006/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index c23ad55..6961241 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -13,19 +13,13 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: stable - architecture: x64 - - name: Install Android SDK and launch emulator uses: reactivecircus/android-emulator-runner@v2 with: api-level: 35 target: default arch: x86_64 - profile: pixel_9_pro + profile: Galaxy Nexus emulator-options: "-no-snapshot -no-boot-anim -camera-back none -camera-front none" # Emulator options (optional) script: | echo "Emulator is running" @@ -35,6 +29,12 @@ jobs: adb wait-for-device adb shell input keyevent 82 # Unlock the emulator screen if it's locked + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + architecture: x64 + - name: Install Flutter Dependencies run: flutter pub get From f84fdd4f799149613e4e0ac5560abaabb62b53a1 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 15:52:21 -0800 Subject: [PATCH 007/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 6961241..e383564 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -13,6 +13,13 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 + # The Android emulator action seems to want to include this. + - name: enable KVM for linux runners + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + - name: Install Android SDK and launch emulator uses: reactivecircus/android-emulator-runner@v2 with: From d6d8eec3f53494ecb7055c57acf1fb2f25822583 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 15:59:17 -0800 Subject: [PATCH 008/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index e383564..c112b10 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -13,12 +13,12 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 - # The Android emulator action seems to want to include this. - - name: enable KVM for linux runners - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm +# # The Android emulator action seems to want to include this. +# - name: enable KVM for linux runners +# run: | +# echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules +# sudo udevadm control --reload-rules +# sudo udevadm trigger --name-match=kvm - name: Install Android SDK and launch emulator uses: reactivecircus/android-emulator-runner@v2 @@ -27,7 +27,12 @@ jobs: target: default arch: x86_64 profile: Galaxy Nexus - emulator-options: "-no-snapshot -no-boot-anim -camera-back none -camera-front none" # Emulator options (optional) + cores: 2 + sdcard-path-or-size: 100M + avd-name: github-ci-emulator + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: false script: | echo "Emulator is running" From 576dd21e5bd6e6d4f4d59b895cc4ed497dc64fae Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:05:52 -0800 Subject: [PATCH 009/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index c112b10..d7ef55c 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -13,12 +13,13 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 -# # The Android emulator action seems to want to include this. -# - name: enable KVM for linux runners -# run: | -# echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules -# sudo udevadm control --reload-rules -# sudo udevadm trigger --name-match=kvm + # The Android emulator action seems to want to include this. + - name: enable KVM for linux runners + working-directory: ~ + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - name: Install Android SDK and launch emulator uses: reactivecircus/android-emulator-runner@v2 @@ -28,6 +29,8 @@ jobs: arch: x86_64 profile: Galaxy Nexus cores: 2 + disk-size: 6000M + heap-size: 600M sdcard-path-or-size: 100M avd-name: github-ci-emulator force-avd-creation: false From fe723805c127ab5455fca74878f96a2f7818b42a Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:10:07 -0800 Subject: [PATCH 010/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 60 +++++++++++++++++----------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index d7ef55c..fd324d3 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -21,6 +21,12 @@ jobs: sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + architecture: x64 + - name: Install Android SDK and launch emulator uses: reactivecircus/android-emulator-runner@v2 with: @@ -37,28 +43,34 @@ jobs: emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: false script: | - echo "Emulator is running" - - - name: Wait for Emulator to Start - run: | - adb wait-for-device - adb shell input keyevent 82 # Unlock the emulator screen if it's locked - - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: stable - architecture: x64 - - - name: Install Flutter Dependencies - run: flutter pub get - - - name: Build Flutter App (Debug Mode) - # Must be debug mode so we can enable Flutter Driver. - run: flutter build apk --debug - - - name: Install App on Emulator - run: flutter install --debug + echo "Unlocking the screen" + adb shell input keyevent 82 # Unlock the emulator screen if it's locked + + echo "Getting Flutter dependencies" + flutter pub get + + echo "Building and installing the APK" + flutter build apk --debug + flutter install --debug + + echo "Running Flutter tests" + flutter test test_driver - - name: Run deep link tests - run: flutter test test_driver +# - name: Wait for Emulator to Start +# working-directory: ~ +# run: | +# adb wait-for-device +# adb shell input keyevent 82 # Unlock the emulator screen if it's locked +# +# - name: Install Flutter Dependencies +# run: flutter pub get +# +# - name: Build Flutter App (Debug Mode) +# # Must be debug mode so we can enable Flutter Driver. +# run: flutter build apk --debug +# +# - name: Install App on Emulator +# run: flutter install --debug +# +# - name: Run deep link tests +# run: flutter test test_driver From a1e37c30e756e96dd82ec49f5419434def3ec774 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:14:09 -0800 Subject: [PATCH 011/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index fd324d3..8ebc82e 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -43,15 +43,22 @@ jobs: emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: false script: | + echo "Running emulator..." + echo "Working directory: $(pwd)" + echo "" + echo "Unlocking the screen" adb shell input keyevent 82 # Unlock the emulator screen if it's locked + echo "" echo "Getting Flutter dependencies" flutter pub get + echo "" echo "Building and installing the APK" flutter build apk --debug - flutter install --debug + flutter install + echo "" echo "Running Flutter tests" flutter test test_driver From 57bbe0cefc10e1b4785639deb9980f81907041c9 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:18:18 -0800 Subject: [PATCH 012/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 8ebc82e..f4ce2ac 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -44,6 +44,8 @@ jobs: disable-animations: false script: | echo "Running emulator..." + + cd ./flutter_test_runners/example_deep_links echo "Working directory: $(pwd)" echo "" From 2ec54425523f73861e024971deec726e874f6bf5 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:24:28 -0800 Subject: [PATCH 013/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index f4ce2ac..7747e9e 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -44,7 +44,11 @@ jobs: disable-animations: false script: | echo "Running emulator..." + echo "Working directory: $(pwd)" + echo "" + echo "Changing working directory to the example app" + echo "Current directory listing: $(ls -la)" cd ./flutter_test_runners/example_deep_links echo "Working directory: $(pwd)" echo "" From 6f90c7392ff69a2360e9670b782e47d097f3a18e Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:30:27 -0800 Subject: [PATCH 014/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 7747e9e..b6dfb44 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -48,7 +48,7 @@ jobs: echo "" echo "Changing working directory to the example app" - echo "Current directory listing: $(ls -la)" + ls -la cd ./flutter_test_runners/example_deep_links echo "Working directory: $(pwd)" echo "" From 9ac0b148840401a4c6fcb0102fccebb224f5a418 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:35:49 -0800 Subject: [PATCH 015/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index b6dfb44..97988fb 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: ./flutter_test_runners/example_deep_links + working-directory: ./packages/flutter_test_runners/example_deep_links steps: - name: Checkout Repository @@ -49,7 +49,7 @@ jobs: echo "Changing working directory to the example app" ls -la - cd ./flutter_test_runners/example_deep_links + cd ./packages/flutter_test_runners/example_deep_links echo "Working directory: $(pwd)" echo "" From a0dd1b670356699aea538d55a75ad2296604da13 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:43:44 -0800 Subject: [PATCH 016/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 97988fb..6e8ebd6 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -62,8 +62,9 @@ jobs: echo "" echo "Building and installing the APK" - flutter build apk --debug - flutter install +# flutter build apk --debug --target=packages/flutter_test_runners/example_deep_links/lib/main.dart +# flutter install + flutter run --debug --target=packages/flutter_test_runners/example_deep_links/lib/main.dart echo "" echo "Running Flutter tests" From 2fe8f5ed0f8d592b5517c7542ab0fe4b1bb4284e Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:45:13 -0800 Subject: [PATCH 017/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 6e8ebd6..baf1b28 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -62,8 +62,6 @@ jobs: echo "" echo "Building and installing the APK" -# flutter build apk --debug --target=packages/flutter_test_runners/example_deep_links/lib/main.dart -# flutter install flutter run --debug --target=packages/flutter_test_runners/example_deep_links/lib/main.dart echo "" From 0f8b7a588a4cbc7104f731f96725adf0be92ffe8 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 16:49:09 -0800 Subject: [PATCH 018/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index baf1b28..013d8ad 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -62,7 +62,7 @@ jobs: echo "" echo "Building and installing the APK" - flutter run --debug --target=packages/flutter_test_runners/example_deep_links/lib/main.dart + flutter run --debug -d emulator-5554 --target=packages/flutter_test_runners/example_deep_links/lib/main.dart echo "" echo "Running Flutter tests" From 4dd710617c885915355a4250fba9f0eb4ce3f88d Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 17:02:34 -0800 Subject: [PATCH 019/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 013d8ad..73ab6d9 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -49,8 +49,20 @@ jobs: echo "Changing working directory to the example app" ls -la - cd ./packages/flutter_test_runners/example_deep_links - echo "Working directory: $(pwd)" + echo "" + cd packages + ls -la + echo "" + + cd flutter_test_runners + ls -la + echo "" + + cd example_deep_links + ls -la + echo "" + + echo "Final working directory: $(pwd)" echo "" echo "Unlocking the screen" @@ -62,7 +74,7 @@ jobs: echo "" echo "Building and installing the APK" - flutter run --debug -d emulator-5554 --target=packages/flutter_test_runners/example_deep_links/lib/main.dart + flutter run --debug -d emulator-5554 echo "" echo "Running Flutter tests" From 9175ded04f7fd77ccd1ee25d18baf27790b254cd Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 17:08:01 -0800 Subject: [PATCH 020/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 73ab6d9..2feea3e 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -45,40 +45,21 @@ jobs: script: | echo "Running emulator..." echo "Working directory: $(pwd)" - echo "" - - echo "Changing working directory to the example app" - ls -la - echo "" - cd packages - ls -la - echo "" - - cd flutter_test_runners - ls -la - echo "" - - cd example_deep_links - ls -la - echo "" - - echo "Final working directory: $(pwd)" - echo "" echo "Unlocking the screen" adb shell input keyevent 82 # Unlock the emulator screen if it's locked echo "" echo "Getting Flutter dependencies" - flutter pub get + cd packages/flutter_test_runners/example_deep_links && flutter pub get echo "" echo "Building and installing the APK" - flutter run --debug -d emulator-5554 + cd packages/flutter_test_runners/example_deep_links && flutter run --debug -d emulator-5554 echo "" echo "Running Flutter tests" - flutter test test_driver + cd packages/flutter_test_runners/example_deep_links && flutter test test_driver # - name: Wait for Emulator to Start # working-directory: ~ From 743cc72fa8aaf8adb42cf0a31af3d56c5d8b0345 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 17:14:32 -0800 Subject: [PATCH 021/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 2feea3e..f8d8552 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -13,6 +13,13 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 + # Need JDK 17 for Android build. + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + # The Android emulator action seems to want to include this. - name: enable KVM for linux runners working-directory: ~ From b20dba1b2edbafebdc6a79a03ca3b33dde8dd4cb Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 17:21:31 -0800 Subject: [PATCH 022/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index f8d8552..4ee51ba 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -62,7 +62,7 @@ jobs: echo "" echo "Building and installing the APK" - cd packages/flutter_test_runners/example_deep_links && flutter run --debug -d emulator-5554 + cd packages/flutter_test_runners/example_deep_links && flutter install --debug -d emulator-5554 echo "" echo "Running Flutter tests" From abcd599a0b7b13784bba7257a83d19cdfcba57b1 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 17:24:28 -0800 Subject: [PATCH 023/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 4ee51ba..d3f4ec6 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -62,7 +62,7 @@ jobs: echo "" echo "Building and installing the APK" - cd packages/flutter_test_runners/example_deep_links && flutter install --debug -d emulator-5554 + cd packages/flutter_test_runners/example_deep_links && flutter build apk --debug && flutter install --debug -d emulator-5554 echo "" echo "Running Flutter tests" From a35642e3550107a20844e9c6f64e276bbd111322 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 17:33:22 -0800 Subject: [PATCH 024/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index d3f4ec6..0444779 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -66,7 +66,7 @@ jobs: echo "" echo "Running Flutter tests" - cd packages/flutter_test_runners/example_deep_links && flutter test test_driver + cd packages/flutter_test_runners/example_deep_links && flutter test test_driver/deep_link_android_test.dart # - name: Wait for Emulator to Start # working-directory: ~ From 0d09645ed49a725a198a226fd345af99094dbdbd Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 17:41:44 -0800 Subject: [PATCH 025/120] Trying to get emulator action to work --- .../lib/src/deep_links/deep_links_android.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart index 2138581..6cd8c6c 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart @@ -81,7 +81,7 @@ void testDeepLinkAndroidAppLaunch( // Wait for a moment so that the app has time to start the Dart VM // service and report it in the ADB logs. _log.info("Waiting a moment so that app can launch the Dart VM service."); - await Future.delayed(const Duration(seconds: 1)); + await Future.delayed(const Duration(seconds: 5)); // Ensure that we found the Dart VM service URL. expect( From befa4de6dd6775ff37e42d7e780ac1cb6adfa6d1 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 17:55:30 -0800 Subject: [PATCH 026/120] Trying to get emulator action to work --- .github/workflows/pr_validation.yaml | 21 ++++++++----------- .../src/deep_links/deep_links_android.dart | 4 ++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 0444779..984c7b6 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -34,6 +34,13 @@ jobs: channel: stable architecture: x64 + - name: Install Flutter Dependencies + run: flutter pub get + + - name: Build Flutter App (Debug Mode) + # Must be debug mode so we can enable Flutter Driver. + run: flutter build apk --debug + - name: Install Android SDK and launch emulator uses: reactivecircus/android-emulator-runner@v2 with: @@ -57,12 +64,8 @@ jobs: adb shell input keyevent 82 # Unlock the emulator screen if it's locked echo "" - echo "Getting Flutter dependencies" - cd packages/flutter_test_runners/example_deep_links && flutter pub get - echo "" - - echo "Building and installing the APK" - cd packages/flutter_test_runners/example_deep_links && flutter build apk --debug && flutter install --debug -d emulator-5554 + echo "Installing the APK" + cd packages/flutter_test_runners/example_deep_links && flutter install --debug -d emulator-5554 echo "" echo "Running Flutter tests" @@ -74,12 +77,6 @@ jobs: # adb wait-for-device # adb shell input keyevent 82 # Unlock the emulator screen if it's locked # -# - name: Install Flutter Dependencies -# run: flutter pub get -# -# - name: Build Flutter App (Debug Mode) -# # Must be debug mode so we can enable Flutter Driver. -# run: flutter build apk --debug # # - name: Install App on Emulator # run: flutter install --debug diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart index 6cd8c6c..85da259 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart @@ -80,6 +80,10 @@ void testDeepLinkAndroidAppLaunch( // Wait for a moment so that the app has time to start the Dart VM // service and report it in the ADB logs. + // + // When running locally, waiting 1 second is probably sufficient. But + // when running in GitHub CI, we need to wait longer to make sure the + // Dart VM service reports its URL. _log.info("Waiting a moment so that app can launch the Dart VM service."); await Future.delayed(const Duration(seconds: 5)); From 0aedb1bcef5df103f9e7bd15c0f6aa0f329a8f3b Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 20:19:19 -0800 Subject: [PATCH 027/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 153 ++++++++++++++++----------- 1 file changed, 90 insertions(+), 63 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 984c7b6..477638d 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -3,30 +3,98 @@ name: Validate PR on: [pull_request, workflow_dispatch] jobs: - test_flutter-test-runners_deep-links_android: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./packages/flutter_test_runners/example_deep_links +# test_flutter-test-runners_deep-links_android: +# runs-on: ubuntu-latest +# defaults: +# run: +# working-directory: ./packages/flutter_test_runners/example_deep_links +# +# steps: +# - name: Checkout Repository +# uses: actions/checkout@v3 +# +# # Need JDK 17 for Android build. +# - name: Set up JDK 17 +# uses: actions/setup-java@v3 +# with: +# distribution: 'temurin' +# java-version: '17' +# +# # The Android emulator action seems to want to include this. +# - name: enable KVM for linux runners +# working-directory: ~ +# run: | +# echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules +# sudo udevadm control --reload-rules +# sudo udevadm trigger --name-match=kvm +# +# - name: Set up Flutter +# uses: subosito/flutter-action@v2 +# with: +# channel: stable +# architecture: x64 +# +# - name: Install Flutter Dependencies +# run: flutter pub get +# +# - name: Build Flutter App (Debug Mode) +# # Must be debug mode so we can enable Flutter Driver. +# run: flutter build apk --debug +# +# - name: Install Android SDK and launch emulator +# uses: reactivecircus/android-emulator-runner@v2 +# with: +# api-level: 35 +# target: default +# arch: x86_64 +# profile: Galaxy Nexus +# cores: 2 +# disk-size: 6000M +# heap-size: 600M +# sdcard-path-or-size: 100M +# avd-name: github-ci-emulator +# force-avd-creation: false +# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none +# disable-animations: false +# script: | +# echo "Running emulator..." +# echo "Working directory: $(pwd)" +# +# echo "Unlocking the screen" +# adb shell input keyevent 82 # Unlock the emulator screen if it's locked +# echo "" +# +# echo "Installing the APK" +# cd packages/flutter_test_runners/example_deep_links && flutter install --debug -d emulator-5554 +# echo "" +# +# echo "Running Flutter tests" +# cd packages/flutter_test_runners/example_deep_links && flutter test test_driver/deep_link_android_test.dart + + test_flutter-test-runners_deep-links_ios: + runs-on: macos-latest steps: - - name: Checkout Repository + - name: Checkout repository uses: actions/checkout@v3 - # Need JDK 17 for Android build. - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '17' + - name: Set up Xcode + run: | + sudo xcode-select -s /Applications/Xcode.app + xcodebuild -version - # The Android emulator action seems to want to include this. - - name: enable KVM for linux runners - working-directory: ~ + - name: Create and Boot iOS Simulator run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm + # List available devices and runtimes + xcrun simctl list devices + xcrun simctl list runtimes + + # Create a new simulator (if needed) + SIMULATOR_ID=$(xcrun simctl create "GitHubActions-Simulator" "iPhone 14" "com.apple.CoreSimulator.SimRuntime.iOS-17-0") + + # Boot the simulator + xcrun simctl boot "$SIMULATOR_ID" + xcrun simctl list devices booted - name: Set up Flutter uses: subosito/flutter-action@v2 @@ -37,49 +105,8 @@ jobs: - name: Install Flutter Dependencies run: flutter pub get - - name: Build Flutter App (Debug Mode) - # Must be debug mode so we can enable Flutter Driver. - run: flutter build apk --debug - - - name: Install Android SDK and launch emulator - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: 35 - target: default - arch: x86_64 - profile: Galaxy Nexus - cores: 2 - disk-size: 6000M - heap-size: 600M - sdcard-path-or-size: 100M - avd-name: github-ci-emulator - force-avd-creation: false - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - disable-animations: false - script: | - echo "Running emulator..." - echo "Working directory: $(pwd)" - - echo "Unlocking the screen" - adb shell input keyevent 82 # Unlock the emulator screen if it's locked - echo "" - - echo "Installing the APK" - cd packages/flutter_test_runners/example_deep_links && flutter install --debug -d emulator-5554 - echo "" - - echo "Running Flutter tests" - cd packages/flutter_test_runners/example_deep_links && flutter test test_driver/deep_link_android_test.dart + - name: Build iOS App + run: flutter build ios --debug -# - name: Wait for Emulator to Start -# working-directory: ~ -# run: | -# adb wait-for-device -# adb shell input keyevent 82 # Unlock the emulator screen if it's locked -# -# -# - name: Install App on Emulator -# run: flutter install --debug -# -# - name: Run deep link tests -# run: flutter test test_driver + - name: Install iOS App + run: flutter install ipa From 9221162a892fe5a36597e92bb9ef5f5f4519285a Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 20:27:06 -0800 Subject: [PATCH 028/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 477638d..a6c27d2 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -74,6 +74,10 @@ jobs: test_flutter-test-runners_deep-links_ios: runs-on: macos-latest + defaults: + run: + working-directory: ./packages/flutter_test_runners/example_deep_links + steps: - name: Checkout repository uses: actions/checkout@v3 From 04ce0d7619aefa8b687b8a1a27db423cf5a81376 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 21:31:09 -0800 Subject: [PATCH 029/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index a6c27d2..3670f24 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -79,6 +79,28 @@ jobs: working-directory: ./packages/flutter_test_runners/example_deep_links steps: + - name: Decode Provisioning Profile and Certificate + env: + PROVISIONING_PROFILE: ${{ secrets.PROVISIONING_PROFILE }} + SIGNING_CERTIFICATE: ${{ secrets.SIGNING_CERTIFICATE }} + run: | + echo "$PROVISIONING_PROFILE" | base64 --decode > provisioning.mobileprovision + echo "$SIGNING_CERTIFICATE" | base64 --decode > certificate.p12 + + - name: Install Certificate and Provisioning Profile + env: + CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }} + run: | + # Install the signing certificate + security import certificate.p12 -k ~/Library/Keychains/login.keychain-db -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign + + # Move the provisioning profile to the correct location + mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles + mv provisioning.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/ + + # Verify the certificate + security find-identity -p codesigning -v + - name: Checkout repository uses: actions/checkout@v3 From bd996131a54f33a2448caa1cfb2127064c6b6d6f Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 21:32:24 -0800 Subject: [PATCH 030/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 3670f24..37fd6e2 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -80,6 +80,7 @@ jobs: steps: - name: Decode Provisioning Profile and Certificate + working-directory: ~ env: PROVISIONING_PROFILE: ${{ secrets.PROVISIONING_PROFILE }} SIGNING_CERTIFICATE: ${{ secrets.SIGNING_CERTIFICATE }} @@ -88,6 +89,7 @@ jobs: echo "$SIGNING_CERTIFICATE" | base64 --decode > certificate.p12 - name: Install Certificate and Provisioning Profile + working-directory: ~ env: CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }} run: | From 15e8ffd4d4221aa04ddc1d20963e040fc591584f Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 28 Dec 2024 23:23:51 -0800 Subject: [PATCH 031/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 37fd6e2..30c275e 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -91,10 +91,10 @@ jobs: - name: Install Certificate and Provisioning Profile working-directory: ~ env: - CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }} + SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }} run: | # Install the signing certificate - security import certificate.p12 -k ~/Library/Keychains/login.keychain-db -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign + security import certificate.p12 -k ~/Library/Keychains/login.keychain-db -P "$SIGNING_CERTIFICATE_PASSWORD" -T /usr/bin/codesign # Move the provisioning profile to the correct location mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles From 6c84428e6100259967f45ef10c446c9294beb3c3 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:13:58 -0800 Subject: [PATCH 032/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 49 ++++++++++++++++------------ 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 30c275e..34dcac2 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -79,29 +79,38 @@ jobs: working-directory: ./packages/flutter_test_runners/example_deep_links steps: - - name: Decode Provisioning Profile and Certificate - working-directory: ~ + - name: Install the Apple certificate and provisioning profile env: - PROVISIONING_PROFILE: ${{ secrets.PROVISIONING_PROFILE }} - SIGNING_CERTIFICATE: ${{ secrets.SIGNING_CERTIFICATE }} + BUILD_CERTIFICATE_BASE64: ${{ secrets.SIGNING_CERTIFICATE }} + P12_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }} + BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE }} + EXPORT_OPTIONS_PLIST: ${{ secrets.EXPORT_OPTIONS_PLIST }} run: | - echo "$PROVISIONING_PROFILE" | base64 --decode > provisioning.mobileprovision - echo "$SIGNING_CERTIFICATE" | base64 --decode > certificate.p12 - - - name: Install Certificate and Provisioning Profile - working-directory: ~ - env: - SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }} - run: | - # Install the signing certificate - security import certificate.p12 -k ~/Library/Keychains/login.keychain-db -P "$SIGNING_CERTIFICATE_PASSWORD" -T /usr/bin/codesign + # create variables + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 + PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision + KEYCHAIN_PATH=~/Library/Keychains/login.keychain-db + + # import certificate and provisioning profile from secrets + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH + echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH - # Move the provisioning profile to the correct location + # create temporary keychain + #security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + #security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + #security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH + + # import certificate to keychain + security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH + + # apply provisioning profile mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles - mv provisioning.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/ - - # Verify the certificate - security find-identity -p codesigning -v + cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles + + # Save ExportOptions.plist from Base64 to file + EXPORT_OPTS_PATH=$RUNNER_TEMP/ExportOptions.plist + echo -n "$EXPORT_OPTIONS_PLIST" | base64 --decode -o $EXPORT_OPTS_PATH - name: Checkout repository uses: actions/checkout@v3 @@ -134,7 +143,7 @@ jobs: run: flutter pub get - name: Build iOS App - run: flutter build ios --debug + run: flutter build ios --debug --export-options-plist=$EXPORT_OPTS_PATH - name: Install iOS App run: flutter install ipa From 98564b661c9fbe74aee46c70dde39ffe106535cc Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:15:22 -0800 Subject: [PATCH 033/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 34dcac2..bf639d0 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -80,6 +80,7 @@ jobs: steps: - name: Install the Apple certificate and provisioning profile + working-directory: ~ env: BUILD_CERTIFICATE_BASE64: ${{ secrets.SIGNING_CERTIFICATE }} P12_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }} From 3bc8656d48ec788ce326132accc9a8cd96278c5d Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:24:30 -0800 Subject: [PATCH 034/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 32 +++++++++++++++------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index bf639d0..220a968 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -77,6 +77,8 @@ jobs: defaults: run: working-directory: ./packages/flutter_test_runners/example_deep_links + env: + EXPORT_OPTS_PATH: $RUNNER_TEMP/ExportOptions.plist steps: - name: Install the Apple certificate and provisioning profile @@ -110,7 +112,6 @@ jobs: cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles # Save ExportOptions.plist from Base64 to file - EXPORT_OPTS_PATH=$RUNNER_TEMP/ExportOptions.plist echo -n "$EXPORT_OPTIONS_PLIST" | base64 --decode -o $EXPORT_OPTS_PATH - name: Checkout repository @@ -121,19 +122,6 @@ jobs: sudo xcode-select -s /Applications/Xcode.app xcodebuild -version - - name: Create and Boot iOS Simulator - run: | - # List available devices and runtimes - xcrun simctl list devices - xcrun simctl list runtimes - - # Create a new simulator (if needed) - SIMULATOR_ID=$(xcrun simctl create "GitHubActions-Simulator" "iPhone 14" "com.apple.CoreSimulator.SimRuntime.iOS-17-0") - - # Boot the simulator - xcrun simctl boot "$SIMULATOR_ID" - xcrun simctl list devices booted - - name: Set up Flutter uses: subosito/flutter-action@v2 with: @@ -144,7 +132,21 @@ jobs: run: flutter pub get - name: Build iOS App - run: flutter build ios --debug --export-options-plist=$EXPORT_OPTS_PATH + run: flutter build ipa --debug --export-options-plist=$EXPORT_OPTS_PATH - name: Install iOS App run: flutter install ipa + + - name: Create and Boot iOS Simulator + run: | + # List available devices and runtimes + xcrun simctl list devices + xcrun simctl list runtimes + + # Create a new simulator (if needed) + SIMULATOR_ID=$(xcrun simctl create "GitHubActions-Simulator" "iPhone 14" "com.apple.CoreSimulator.SimRuntime.iOS-17-0") + + # Boot the simulator + xcrun simctl boot "$SIMULATOR_ID" + xcrun simctl list devices booted + From 635e269808c190b632d3818db538b2d0bc13f192 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:25:31 -0800 Subject: [PATCH 035/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 220a968..2dece49 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -77,8 +77,9 @@ jobs: defaults: run: working-directory: ./packages/flutter_test_runners/example_deep_links - env: - EXPORT_OPTS_PATH: $RUNNER_TEMP/ExportOptions.plist + + env: + EXPORT_OPTS_PATH: $RUNNER_TEMP/ExportOptions.plist steps: - name: Install the Apple certificate and provisioning profile From 4ac744a2e3b77ea9d0c4e44c5249d03985cf0c25 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:29:15 -0800 Subject: [PATCH 036/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 2dece49..5d38ac5 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -79,7 +79,7 @@ jobs: working-directory: ./packages/flutter_test_runners/example_deep_links env: - EXPORT_OPTS_PATH: $RUNNER_TEMP/ExportOptions.plist + EXPORT_OPTS_PATH: ${{ env.RUNNER_TEMP }}/ExportOptions.plist steps: - name: Install the Apple certificate and provisioning profile From 320dde28404f0eed2a01e79e8a9d6862dbe87f9d Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:32:43 -0800 Subject: [PATCH 037/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 5d38ac5..4fda8df 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -78,9 +78,6 @@ jobs: run: working-directory: ./packages/flutter_test_runners/example_deep_links - env: - EXPORT_OPTS_PATH: ${{ env.RUNNER_TEMP }}/ExportOptions.plist - steps: - name: Install the Apple certificate and provisioning profile working-directory: ~ @@ -113,6 +110,7 @@ jobs: cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles # Save ExportOptions.plist from Base64 to file + echo "EXPORT_OPTS_PATH=$RUNNER_TEMP/ExportOptions.plist" >> $GITHUB_ENV echo -n "$EXPORT_OPTIONS_PLIST" | base64 --decode -o $EXPORT_OPTS_PATH - name: Checkout repository From 1f9cd1d56765f4db499ca9c922f03616087e80cd Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:36:43 -0800 Subject: [PATCH 038/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 4fda8df..53730a4 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -79,6 +79,10 @@ jobs: working-directory: ./packages/flutter_test_runners/example_deep_links steps: + - name: Set location for ExportOptions.plist + run: | + echo "EXPORT_OPTS_PATH=$RUNNER_TEMP/ExportOptions.plist" >> $GITHUB_ENV + - name: Install the Apple certificate and provisioning profile working-directory: ~ env: @@ -110,7 +114,6 @@ jobs: cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles # Save ExportOptions.plist from Base64 to file - echo "EXPORT_OPTS_PATH=$RUNNER_TEMP/ExportOptions.plist" >> $GITHUB_ENV echo -n "$EXPORT_OPTIONS_PLIST" | base64 --decode -o $EXPORT_OPTS_PATH - name: Checkout repository From 4faabceb4eaf104b39075e3f6c600d659101e25e Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:37:33 -0800 Subject: [PATCH 039/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 53730a4..4993f0e 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -80,6 +80,7 @@ jobs: steps: - name: Set location for ExportOptions.plist + working-directory: ~ run: | echo "EXPORT_OPTS_PATH=$RUNNER_TEMP/ExportOptions.plist" >> $GITHUB_ENV From 497d476467647f9c7f45384c17b0fe715a19f9c0 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:50:02 -0800 Subject: [PATCH 040/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 4993f0e..8962f9e 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -92,12 +92,12 @@ jobs: BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE }} EXPORT_OPTIONS_PLIST: ${{ secrets.EXPORT_OPTIONS_PLIST }} run: | - # create variables + # Create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision KEYCHAIN_PATH=~/Library/Keychains/login.keychain-db - # import certificate and provisioning profile from secrets + # Import certificate and provisioning profile from secrets echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH @@ -106,14 +106,20 @@ jobs: #security set-keychain-settings -lut 21600 $KEYCHAIN_PATH #security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH - # import certificate to keychain + # Import certificate to keychain security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH security list-keychain -d user -s $KEYCHAIN_PATH - # apply provisioning profile + # Verify certificate was loaded into keychain + security find-identity -p codesigning -v + + # Apply provisioning profile mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles + # List all provisioning profiles to make sure we placed it correctly + ls ~/Library/MobileDevice/Provisioning\ Profiles/ + # Save ExportOptions.plist from Base64 to file echo -n "$EXPORT_OPTIONS_PLIST" | base64 --decode -o $EXPORT_OPTS_PATH From 333d6c15677a95456514116c4257045cd9243d5e Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 12:52:09 -0800 Subject: [PATCH 041/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 8962f9e..d94ba4b 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -94,7 +94,7 @@ jobs: run: | # Create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 - PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision + PP_PATH=$RUNNER_TEMP/fbh_deep_link_example_app_profile.mobileprovision KEYCHAIN_PATH=~/Library/Keychains/login.keychain-db # Import certificate and provisioning profile from secrets From 1ef1fab158a8439c0a7543b4f87b37ee7c72adba Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 13:05:59 -0800 Subject: [PATCH 042/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index d94ba4b..5ec30b0 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -97,6 +97,13 @@ jobs: PP_PATH=$RUNNER_TEMP/fbh_deep_link_example_app_profile.mobileprovision KEYCHAIN_PATH=~/Library/Keychains/login.keychain-db + # Check keychain status + echo "All keychains:" + security list-keychains + + echo "Is keychain unlocked?" + security show-keychain-info $KEYCHAIN_PATH + # Import certificate and provisioning profile from secrets echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH @@ -111,6 +118,7 @@ jobs: security list-keychain -d user -s $KEYCHAIN_PATH # Verify certificate was loaded into keychain + echo "Verifying that the signing certificate was loaded into the keychain" security find-identity -p codesigning -v # Apply provisioning profile @@ -118,9 +126,11 @@ jobs: cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles # List all provisioning profiles to make sure we placed it correctly + echo "Listing all provisioning profiles in the CI server" ls ~/Library/MobileDevice/Provisioning\ Profiles/ # Save ExportOptions.plist from Base64 to file + echo "Saving the base64 encoded ExportOptions.plist to $EXPORT_OPTS_PATH" echo -n "$EXPORT_OPTIONS_PLIST" | base64 --decode -o $EXPORT_OPTS_PATH - name: Checkout repository @@ -131,6 +141,11 @@ jobs: sudo xcode-select -s /Applications/Xcode.app xcodebuild -version + - name: Verify Xcode access to provisioning profile + run: | + echo "Listing all provisioning profiles visible to xcode:" + xcrun simctl list profiles + - name: Set up Flutter uses: subosito/flutter-action@v2 with: From 4c5060aa3a227499106264ee4acd0ad5475e2271 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 13:15:49 -0800 Subject: [PATCH 043/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 5ec30b0..b3c5db2 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -90,11 +90,12 @@ jobs: BUILD_CERTIFICATE_BASE64: ${{ secrets.SIGNING_CERTIFICATE }} P12_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }} BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE }} + PP_FILE_NAME: fbh_deep_link_example_app_profile.mobileprovision EXPORT_OPTIONS_PLIST: ${{ secrets.EXPORT_OPTIONS_PLIST }} run: | # Create variables CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 - PP_PATH=$RUNNER_TEMP/fbh_deep_link_example_app_profile.mobileprovision + PP_PATH=$RUNNER_TEMP/$PP_FILE_NAME KEYCHAIN_PATH=~/Library/Keychains/login.keychain-db # Check keychain status @@ -127,7 +128,13 @@ jobs: # List all provisioning profiles to make sure we placed it correctly echo "Listing all provisioning profiles in the CI server" - ls ~/Library/MobileDevice/Provisioning\ Profiles/ + ls ~/Library/MobileDevice/Provisioning\ Profiles/$PP_FILE_NAME + echo "" + + # Check provisioning profile data + echo "Provisioning profile data:" + security cms -D -i ~/Library/MobileDevice/Provisioning\ Profiles/ + echo "" # Save ExportOptions.plist from Base64 to file echo "Saving the base64 encoded ExportOptions.plist to $EXPORT_OPTS_PATH" @@ -144,7 +151,7 @@ jobs: - name: Verify Xcode access to provisioning profile run: | echo "Listing all provisioning profiles visible to xcode:" - xcrun simctl list profiles + cd ios && xcodebuild -showBuildSettings - name: Set up Flutter uses: subosito/flutter-action@v2 From 13a20cd9bc475f8677a71a4fdbfa6e64371552ac Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 13:16:41 -0800 Subject: [PATCH 044/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index b3c5db2..d6d44fc 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -128,12 +128,12 @@ jobs: # List all provisioning profiles to make sure we placed it correctly echo "Listing all provisioning profiles in the CI server" - ls ~/Library/MobileDevice/Provisioning\ Profiles/$PP_FILE_NAME + ls ~/Library/MobileDevice/Provisioning\ Profiles/ echo "" # Check provisioning profile data echo "Provisioning profile data:" - security cms -D -i ~/Library/MobileDevice/Provisioning\ Profiles/ + security cms -D -i ~/Library/MobileDevice/Provisioning\ Profiles/$PP_FILE_NAME echo "" # Save ExportOptions.plist from Base64 to file From b468f76b67724ac33288450ceb5426b62d042160 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 13:34:30 -0800 Subject: [PATCH 045/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index d6d44fc..383f60f 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -148,11 +148,16 @@ jobs: sudo xcode-select -s /Applications/Xcode.app xcodebuild -version - - name: Verify Xcode access to provisioning profile + - name: Check Xcode build settings run: | - echo "Listing all provisioning profiles visible to xcode:" + echo "Listing all the build settings for the project:" cd ios && xcodebuild -showBuildSettings + - name: Check Xcode project Runner build settings + run: | + echo "Listing all the build settings for the Runner scheme:" + cd ios && xcodebuild -workspace Runner.xcworkspace -scheme Runner -showBuildSettings + - name: Set up Flutter uses: subosito/flutter-action@v2 with: @@ -163,7 +168,7 @@ jobs: run: flutter pub get - name: Build iOS App - run: flutter build ipa --debug --export-options-plist=$EXPORT_OPTS_PATH + run: flutter build ipa --debug --verbose --export-options-plist=$EXPORT_OPTS_PATH - name: Install iOS App run: flutter install ipa From 490d5fdabe39536b5b603071e0c05805cefb7ef5 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 14:01:53 -0800 Subject: [PATCH 046/120] Working on iOS GitHub CI --- .../ios/Runner.xcodeproj/project.pbxproj | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj index 2378dfa..0a697a4 100644 --- a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj @@ -364,8 +364,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 2X9AB296W2; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2X9AB296W2; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -374,6 +376,8 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = fbh_deep_link_example_app_profile; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -545,8 +549,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 2X9AB296W2; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2X9AB296W2; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -555,6 +561,8 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = fbh_deep_link_example_app_profile; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -569,8 +577,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 2X9AB296W2; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2X9AB296W2; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -579,6 +589,8 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = fbh_deep_link_example_app_profile; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; From c25d463eb1bf1744f1027df497186b58bdb10dbf Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 14:20:43 -0800 Subject: [PATCH 047/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 383f60f..102a16c 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -167,11 +167,11 @@ jobs: - name: Install Flutter Dependencies run: flutter pub get - - name: Build iOS App - run: flutter build ipa --debug --verbose --export-options-plist=$EXPORT_OPTS_PATH - - - name: Install iOS App - run: flutter install ipa +# - name: Build iOS App +# run: flutter build ipa --debug --verbose --export-options-plist=$EXPORT_OPTS_PATH +# +# - name: Install iOS App +# run: flutter install ipa - name: Create and Boot iOS Simulator run: | @@ -186,3 +186,8 @@ jobs: xcrun simctl boot "$SIMULATOR_ID" xcrun simctl list devices booted + - name: Run Flutter app and tests + run: | + flutter run & \ + sleep 60 && \ + flutter test test_driver/deep_link_ios_test.dart From 16becdf99eeaf9224d638a0348c2d153897d5f1c Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 14:26:21 -0800 Subject: [PATCH 048/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 102a16c..3edeb9f 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -189,5 +189,5 @@ jobs: - name: Run Flutter app and tests run: | flutter run & \ - sleep 60 && \ + sleep 180 && \ flutter test test_driver/deep_link_ios_test.dart From a8b97eae1d32a7a680ae427efb39ab17560d08f1 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 14:39:08 -0800 Subject: [PATCH 049/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 3edeb9f..fe3c7b6 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -186,8 +186,8 @@ jobs: xcrun simctl boot "$SIMULATOR_ID" xcrun simctl list devices booted - - name: Run Flutter app and tests - run: | - flutter run & \ - sleep 180 && \ - flutter test test_driver/deep_link_ios_test.dart + - name: Install the app + run: flutter install --debug + + - name: Run the iOS deep link tests + run: flutter test test_driver/deep_link_ios_test.dart From 2669ef0e5bc5dc22142de71c901fc8966776552b Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 14:43:24 -0800 Subject: [PATCH 050/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index fe3c7b6..43f432b 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -187,7 +187,7 @@ jobs: xcrun simctl list devices booted - name: Install the app - run: flutter install --debug + run: flutter install --debug --verbose - name: Run the iOS deep link tests run: flutter test test_driver/deep_link_ios_test.dart From 7da68b6c984e95502f9faeae05f14c45a118d84e Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 14:52:15 -0800 Subject: [PATCH 051/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 3 +++ .../ios/Runner.xcodeproj/project.pbxproj | 21 ++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 43f432b..cb72341 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -186,6 +186,9 @@ jobs: xcrun simctl boot "$SIMULATOR_ID" xcrun simctl list devices booted + - name: Build the app + run: flutter build ios --debug --verbose + - name: Install the app run: flutter install --debug --verbose diff --git a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj index 0a697a4..ceed118 100644 --- a/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/flutter_test_runners/example_deep_links/ios/Runner.xcodeproj/project.pbxproj @@ -364,10 +364,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2X9AB296W2; + DEVELOPMENT_TEAM = 2X9AB296W2; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -377,7 +377,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = fbh_deep_link_example_app_profile; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -549,10 +548,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2X9AB296W2; + DEVELOPMENT_TEAM = 2X9AB296W2; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -562,7 +561,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = fbh_deep_link_example_app_profile; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -577,10 +575,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 2X9AB296W2; + DEVELOPMENT_TEAM = 2X9AB296W2; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -590,7 +588,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.flutterbountyhunters.deeplinks.example; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = fbh_deep_link_example_app_profile; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; From cfffefd30c9e9688e8339b50cd1d92e46006773c Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 14:59:38 -0800 Subject: [PATCH 052/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index cb72341..078fab1 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -167,6 +167,9 @@ jobs: - name: Install Flutter Dependencies run: flutter pub get + - name: Build the app + run: flutter build ios --debug --verbose --no-code-sign + # - name: Build iOS App # run: flutter build ipa --debug --verbose --export-options-plist=$EXPORT_OPTS_PATH # @@ -186,9 +189,6 @@ jobs: xcrun simctl boot "$SIMULATOR_ID" xcrun simctl list devices booted - - name: Build the app - run: flutter build ios --debug --verbose - - name: Install the app run: flutter install --debug --verbose From 951a758135108c62093254299c43e89a2d44ec7b Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 15:01:51 -0800 Subject: [PATCH 053/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 078fab1..684cd50 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -168,7 +168,7 @@ jobs: run: flutter pub get - name: Build the app - run: flutter build ios --debug --verbose --no-code-sign + run: flutter build ios --debug --verbose --no-codesign # - name: Build iOS App # run: flutter build ipa --debug --verbose --export-options-plist=$EXPORT_OPTS_PATH From cdc196f8d59639915f945650f398abbc96705521 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 16:46:44 -0800 Subject: [PATCH 054/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 684cd50..a4084ba 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -170,6 +170,25 @@ jobs: - name: Build the app run: flutter build ios --debug --verbose --no-codesign + - name: Check for built app + run: | + echo "Checking for app build artifacts..." + echo "build/" + ls -la build + echo "" + + echo "build/ios/" + ls -la build/ios + echo "" + + echo "build/ios/Debug-iphoneos/" + ls -la build/ios/Debug-iphoneos + echo "" + + echo "build/ios/iphoneos/" + ls -la build/ios/iphoneos + echo "" + # - name: Build iOS App # run: flutter build ipa --debug --verbose --export-options-plist=$EXPORT_OPTS_PATH # From b4264aada3fd097f02bd276d0786310e31f3218d Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 16:53:57 -0800 Subject: [PATCH 055/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index a4084ba..6876802 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -208,8 +208,11 @@ jobs: xcrun simctl boot "$SIMULATOR_ID" xcrun simctl list devices booted + # Install the app using xcrun. Apparently, there's no Flutter command to + # install an unsigned iOS app. The "flutter install" command only works if + # the app is signed. - name: Install the app - run: flutter install --debug --verbose + run: xcrun simctl install booted build/ios/iphoneos/Runner.app - name: Run the iOS deep link tests run: flutter test test_driver/deep_link_ios_test.dart From 32de25281e1ffc2521a8de68df3fae2bad063dc5 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 17:04:58 -0800 Subject: [PATCH 056/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 6876802..5be8cb4 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -168,7 +168,7 @@ jobs: run: flutter pub get - name: Build the app - run: flutter build ios --debug --verbose --no-codesign + run: flutter build ios --debug --verbose --simulator --no-codesign - name: Check for built app run: | @@ -181,12 +181,12 @@ jobs: ls -la build/ios echo "" - echo "build/ios/Debug-iphoneos/" - ls -la build/ios/Debug-iphoneos + echo "build/ios/Debug-iphonesimulator/" + ls -la build/ios/Debug-iphonesimulator echo "" - echo "build/ios/iphoneos/" - ls -la build/ios/iphoneos + echo "build/ios/iphonesimulator/" + ls -la build/ios/iphonesimulator echo "" # - name: Build iOS App @@ -212,7 +212,7 @@ jobs: # install an unsigned iOS app. The "flutter install" command only works if # the app is signed. - name: Install the app - run: xcrun simctl install booted build/ios/iphoneos/Runner.app + run: xcrun simctl install booted build/ios/iphonesimulator/Runner.app - name: Run the iOS deep link tests run: flutter test test_driver/deep_link_ios_test.dart From 0565ea5e9ae6c2872e05be6b94ad93eca7d0eb14 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 17:13:41 -0800 Subject: [PATCH 057/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 5be8cb4..96c05f4 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -214,5 +214,15 @@ jobs: - name: Install the app run: xcrun simctl install booted build/ios/iphonesimulator/Runner.app + - name: Check for installed app on simulator + run: | + echo "Checking for app's container on the booted simulator:" + xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example + + - name: Launch the app on the simulator just to prove we can + run: | + echo "Launching the installed app to prove that we can..." + xcrun simctl launch booted com.flutterbountyhunters.deeplinks.example + - name: Run the iOS deep link tests run: flutter test test_driver/deep_link_ios_test.dart From 7b8f3bd6eae6133bec2c8e16605c0cd7b9d298d3 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 17:28:28 -0800 Subject: [PATCH 058/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 39 ++++++++++--------- .../lib/src/deep_links/deep_links_ios.dart | 9 +++-- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 289a38d..bd6803a 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -13,30 +13,31 @@ void main() { "home screen", appBundleId: appBundleId, deepLink: "https://deeplinks.flutterbountyhunters.com", + verbose: true, (driver) async { await driver.waitFor(find.text("Home Screen")); await Future.delayed(const Duration(seconds: 3)); }, ); - testDeepLinkIosAppLaunch( - "sign-up screen", - appBundleId: appBundleId, - deepLink: "https://deeplinks.flutterbountyhunters.com/signup", - (driver) async { - await driver.waitFor(find.text("Sign Up")); - await Future.delayed(const Duration(seconds: 3)); - }, - ); - - testDeepLinkIosAppLaunch( - "profile screen", - appBundleId: appBundleId, - deepLink: "https://deeplinks.flutterbountyhunters.com/user/profile", - (driver) async { - await driver.waitFor(find.text("User Profile")); - await Future.delayed(const Duration(seconds: 3)); - }, - ); + // testDeepLinkIosAppLaunch( + // "sign-up screen", + // appBundleId: appBundleId, + // deepLink: "https://deeplinks.flutterbountyhunters.com/signup", + // (driver) async { + // await driver.waitFor(find.text("Sign Up")); + // await Future.delayed(const Duration(seconds: 3)); + // }, + // ); + // + // testDeepLinkIosAppLaunch( + // "profile screen", + // appBundleId: appBundleId, + // deepLink: "https://deeplinks.flutterbountyhunters.com/user/profile", + // (driver) async { + // await driver.waitFor(find.text("User Profile")); + // await Future.delayed(const Duration(seconds: 3)); + // }, + // ); }); } diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index aca1319..65fd000 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -30,6 +30,7 @@ void testDeepLinkIosAppLaunch( _log.info("Running deep link test driver..."); // Pre-emptively the kill the app, in case it's already running. + _log.info("Pre-emptively killing the app"); await Xcrun.killApp(appBundleId); FlutterDriver? driver; @@ -56,7 +57,7 @@ void testDeepLinkIosAppLaunch( await Xcrun.listenToXcrunForFlutterLogs( appBundleId, onLog: (log) { - _log.info(log); + // _log.info(log); if (log.contains("Dart VM service")) { _log.info("Found Dart VM log:\n$log"); @@ -68,7 +69,7 @@ void testDeepLinkIosAppLaunch( } }, onError: (error) { - _log.shout("LOGCAT ERROR:"); + _log.shout("iOS ERROR:"); _log.shout(error); }, ); @@ -90,7 +91,7 @@ void testDeepLinkIosAppLaunch( // Wait for a moment so that the app has time to start the Dart VM // service and report it in the device logs. _log.info("Waiting a moment so that app can launch the Dart VM service."); - await Future.delayed(const Duration(seconds: 1)); + await Future.delayed(const Duration(seconds: 5)); // Ensure that we found the Dart VM service URL. expect( @@ -107,10 +108,12 @@ void testDeepLinkIosAppLaunch( // Setup port forwarding between the host machine running the test, and the // Android device that's running the app, so we can talk to the Dart VM service. final port = Uri.parse(dartVmService!).port; + _log.info("Forwarding simulator port: $port"); await Xcrun.forwardTcpPort(port); // Connect to the Dart VM service in the app with Flutter Driver. try { + _log.info("Connecting to Flutter Driver extension in the Dart VM service."); driver = await FlutterDriver.connect( dartVmServiceUrl: dartVmService, ); From eb013c03088cc0e5cf3c7e6b921a5efb41132214 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 17:36:15 -0800 Subject: [PATCH 059/120] Working on iOS GitHub CI --- .../flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 247e6ee..f40cf37 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -98,7 +98,7 @@ class Xcrun { /// Kills the app with the given [appBundleId] ID, e.g., `com.acme.myapp`. static Future killApp(String appBundleId) async { - await Process.run("xcrun", ["simctl", "terminate", "booted", appBundleId]); + await Process.run("sh", ["-c", "xcrun", "simctl", "terminate", "booted", appBundleId]); } /// Clears all logs in the iOS log stream. From cbb7b32c257b46bbb6e33cecde1238d6351f5699 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 17:44:50 -0800 Subject: [PATCH 060/120] Working on iOS GitHub CI --- .../flutter_test_runners/lib/src/deep_links/deep_links_ios.dart | 1 + .../flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index 65fd000..3ee4625 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -44,6 +44,7 @@ void testDeepLinkIosAppLaunch( }); // Ensure the app isn't running yet. + _log.info("Checking if the app is running..."); expect(await Xcrun.isAppRunning(appBundleId), isFalse); _log.info("We've verified the app isn't running"); diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index f40cf37..247e6ee 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -98,7 +98,7 @@ class Xcrun { /// Kills the app with the given [appBundleId] ID, e.g., `com.acme.myapp`. static Future killApp(String appBundleId) async { - await Process.run("sh", ["-c", "xcrun", "simctl", "terminate", "booted", appBundleId]); + await Process.run("xcrun", ["simctl", "terminate", "booted", appBundleId]); } /// Clears all logs in the iOS log stream. From d793dd5a63cfb15456def5037d5c433718e16e9c Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 17:56:42 -0800 Subject: [PATCH 061/120] Working on iOS GitHub CI --- .../lib/src/deep_links/deep_links_ios.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index 3ee4625..519cc2c 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -44,16 +44,18 @@ void testDeepLinkIosAppLaunch( }); // Ensure the app isn't running yet. - _log.info("Checking if the app is running..."); - expect(await Xcrun.isAppRunning(appBundleId), isFalse); - _log.info("We've verified the app isn't running"); + // _log.info("Checking if the app is running..."); + // expect(await Xcrun.isAppRunning(appBundleId), isFalse); + // _log.info("We've verified the app isn't running"); // Clear previous logcat messages so we don't try to connect to a previous // Dart VM service listing. + _log.info("Clearing old logs"); await Xcrun.clearLogcat(); _log.info("We've cleared old logs"); // Listen to iOS logs to find the Dart VM service for the running app. + _log.info("Registering for simulator logs"); String? dartVmService; await Xcrun.listenToXcrunForFlutterLogs( appBundleId, From 31e244f7a4c65a75bff03978e707f7fcf6a1f228 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 18:02:23 -0800 Subject: [PATCH 062/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 8 ++++---- .../lib/src/deep_links/deep_links_ios.dart | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 96c05f4..404c3cd 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -219,10 +219,10 @@ jobs: echo "Checking for app's container on the booted simulator:" xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example - - name: Launch the app on the simulator just to prove we can - run: | - echo "Launching the installed app to prove that we can..." - xcrun simctl launch booted com.flutterbountyhunters.deeplinks.example +# - name: Launch the app on the simulator just to prove we can +# run: | +# echo "Launching the installed app to prove that we can..." +# xcrun simctl launch booted com.flutterbountyhunters.deeplinks.example - name: Run the iOS deep link tests run: flutter test test_driver/deep_link_ios_test.dart diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index 519cc2c..7b00bbb 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -30,8 +30,8 @@ void testDeepLinkIosAppLaunch( _log.info("Running deep link test driver..."); // Pre-emptively the kill the app, in case it's already running. - _log.info("Pre-emptively killing the app"); - await Xcrun.killApp(appBundleId); + // _log.info("Pre-emptively killing the app"); + // await Xcrun.killApp(appBundleId); FlutterDriver? driver; addTearDown(() async { From 5888d4f1e15f1dcdb84c411b6f468cd473e2f7a7 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 18:11:12 -0800 Subject: [PATCH 063/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index bd6803a..6f052d9 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter_driver/flutter_driver.dart'; import 'package:flutter_test_runners/flutter_test_runners.dart'; import 'package:test/test.dart'; @@ -9,6 +11,17 @@ void main() { // xcrun simctl openurl booted https://deeplinks.flutterbountyhunters.com group("Deep link launches app > iOS >", () { + test("xcrun sanity check", () async { + print("Running xcrun Process sanity check..."); + await Process.run("xcrun", [ + "simctl", + "get_app_container", + "booted", + "com.flutterbountyhunters.deeplinks.example", + ]); + print("The xcrun call returned without issue"); + }); + testDeepLinkIosAppLaunch( "home screen", appBundleId: appBundleId, From 08f60e6e6f990be3260ea1194039f2226129be02 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 18:20:38 -0800 Subject: [PATCH 064/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 43 +++++++++++-------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 6f052d9..46b8b3e 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -12,26 +12,35 @@ void main() { group("Deep link launches app > iOS >", () { test("xcrun sanity check", () async { - print("Running xcrun Process sanity check..."); - await Process.run("xcrun", [ - "simctl", - "get_app_container", - "booted", - "com.flutterbountyhunters.deeplinks.example", - ]); + print("Running xcrun Process sanity check."); + + print("Env variables:"); + print(Process.runSync('env', []).stdout); + + print("Running the command..."); + await Process.run( + "xcrun", + [ + "simctl", + "get_app_container", + "booted", + "com.flutterbountyhunters.deeplinks.example", + ], + environment: {'DEVELOPER_DIR': '/Applications/Xcode.app/Contents/Developer'}, + ); print("The xcrun call returned without issue"); }); - testDeepLinkIosAppLaunch( - "home screen", - appBundleId: appBundleId, - deepLink: "https://deeplinks.flutterbountyhunters.com", - verbose: true, - (driver) async { - await driver.waitFor(find.text("Home Screen")); - await Future.delayed(const Duration(seconds: 3)); - }, - ); + // testDeepLinkIosAppLaunch( + // "home screen", + // appBundleId: appBundleId, + // deepLink: "https://deeplinks.flutterbountyhunters.com", + // verbose: true, + // (driver) async { + // await driver.waitFor(find.text("Home Screen")); + // await Future.delayed(const Duration(seconds: 3)); + // }, + // ); // testDeepLinkIosAppLaunch( // "sign-up screen", From ec80d78239d1d241cebe911ad28e302c2a6ca007 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 18:30:14 -0800 Subject: [PATCH 065/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 46b8b3e..09dcd9f 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -1,3 +1,4 @@ +import 'dart:convert'; import 'dart:io'; import 'package:flutter_driver/flutter_driver.dart'; @@ -18,7 +19,7 @@ void main() { print(Process.runSync('env', []).stdout); print("Running the command..."); - await Process.run( + final process = await Process.start( "xcrun", [ "simctl", @@ -28,7 +29,11 @@ void main() { ], environment: {'DEVELOPER_DIR': '/Applications/Xcode.app/Contents/Developer'}, ); - print("The xcrun call returned without issue"); + process.stdout.transform(utf8.decoder).listen((data) {}); + process.stderr.transform(utf8.decoder).listen((data) {}); + print("The process started..."); + final exitCode = await process.exitCode; + print("The xcrun call returned with exit code: $exitCode"); }); // testDeepLinkIosAppLaunch( From d943d587f47886d5001d7683f6fd4c050735d370 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 18:40:45 -0800 Subject: [PATCH 066/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 09dcd9f..045ee57 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -29,8 +29,12 @@ void main() { ], environment: {'DEVELOPER_DIR': '/Applications/Xcode.app/Contents/Developer'}, ); - process.stdout.transform(utf8.decoder).listen((data) {}); - process.stderr.transform(utf8.decoder).listen((data) {}); + process.stdout.transform(utf8.decoder).listen((data) { + print("STDOUT:\n$data"); + }); + process.stderr.transform(utf8.decoder).listen((data) { + print("STDERR:\n$data"); + }); print("The process started..."); final exitCode = await process.exitCode; print("The xcrun call returned with exit code: $exitCode"); From 25e6cc23c636b0f1deadc4bb77ab8ac505ee1c65 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 18:52:38 -0800 Subject: [PATCH 067/120] Working on iOS GitHub CI --- .../example_deep_links/test_driver/deep_link_ios_test.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 045ee57..cf022c9 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -27,7 +27,9 @@ void main() { "booted", "com.flutterbountyhunters.deeplinks.example", ], - environment: {'DEVELOPER_DIR': '/Applications/Xcode.app/Contents/Developer'}, + environment: { + 'FLUTTER_TEST': 'false', + }, ); process.stdout.transform(utf8.decoder).listen((data) { print("STDOUT:\n$data"); @@ -36,6 +38,9 @@ void main() { print("STDERR:\n$data"); }); print("The process started..."); + print("Closing stdin"); + process.stdin.close(); + print("Waiting for exist code..."); final exitCode = await process.exitCode; print("The xcrun call returned with exit code: $exitCode"); }); From 58a6fefc4d15e9f80a6d196510f09b5f61d04dd7 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 19:04:00 -0800 Subject: [PATCH 068/120] Working on iOS GitHub CI --- .../example_deep_links/test_driver/deep_link_ios_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index cf022c9..3fea11b 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -30,6 +30,8 @@ void main() { environment: { 'FLUTTER_TEST': 'false', }, + runInShell: true, + mode: ProcessStartMode.detachedWithStdio, ); process.stdout.transform(utf8.decoder).listen((data) { print("STDOUT:\n$data"); @@ -40,7 +42,7 @@ void main() { print("The process started..."); print("Closing stdin"); process.stdin.close(); - print("Waiting for exist code..."); + print("Waiting for exit code..."); final exitCode = await process.exitCode; print("The xcrun call returned with exit code: $exitCode"); }); From b05878c0b05b0b6ea0cc2d12b53654e8217c5ec3 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 19:12:45 -0800 Subject: [PATCH 069/120] Working on iOS GitHub CI --- .../example_deep_links/test_driver/deep_link_ios_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 3fea11b..8f09ff7 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -31,7 +31,7 @@ void main() { 'FLUTTER_TEST': 'false', }, runInShell: true, - mode: ProcessStartMode.detachedWithStdio, + mode: ProcessStartMode.inheritStdio, ); process.stdout.transform(utf8.decoder).listen((data) { print("STDOUT:\n$data"); From 4f120bd6f5e635cd3fa710bbf50f41fddc4b14de Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 19:17:33 -0800 Subject: [PATCH 070/120] Working on iOS GitHub CI --- .../example_deep_links/test_driver/deep_link_ios_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 8f09ff7..f9b1b6b 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -31,7 +31,7 @@ void main() { 'FLUTTER_TEST': 'false', }, runInShell: true, - mode: ProcessStartMode.inheritStdio, + includeParentEnvironment: false, ); process.stdout.transform(utf8.decoder).listen((data) { print("STDOUT:\n$data"); From d47994a3e21b24bd13f56ff3e770f19edef42890 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 19:33:40 -0800 Subject: [PATCH 071/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index f9b1b6b..86f1aa1 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -19,20 +19,21 @@ void main() { print(Process.runSync('env', []).stdout); print("Running the command..."); - final process = await Process.start( - "xcrun", - [ - "simctl", - "get_app_container", - "booted", - "com.flutterbountyhunters.deeplinks.example", - ], - environment: { - 'FLUTTER_TEST': 'false', - }, - runInShell: true, - includeParentEnvironment: false, - ); + final process = await Process.start("pwd", []); + // final process = await Process.start( + // "xcrun", + // [ + // "simctl", + // "get_app_container", + // "booted", + // "com.flutterbountyhunters.deeplinks.example", + // ], + // environment: { + // 'FLUTTER_TEST': 'false', + // }, + // runInShell: true, + // includeParentEnvironment: false, + // ); process.stdout.transform(utf8.decoder).listen((data) { print("STDOUT:\n$data"); }); From ca00cff23f7d90b07690fc9cdba05192f055739e Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 19:40:32 -0800 Subject: [PATCH 072/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 86f1aa1..0df9776 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -19,21 +19,17 @@ void main() { print(Process.runSync('env', []).stdout); print("Running the command..."); - final process = await Process.start("pwd", []); - // final process = await Process.start( - // "xcrun", - // [ - // "simctl", - // "get_app_container", - // "booted", - // "com.flutterbountyhunters.deeplinks.example", - // ], - // environment: { - // 'FLUTTER_TEST': 'false', - // }, - // runInShell: true, - // includeParentEnvironment: false, - // ); + final process = await Process.start( + "xcrun", + [ + "simctl", + "list", + "--verbose", + // "get_app_container", + // "booted", + // "com.flutterbountyhunters.deeplinks.example", + ], + ); process.stdout.transform(utf8.decoder).listen((data) { print("STDOUT:\n$data"); }); From cf629f82ca521d3feb66c520bb037a3c793f4ab4 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 19:48:45 -0800 Subject: [PATCH 073/120] Working on iOS GitHub CI --- .../example_deep_links/test_driver/deep_link_ios_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 0df9776..15af6a1 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -20,8 +20,10 @@ void main() { print("Running the command..."); final process = await Process.start( - "xcrun", + "sh", [ + "-c", + "xcrun", "simctl", "list", "--verbose", From 78a2c086f7a4689a775824405f31d2c6111f5c2e Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 19:53:16 -0800 Subject: [PATCH 074/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 15af6a1..bd7ca8a 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -15,8 +15,8 @@ void main() { test("xcrun sanity check", () async { print("Running xcrun Process sanity check."); - print("Env variables:"); - print(Process.runSync('env', []).stdout); + // print("Env variables:"); + // print(Process.runSync('env', []).stdout); print("Running the command..."); final process = await Process.start( @@ -25,11 +25,11 @@ void main() { "-c", "xcrun", "simctl", - "list", - "--verbose", - // "get_app_container", - // "booted", - // "com.flutterbountyhunters.deeplinks.example", + // "list", + // "--verbose", + "get_app_container", + "booted", + "com.flutterbountyhunters.deeplinks.example", ], ); process.stdout.transform(utf8.decoder).listen((data) { From 4349d00abe64fc1c2b906914a81d62e508bdc07b Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 19:59:35 -0800 Subject: [PATCH 075/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index bd7ca8a..36a0785 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -19,7 +19,7 @@ void main() { // print(Process.runSync('env', []).stdout); print("Running the command..."); - final process = await Process.start( + final result = await Process.run( "sh", [ "-c", @@ -32,18 +32,19 @@ void main() { "com.flutterbountyhunters.deeplinks.example", ], ); - process.stdout.transform(utf8.decoder).listen((data) { - print("STDOUT:\n$data"); - }); - process.stderr.transform(utf8.decoder).listen((data) { - print("STDERR:\n$data"); - }); - print("The process started..."); - print("Closing stdin"); - process.stdin.close(); - print("Waiting for exit code..."); - final exitCode = await process.exitCode; - print("The xcrun call returned with exit code: $exitCode"); + // process.stdout.transform(utf8.decoder).listen((data) { + // print("STDOUT:\n$data"); + // }); + // process.stderr.transform(utf8.decoder).listen((data) { + // print("STDERR:\n$data"); + // }); + // print("The process started..."); + // print("Closing stdin"); + // process.stdin.close(); + // print("Waiting for exit code..."); + // final exitCode = await process.exitCode; + // print("The xcrun call returned with exit code: $exitCode"); + print("The xcrun call returned with exit code: ${result.exitCode}"); }); // testDeepLinkIosAppLaunch( From 1a8c0f2e9fba98d5d470e44dd8a94f5c04002927 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 20:45:43 -0800 Subject: [PATCH 076/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 88 +++++++-------- .../lib/src/deep_links/deep_links_ios.dart | 10 +- .../lib/src/platform_comms/ios/xcrun.dart | 103 +++++++++++++----- 3 files changed, 125 insertions(+), 76 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 36a0785..1ef7c7c 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -12,51 +12,51 @@ void main() { // xcrun simctl openurl booted https://deeplinks.flutterbountyhunters.com group("Deep link launches app > iOS >", () { - test("xcrun sanity check", () async { - print("Running xcrun Process sanity check."); - - // print("Env variables:"); - // print(Process.runSync('env', []).stdout); - - print("Running the command..."); - final result = await Process.run( - "sh", - [ - "-c", - "xcrun", - "simctl", - // "list", - // "--verbose", - "get_app_container", - "booted", - "com.flutterbountyhunters.deeplinks.example", - ], - ); - // process.stdout.transform(utf8.decoder).listen((data) { - // print("STDOUT:\n$data"); - // }); - // process.stderr.transform(utf8.decoder).listen((data) { - // print("STDERR:\n$data"); - // }); - // print("The process started..."); - // print("Closing stdin"); - // process.stdin.close(); - // print("Waiting for exit code..."); - // final exitCode = await process.exitCode; - // print("The xcrun call returned with exit code: $exitCode"); - print("The xcrun call returned with exit code: ${result.exitCode}"); - }); + // test("xcrun sanity check", () async { + // print("Running xcrun Process sanity check."); + // + // // print("Env variables:"); + // // print(Process.runSync('env', []).stdout); + // + // print("Running the command..."); + // final result = await Process.run( + // "sh", + // [ + // "-c", + // "xcrun", + // "simctl", + // // "list", + // // "--verbose", + // "get_app_container", + // "booted", + // "com.flutterbountyhunters.deeplinks.example", + // ], + // ); + // // process.stdout.transform(utf8.decoder).listen((data) { + // // print("STDOUT:\n$data"); + // // }); + // // process.stderr.transform(utf8.decoder).listen((data) { + // // print("STDERR:\n$data"); + // // }); + // // print("The process started..."); + // // print("Closing stdin"); + // // process.stdin.close(); + // // print("Waiting for exit code..."); + // // final exitCode = await process.exitCode; + // // print("The xcrun call returned with exit code: $exitCode"); + // print("The xcrun call returned with exit code: ${result.exitCode}"); + // }); - // testDeepLinkIosAppLaunch( - // "home screen", - // appBundleId: appBundleId, - // deepLink: "https://deeplinks.flutterbountyhunters.com", - // verbose: true, - // (driver) async { - // await driver.waitFor(find.text("Home Screen")); - // await Future.delayed(const Duration(seconds: 3)); - // }, - // ); + testDeepLinkIosAppLaunch( + "home screen", + appBundleId: appBundleId, + deepLink: "https://deeplinks.flutterbountyhunters.com", + verbose: true, + (driver) async { + await driver.waitFor(find.text("Home Screen")); + await Future.delayed(const Duration(seconds: 3)); + }, + ); // testDeepLinkIosAppLaunch( // "sign-up screen", diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index 7b00bbb..8b9764f 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -30,8 +30,8 @@ void testDeepLinkIosAppLaunch( _log.info("Running deep link test driver..."); // Pre-emptively the kill the app, in case it's already running. - // _log.info("Pre-emptively killing the app"); - // await Xcrun.killApp(appBundleId); + _log.info("Pre-emptively killing the app"); + await Xcrun.killApp(appBundleId); FlutterDriver? driver; addTearDown(() async { @@ -44,9 +44,9 @@ void testDeepLinkIosAppLaunch( }); // Ensure the app isn't running yet. - // _log.info("Checking if the app is running..."); - // expect(await Xcrun.isAppRunning(appBundleId), isFalse); - // _log.info("We've verified the app isn't running"); + _log.info("Checking if the app is running..."); + expect(await Xcrun.isAppRunning(appBundleId), isFalse); + _log.info("We've verified the app isn't running"); // Clear previous logcat messages so we don't try to connect to a previous // Dart VM service listing. diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 247e6ee..9b3ba0c 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -9,11 +9,25 @@ class Xcrun { /// A return value of `true` doesn't mean the app is visible. The app might /// be in the background, but still in memory. static Future isAppRunning(String appBundleId) async { - final result = await Process.run( - "sh", - ["-c", "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\""], - ); + // final result = await Process.run( + // "sh", + // [ + // "-c", + // "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\"", + // ], + // runInShell: true, + // ); + + // final result = await Process.run("sh", [ + // "-c", + // "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\"", + // ]); + + final result = await _runInShell([ + "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\"", + ]); final output = result.stdout; + print("Is app running? ${output != null && output is String && output.isNotEmpty}"); return output != null && output is String && output.isNotEmpty; } @@ -28,18 +42,24 @@ class Xcrun { void Function(String)? onLog, void Function(String)? onError, }) async { - final result = await Process.start("xcrun", [ - "simctl", - "spawn", - "booted", - "log", - "stream", - "--level", - "debug", - // Only log things related to the desired app. - "--predicate", - "(eventMessage CONTAINS '$appBundleId' OR eventMessage CONTAINS 'flutter')", - ]); + // This command doesn't work when run with a "sh -c". It also doesn't + // work when concatenating the args into a single string. + final result = await Process.start( + "xcrun", + [ + "simctl", + "spawn", + "booted", + "log", + "stream", + "--level", + "debug", + // Only log things related to the desired app. + "--predicate", + "(eventMessage CONTAINS '$appBundleId' OR eventMessage CONTAINS 'flutter')", + ], + runInShell: true, + ); result.stdout.transform(utf8.decoder).listen(onLog); result.stderr.transform(utf8.decoder).listen(onError); @@ -52,8 +72,8 @@ class Xcrun { /// /// This is useful, for example, when you want to connect to the Dart VM service /// running in a debug Flutter app on an iOS device. - static Future forwardTcpPort(int port) async { - await Process.run("xcrun", ["simctl", "port", "forward", "booted", "$port:$port"]); + static Future forwardTcpPort(int port) { + return _runInShell(["xcrun", "simctl", "port", "forward", "booted", "$port:$port"]); } /// Tells iOS to launch the given Universal Link, which might launch an app, if @@ -62,13 +82,16 @@ class Xcrun { /// The structure of the deep link is determined by the given app. static Future launchAppWithUniversalLink({ required String universalLink, - }) async { - // Not sure why we need to dispatch through a shell, but if we try to - // run the xcrun command directly, the deep link doesn't launch. - await Process.run("sh", [ - "-c", - "xcrun simctl openurl booted \"$universalLink\"", - ]); + }) { + // Note: This command only works when run with "sh" and the + // command as a single string. If the command is passed as + // individual arguments, it doesn't work. If the command is + // run without "sh" and `runInShell` is `true`, it won't work. + return _runInShell(["xcrun simctl openurl booted \"$universalLink\""]); + // return Process.run( + // "sh", + // ["-c", "xcrun simctl openurl booted \"$universalLink\""], + // ); } /// Waits for the app with the given [appBundleId] to appear in memory. @@ -98,11 +121,37 @@ class Xcrun { /// Kills the app with the given [appBundleId] ID, e.g., `com.acme.myapp`. static Future killApp(String appBundleId) async { - await Process.run("xcrun", ["simctl", "terminate", "booted", appBundleId]); + // final result = await _runInShell(["xcrun", "simctl", "terminate", "booted", appBundleId]); + final result = await Process.run( + "xcrun", + ["simctl", "terminate", "booted", appBundleId], + runInShell: true, + ); + print("Killed app - exit code: ${result.exitCode}"); } /// Clears all logs in the iOS log stream. static Future clearLogcat() async { - await Process.run("xcrun", ["simctl", "spawn", "booted", "log", "erase"]); + await _runInShell(["xcrun", "simctl", "spawn", "booted", "log", "erase"]); + } + + static Future _startInShell(List commandAndArgs) { + return Process.start("sh", ["-c", ...commandAndArgs]); + + // return Process.start( + // commandAndArgs.first, + // commandAndArgs.length > 1 ? commandAndArgs.sublist(1) : [], + // runInShell: true, + // ); + } + + static Future _runInShell(List commandAndArgs) { + print("Sending shell command: '${commandAndArgs.join(" ")}'"); + return Process.run("sh", ["-c", ...commandAndArgs]); + // return Process.run( + // commandAndArgs.first, + // commandAndArgs.length > 1 ? commandAndArgs.sublist(1) : [], + // runInShell: true, + // ); } } From f70fc9950dc76738c91347d8924bf10105d0d78a Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 20:52:55 -0800 Subject: [PATCH 077/120] Working on iOS GitHub CI --- .../lib/src/platform_comms/ios/xcrun.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 9b3ba0c..53f2aeb 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -121,12 +121,17 @@ class Xcrun { /// Kills the app with the given [appBundleId] ID, e.g., `com.acme.myapp`. static Future killApp(String appBundleId) async { - // final result = await _runInShell(["xcrun", "simctl", "terminate", "booted", appBundleId]); + // final result = await Process.run( + // "xcrun", + // ["simctl", "terminate", "booted", appBundleId], + // runInShell: true, + // ); + final result = await Process.run( - "xcrun", - ["simctl", "terminate", "booted", appBundleId], - runInShell: true, + "sh", + ["-c", "xcrun simctl terminate booted $appBundleId"], ); + print("Killed app - exit code: ${result.exitCode}"); } From eb4fa1769bafc13807f1807123ad02ef021b1c93 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 20:57:58 -0800 Subject: [PATCH 078/120] Working on iOS GitHub CI --- .../flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 53f2aeb..1fd983a 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -130,6 +130,7 @@ class Xcrun { final result = await Process.run( "sh", ["-c", "xcrun simctl terminate booted $appBundleId"], + runInShell: true, ); print("Killed app - exit code: ${result.exitCode}"); From 0155e0b0bf6bdaa3f90c862879098c84bca47240 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 21:06:08 -0800 Subject: [PATCH 079/120] Working on iOS GitHub CI --- .../flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 1fd983a..fe25cf9 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -127,10 +127,12 @@ class Xcrun { // runInShell: true, // ); + print("Sending xcrun simctl terminate command..."); final result = await Process.run( "sh", ["-c", "xcrun simctl terminate booted $appBundleId"], runInShell: true, + includeParentEnvironment: false, ); print("Killed app - exit code: ${result.exitCode}"); From b493e18a16e40a5c6bce7bf5f7aa9021c51e6ee8 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 21:12:27 -0800 Subject: [PATCH 080/120] Working on iOS GitHub CI --- .../lib/src/platform_comms/ios/xcrun.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index fe25cf9..294d618 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -128,14 +128,24 @@ class Xcrun { // ); print("Sending xcrun simctl terminate command..."); - final result = await Process.run( + final process = await Process.start( "sh", ["-c", "xcrun simctl terminate booted $appBundleId"], runInShell: true, includeParentEnvironment: false, ); + print("terminate command process was started"); - print("Killed app - exit code: ${result.exitCode}"); + process.stdout.transform(utf8.decoder).listen((log) { + print("terminate command log: $log"); + }); + + process.stderr.transform(utf8.decoder).listen((error) { + print("terminate command error: $error"); + }); + + final exitCode = await process.exitCode; + print("Killed app - exit code: $exitCode"); } /// Clears all logs in the iOS log stream. From ebfc60b1add8e77632d290e924199deb53b844ec Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 21:23:14 -0800 Subject: [PATCH 081/120] Working on iOS GitHub CI --- .../lib/src/platform_comms/ios/xcrun.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 294d618..d6549b5 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -132,10 +132,11 @@ class Xcrun { "sh", ["-c", "xcrun simctl terminate booted $appBundleId"], runInShell: true, - includeParentEnvironment: false, ); print("terminate command process was started"); + process.stdin.close(); + process.stdout.transform(utf8.decoder).listen((log) { print("terminate command log: $log"); }); @@ -144,6 +145,7 @@ class Xcrun { print("terminate command error: $error"); }); + print("Waiting for exit code..."); final exitCode = await process.exitCode; print("Killed app - exit code: $exitCode"); } From c13f450b34d973a64fe4deacad2d240eed4fae8d Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 21:30:58 -0800 Subject: [PATCH 082/120] Working on iOS GitHub CI --- .../flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index d6549b5..da56896 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -131,7 +131,6 @@ class Xcrun { final process = await Process.start( "sh", ["-c", "xcrun simctl terminate booted $appBundleId"], - runInShell: true, ); print("terminate command process was started"); From 5ae1f9cc8ace340bc6411b56ad35c97fd70ff813 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 21:41:05 -0800 Subject: [PATCH 083/120] Working on iOS GitHub CI --- .../lib/src/platform_comms/ios/xcrun.dart | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index da56896..2d3fd2a 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -130,19 +130,22 @@ class Xcrun { print("Sending xcrun simctl terminate command..."); final process = await Process.start( "sh", - ["-c", "xcrun simctl terminate booted $appBundleId"], + ["-c", "xcrun", "simctl", "terminate", "booted", appBundleId], ); print("terminate command process was started"); process.stdin.close(); - process.stdout.transform(utf8.decoder).listen((log) { - print("terminate command log: $log"); - }); + stdout.addStream(process.stdout); + stderr.addStream(process.stderr); - process.stderr.transform(utf8.decoder).listen((error) { - print("terminate command error: $error"); - }); + // process.stdout.transform(utf8.decoder).listen((log) { + // print("terminate command log: $log"); + // }); + // + // process.stderr.transform(utf8.decoder).listen((error) { + // print("terminate command error: $error"); + // }); print("Waiting for exit code..."); final exitCode = await process.exitCode; From d9df88d61a0b3169dc8427f0b823a360781b6ac5 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 22:03:05 -0800 Subject: [PATCH 084/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 1ef7c7c..b05db0a 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -47,16 +47,34 @@ void main() { // print("The xcrun call returned with exit code: ${result.exitCode}"); // }); - testDeepLinkIosAppLaunch( - "home screen", - appBundleId: appBundleId, - deepLink: "https://deeplinks.flutterbountyhunters.com", - verbose: true, - (driver) async { - await driver.waitFor(find.text("Home Screen")); - await Future.delayed(const Duration(seconds: 3)); - }, - ); + test("Send terminate command to simulator", () async { + print("Sending xcrun simctl terminate command..."); + final process = await Process.start( + "sh", + ["-c", "xcrun", "simctl", "terminate", "booted", "\"$appBundleId\""], + ); + print("terminate command process was started"); + + process.stdin.close(); + + stdout.addStream(process.stdout); + stderr.addStream(process.stderr); + + print("Waiting for exit code..."); + final exitCode = await process.exitCode; + print("Killed app - exit code: $exitCode"); + }); + + // testDeepLinkIosAppLaunch( + // "home screen", + // appBundleId: appBundleId, + // deepLink: "https://deeplinks.flutterbountyhunters.com", + // verbose: true, + // (driver) async { + // await driver.waitFor(find.text("Home Screen")); + // await Future.delayed(const Duration(seconds: 3)); + // }, + // ); // testDeepLinkIosAppLaunch( // "sign-up screen", From 5d7fc9f74a3adc20e83c6f986177322223eb7f22 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 22:13:19 -0800 Subject: [PATCH 085/120] Working on iOS GitHub CI --- .../example_deep_links/test_driver/deep_link_ios_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index b05db0a..1548400 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -51,7 +51,7 @@ void main() { print("Sending xcrun simctl terminate command..."); final process = await Process.start( "sh", - ["-c", "xcrun", "simctl", "terminate", "booted", "\"$appBundleId\""], + ["-c", "xcrun simctl terminate booted \"$appBundleId\""], ); print("terminate command process was started"); From 51df9102751328acc4374829afe07b1f5b78639f Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 22:26:58 -0800 Subject: [PATCH 086/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 1548400..5380157 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -49,9 +49,14 @@ void main() { test("Send terminate command to simulator", () async { print("Sending xcrun simctl terminate command..."); + // final process = await Process.start( + // "sh", + // ["-c", "xcrun", "simctl", "terminate", "booted", "\"$appBundleId\""], + // ); final process = await Process.start( - "sh", - ["-c", "xcrun simctl terminate booted \"$appBundleId\""], + "xcrun", + ["simctl", "terminate", "booted", "\"$appBundleId\""], + runInShell: true, ); print("terminate command process was started"); From 25d83d16b35d4dfa579ab155bc074fe1189a7286 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 23:07:36 -0800 Subject: [PATCH 087/120] Working on iOS GitHub CI --- .../example_deep_links/test_driver/deep_link_ios_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 5380157..654ff2e 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -55,7 +55,7 @@ void main() { // ); final process = await Process.start( "xcrun", - ["simctl", "terminate", "booted", "\"$appBundleId\""], + ["simctl", "terminate", "booted", "'$appBundleId'"], runInShell: true, ); print("terminate command process was started"); From d8b13c0c0b89d60907792976fba472ab8a651cbb Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 23:13:36 -0800 Subject: [PATCH 088/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 654ff2e..4d9c283 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -51,13 +51,21 @@ void main() { print("Sending xcrun simctl terminate command..."); // final process = await Process.start( // "sh", - // ["-c", "xcrun", "simctl", "terminate", "booted", "\"$appBundleId\""], + // ["-c", "xcrun simctl terminate booted '$appBundleId'"], // ); + + // CI Timeout + // final process = await Process.start( + // "xcrun", + // ["simctl", "terminate", "booted", "'$appBundleId'"], + // runInShell: true, + // ); + final process = await Process.start( "xcrun", ["simctl", "terminate", "booted", "'$appBundleId'"], - runInShell: true, ); + print("terminate command process was started"); process.stdin.close(); From 5ca2c76bc6574a5a6edf0092770a17a73a956a79 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 23:20:11 -0800 Subject: [PATCH 089/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 4d9c283..5138103 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -49,21 +49,22 @@ void main() { test("Send terminate command to simulator", () async { print("Sending xcrun simctl terminate command..."); + // CI Timeout // final process = await Process.start( - // "sh", - // ["-c", "xcrun simctl terminate booted '$appBundleId'"], + // "xcrun", + // ["simctl", "terminate", "booted", "'$appBundleId'"], + // runInShell: true, // ); // CI Timeout // final process = await Process.start( // "xcrun", // ["simctl", "terminate", "booted", "'$appBundleId'"], - // runInShell: true, // ); final process = await Process.start( - "xcrun", - ["simctl", "terminate", "booted", "'$appBundleId'"], + "sh", + ["-c", "xcrun simctl terminate booted '$appBundleId'"], ); print("terminate command process was started"); From f73c1f867e3543ce2707a66e0a81a7473e96e40d Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 23:26:53 -0800 Subject: [PATCH 090/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 5138103..35f6d8f 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -62,10 +62,20 @@ void main() { // ["simctl", "terminate", "booted", "'$appBundleId'"], // ); - final process = await Process.start( - "sh", - ["-c", "xcrun simctl terminate booted '$appBundleId'"], - ); + // CI Timeout + // final process = await Process.start( + // "sh", + // ["-c", "xcrun simctl terminate booted '$appBundleId'"], + // ); + + final script = ''' + #!/bin/bash + xcrun simctl terminate booted $appBundleId + '''; + final tempFile = File('/tmp/temp_script.sh'); + await tempFile.writeAsString(script); + await Process.run('chmod', ['+x', tempFile.path]); + final process = await Process.start('/bin/bash', [tempFile.path]); print("terminate command process was started"); From 62005453b24d075eba44c78b08771141a8933483 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 23:47:36 -0800 Subject: [PATCH 091/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 35f6d8f..e90412b 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -68,25 +68,32 @@ void main() { // ["-c", "xcrun simctl terminate booted '$appBundleId'"], // ); - final script = ''' - #!/bin/bash - xcrun simctl terminate booted $appBundleId - '''; - final tempFile = File('/tmp/temp_script.sh'); - await tempFile.writeAsString(script); - await Process.run('chmod', ['+x', tempFile.path]); - final process = await Process.start('/bin/bash', [tempFile.path]); + final result = await Process.run( + "sh", + ["-c", "xcrun simctl terminate booted '$appBundleId'"], + ); + print("Exit code: ${result.exitCode}"); - print("terminate command process was started"); - - process.stdin.close(); - - stdout.addStream(process.stdout); - stderr.addStream(process.stderr); - - print("Waiting for exit code..."); - final exitCode = await process.exitCode; - print("Killed app - exit code: $exitCode"); + // CI Timeout + // final script = ''' + // #!/bin/bash + // xcrun simctl terminate booted $appBundleId + // '''; + // final tempFile = File('/tmp/temp_script.sh'); + // await tempFile.writeAsString(script); + // await Process.run('chmod', ['+x', tempFile.path]); + // final process = await Process.start('/bin/bash', [tempFile.path]); + // + // print("terminate command process was started"); + // + // process.stdin.close(); + // + // stdout.addStream(process.stdout); + // stderr.addStream(process.stderr); + // + // print("Waiting for exit code..."); + // final exitCode = await process.exitCode; + // print("Killed app - exit code: $exitCode"); }); // testDeepLinkIosAppLaunch( From 7a7099a071c8501e182259b701b136627fb32bfb Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 23:54:16 -0800 Subject: [PATCH 092/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 43 ++++++++++++++++--- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index e90412b..350fabf 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -48,7 +48,37 @@ void main() { // }); test("Send terminate command to simulator", () async { + print("Running device list command:"); + final result1 = await Process.run( + "sh", + [ + "-c", + "xcrun", + "simctl", + "list", + ], + ); + print("result1: ${result1.exitCode}"); + print(""); + + print("Running get_app_container command:"); + final result2 = await Process.run( + "sh", + [ + "-c", + "xcrun", + "simctl", + "get_app_container", + "booted", + "com.flutterbountyhunters.deeplinks.example", + ], + ); + print("result2: ${result2.exitCode}"); + print(""); + + //-------- print("Sending xcrun simctl terminate command..."); + // CI Timeout // final process = await Process.start( // "xcrun", @@ -67,12 +97,13 @@ void main() { // "sh", // ["-c", "xcrun simctl terminate booted '$appBundleId'"], // ); - - final result = await Process.run( - "sh", - ["-c", "xcrun simctl terminate booted '$appBundleId'"], - ); - print("Exit code: ${result.exitCode}"); + // + // CI Timeout + // final result = await Process.run( + // "sh", + // ["-c", "xcrun simctl terminate booted '$appBundleId'"], + // ); + // print("Exit code: ${result.exitCode}"); // CI Timeout // final script = ''' From 233822d4807369b8bf2a7c7e0150b63046b09d0d Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sun, 29 Dec 2024 23:59:34 -0800 Subject: [PATCH 093/120] Working on iOS GitHub CI --- .../test_driver/deep_link_ios_test.dart | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 350fabf..d85bcba 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -53,9 +53,7 @@ void main() { "sh", [ "-c", - "xcrun", - "simctl", - "list", + "xcrun simctl list", ], ); print("result1: ${result1.exitCode}"); @@ -66,11 +64,7 @@ void main() { "sh", [ "-c", - "xcrun", - "simctl", - "get_app_container", - "booted", - "com.flutterbountyhunters.deeplinks.example", + "xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example", ], ); print("result2: ${result2.exitCode}"); From ac0242f427928262d955b32725130c1f26dd8135 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 00:09:17 -0800 Subject: [PATCH 094/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 404c3cd..8f6c270 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -214,6 +214,12 @@ jobs: - name: Install the app run: xcrun simctl install booted build/ios/iphonesimulator/Runner.app + - name: Ensure simulator is booted + run: xcrun simctl bootstatus booted + + - name: Check the simulator UI + run: xcrun simctl ui booted appearance + - name: Check for installed app on simulator run: | echo "Checking for app's container on the booted simulator:" From 4909b726cf83920bc18d6183c6f95f481b2ac297 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 00:26:27 -0800 Subject: [PATCH 095/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 8f6c270..b91ba61 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -220,6 +220,17 @@ jobs: - name: Check the simulator UI run: xcrun simctl ui booted appearance + - name: Take a screenshot of the simulator + run: | + mkdir -p simulator-screenshots + xcrun simctl io booted screenshot ./simulator-screenshots/screenshot.png + + - name: Upload simulator screenshot as Artifact + uses: actions/upload-artifact@v3 + with: + name: simulator-screenshot + path: simulator-screenshots/screenshot.png + - name: Check for installed app on simulator run: | echo "Checking for app's container on the booted simulator:" From 05de35fe19efa685702fc1aa78cf135d24e374a3 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 00:33:31 -0800 Subject: [PATCH 096/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index b91ba61..07d8011 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -222,14 +222,14 @@ jobs: - name: Take a screenshot of the simulator run: | - mkdir -p simulator-screenshots - xcrun simctl io booted screenshot ./simulator-screenshots/screenshot.png + mkdir -p ~/simulator-screenshots + xcrun simctl io booted screenshot ~/simulator-screenshots/screenshot.png - name: Upload simulator screenshot as Artifact uses: actions/upload-artifact@v3 with: name: simulator-screenshot - path: simulator-screenshots/screenshot.png + path: ~/simulator-screenshots/screenshot.png - name: Check for installed app on simulator run: | From 672b82d0a45b32efdffc031938d56551aa8aa97e Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 00:44:32 -0800 Subject: [PATCH 097/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 07d8011..465c485 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -242,4 +242,4 @@ jobs: # xcrun simctl launch booted com.flutterbountyhunters.deeplinks.example - name: Run the iOS deep link tests - run: flutter test test_driver/deep_link_ios_test.dart + run: dart test test_driver/deep_link_ios_test.dart From b0e410d4caf84fe711a9bd01c2475f3d25011355 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 01:06:10 -0800 Subject: [PATCH 098/120] Working on iOS GitHub CI --- .../example_deep_links/test_driver/deep_link_ios_test.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index d85bcba..f0e13b8 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -1,8 +1,5 @@ -import 'dart:convert'; import 'dart:io'; -import 'package:flutter_driver/flutter_driver.dart'; -import 'package:flutter_test_runners/flutter_test_runners.dart'; import 'package:test/test.dart'; void main() { From 39828b3be81c1d74ec726d6be755a0a0f209a928 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 01:14:12 -0800 Subject: [PATCH 099/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 465c485..f234dec 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -242,4 +242,4 @@ jobs: # xcrun simctl launch booted com.flutterbountyhunters.deeplinks.example - name: Run the iOS deep link tests - run: dart test test_driver/deep_link_ios_test.dart + run: dart run test_driver/deep_link_ios_test.dart From 9560e06688bab8998ee277a462e67b0761a23afc Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 01:33:27 -0800 Subject: [PATCH 100/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index f234dec..ac115b8 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -236,10 +236,13 @@ jobs: echo "Checking for app's container on the booted simulator:" xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example -# - name: Launch the app on the simulator just to prove we can + - name: Check for other processes using the simulator + run: ps aux | grep simctl + + # - name: Launch the app on the simulator just to prove we can # run: | # echo "Launching the installed app to prove that we can..." # xcrun simctl launch booted com.flutterbountyhunters.deeplinks.example - name: Run the iOS deep link tests - run: dart run test_driver/deep_link_ios_test.dart + run: flutter test test_driver/deep_link_ios_test.dart From be824b9f9ef48c2de5b330c1574b256a21715d12 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 01:40:09 -0800 Subject: [PATCH 101/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index ac115b8..572e2f2 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -239,6 +239,9 @@ jobs: - name: Check for other processes using the simulator run: ps aux | grep simctl + - name: Kill any simctl processes + run: pkill -f simctl + # - name: Launch the app on the simulator just to prove we can # run: | # echo "Launching the installed app to prove that we can..." From 62eaae606b51850df72e48e76adc0e8cff1406ea Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 01:53:08 -0800 Subject: [PATCH 102/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 572e2f2..2ec14b3 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -240,7 +240,7 @@ jobs: run: ps aux | grep simctl - name: Kill any simctl processes - run: pkill -f simctl + run: pkill -f runner # - name: Launch the app on the simulator just to prove we can # run: | From c74ab4f75d55c6922215e1bdab3891d41b87885a Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Mon, 30 Dec 2024 02:00:41 -0800 Subject: [PATCH 103/120] Working on iOS GitHub CI --- .github/workflows/pr_validation.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 2ec14b3..dd85943 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -236,12 +236,12 @@ jobs: echo "Checking for app's container on the booted simulator:" xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example - - name: Check for other processes using the simulator - run: ps aux | grep simctl - - name: Kill any simctl processes run: pkill -f runner + - name: Check for other processes using the simulator + run: ps aux | grep simctl + # - name: Launch the app on the simulator just to prove we can # run: | # echo "Launching the installed app to prove that we can..." From 26375b634947b10f052e5f289cce93e9650d356a Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 13:04:09 -0800 Subject: [PATCH 104/120] Try really long timeout --- .../test_driver/deep_link_ios_test.dart | 167 +++++++++--------- .../lib/src/deep_links/deep_links_ios.dart | 3 +- 2 files changed, 86 insertions(+), 84 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index f0e13b8..78557a2 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:flutter_test_runners/flutter_test_runners.dart'; import 'package:test/test.dart'; void main() { @@ -44,90 +45,90 @@ void main() { // print("The xcrun call returned with exit code: ${result.exitCode}"); // }); - test("Send terminate command to simulator", () async { - print("Running device list command:"); - final result1 = await Process.run( - "sh", - [ - "-c", - "xcrun simctl list", - ], - ); - print("result1: ${result1.exitCode}"); - print(""); - - print("Running get_app_container command:"); - final result2 = await Process.run( - "sh", - [ - "-c", - "xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example", - ], - ); - print("result2: ${result2.exitCode}"); - print(""); - - //-------- - print("Sending xcrun simctl terminate command..."); - - // CI Timeout - // final process = await Process.start( - // "xcrun", - // ["simctl", "terminate", "booted", "'$appBundleId'"], - // runInShell: true, - // ); - - // CI Timeout - // final process = await Process.start( - // "xcrun", - // ["simctl", "terminate", "booted", "'$appBundleId'"], - // ); - - // CI Timeout - // final process = await Process.start( - // "sh", - // ["-c", "xcrun simctl terminate booted '$appBundleId'"], - // ); - // - // CI Timeout - // final result = await Process.run( - // "sh", - // ["-c", "xcrun simctl terminate booted '$appBundleId'"], - // ); - // print("Exit code: ${result.exitCode}"); - - // CI Timeout - // final script = ''' - // #!/bin/bash - // xcrun simctl terminate booted $appBundleId - // '''; - // final tempFile = File('/tmp/temp_script.sh'); - // await tempFile.writeAsString(script); - // await Process.run('chmod', ['+x', tempFile.path]); - // final process = await Process.start('/bin/bash', [tempFile.path]); - // - // print("terminate command process was started"); - // - // process.stdin.close(); - // - // stdout.addStream(process.stdout); - // stderr.addStream(process.stderr); - // - // print("Waiting for exit code..."); - // final exitCode = await process.exitCode; - // print("Killed app - exit code: $exitCode"); - }); + // test("Send terminate command to simulator", () async { + // print("Running device list command:"); + // final result1 = await Process.run( + // "sh", + // [ + // "-c", + // "xcrun simctl list", + // ], + // ); + // print("result1: ${result1.exitCode}"); + // print(""); + // + // print("Running get_app_container command:"); + // final result2 = await Process.run( + // "sh", + // [ + // "-c", + // "xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example", + // ], + // ); + // print("result2: ${result2.exitCode}"); + // print(""); + // + // //-------- + // print("Sending xcrun simctl terminate command..."); + // + // // CI Timeout + // // final process = await Process.start( + // // "xcrun", + // // ["simctl", "terminate", "booted", "'$appBundleId'"], + // // runInShell: true, + // // ); + // + // // CI Timeout + // // final process = await Process.start( + // // "xcrun", + // // ["simctl", "terminate", "booted", "'$appBundleId'"], + // // ); + // + // // CI Timeout + // // final process = await Process.start( + // // "sh", + // // ["-c", "xcrun simctl terminate booted '$appBundleId'"], + // // ); + // // + // // CI Timeout + // // final result = await Process.run( + // // "sh", + // // ["-c", "xcrun simctl terminate booted '$appBundleId'"], + // // ); + // // print("Exit code: ${result.exitCode}"); + // + // // CI Timeout + // // final script = ''' + // // #!/bin/bash + // // xcrun simctl terminate booted $appBundleId + // // '''; + // // final tempFile = File('/tmp/temp_script.sh'); + // // await tempFile.writeAsString(script); + // // await Process.run('chmod', ['+x', tempFile.path]); + // // final process = await Process.start('/bin/bash', [tempFile.path]); + // // + // // print("terminate command process was started"); + // // + // // process.stdin.close(); + // // + // // stdout.addStream(process.stdout); + // // stderr.addStream(process.stderr); + // // + // // print("Waiting for exit code..."); + // // final exitCode = await process.exitCode; + // // print("Killed app - exit code: $exitCode"); + // }); - // testDeepLinkIosAppLaunch( - // "home screen", - // appBundleId: appBundleId, - // deepLink: "https://deeplinks.flutterbountyhunters.com", - // verbose: true, - // (driver) async { - // await driver.waitFor(find.text("Home Screen")); - // await Future.delayed(const Duration(seconds: 3)); - // }, - // ); + testDeepLinkIosAppLaunch( + "home screen", + appBundleId: appBundleId, + deepLink: "https://deeplinks.flutterbountyhunters.com", + verbose: true, + (driver) async { + await driver.waitFor(find.text("Home Screen")); + await Future.delayed(const Duration(seconds: 3)); + }, + ); // testDeepLinkIosAppLaunch( // "sign-up screen", diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index 8b9764f..86a7ea5 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -24,6 +24,7 @@ void testDeepLinkIosAppLaunch( required String appBundleId, required String deepLink, bool verbose = false, + Duration timeout = const Duration(minutes: 5), }) { test(description, () async { _initLogs(verbose); @@ -132,7 +133,7 @@ void testDeepLinkIosAppLaunch( // Run the test. await testRunner(driver); - }); + }, timeout: Timeout(timeout)); } Future _logVmDetailsAfterConnectionFailure(String dartVmService) async { From 4b57e3212fdb1769daf8c40e37c01d6ad5c66fc3 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 13:09:55 -0800 Subject: [PATCH 105/120] Add missing import --- .../example_deep_links/test_driver/deep_link_ios_test.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart index 78557a2..05c849c 100644 --- a/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart +++ b/packages/flutter_test_runners/example_deep_links/test_driver/deep_link_ios_test.dart @@ -1,5 +1,4 @@ -import 'dart:io'; - +import 'package:flutter_driver/flutter_driver.dart'; import 'package:flutter_test_runners/flutter_test_runners.dart'; import 'package:test/test.dart'; From 1d2af5b5f2a6970f30e3d53010fc0369ca20fa9c Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 13:20:22 -0800 Subject: [PATCH 106/120] Adjusted how we send the kill command through Process, also removed a couple workflow steps that may have killed the simulator --- .github/workflows/pr_validation.yaml | 10 +++++----- .../lib/src/platform_comms/ios/xcrun.dart | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index dd85943..93295ab 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -236,11 +236,11 @@ jobs: echo "Checking for app's container on the booted simulator:" xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example - - name: Kill any simctl processes - run: pkill -f runner - - - name: Check for other processes using the simulator - run: ps aux | grep simctl +# - name: Kill any simctl processes +# run: pkill -f runner +# +# - name: Check for other processes using the simulator +# run: ps aux | grep simctl # - name: Launch the app on the simulator just to prove we can # run: | diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 2d3fd2a..454dcb1 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -130,7 +130,7 @@ class Xcrun { print("Sending xcrun simctl terminate command..."); final process = await Process.start( "sh", - ["-c", "xcrun", "simctl", "terminate", "booted", appBundleId], + ["-c", "xcrun simctl terminate booted $appBundleId"], ); print("terminate command process was started"); @@ -167,9 +167,12 @@ class Xcrun { // ); } - static Future _runInShell(List commandAndArgs) { + static Future _runInShell(List commandAndArgs) async { print("Sending shell command: '${commandAndArgs.join(" ")}'"); - return Process.run("sh", ["-c", ...commandAndArgs]); + final result = await Process.run("sh", ["-c", ...commandAndArgs]); + print("Shell command exit code: ${result.exitCode}"); + return result; + // return Process.run( // commandAndArgs.first, // commandAndArgs.length > 1 ? commandAndArgs.sublist(1) : [], From 219f66a62a43d51b327d1ccb6c748972a995ce55 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 14:18:17 -0800 Subject: [PATCH 107/120] Removing killApp() for the moment to see if killing a non running app was hanging the run --- .../lib/src/deep_links/deep_links_ios.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index 86a7ea5..fe744a7 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -30,9 +30,9 @@ void testDeepLinkIosAppLaunch( _initLogs(verbose); _log.info("Running deep link test driver..."); - // Pre-emptively the kill the app, in case it's already running. - _log.info("Pre-emptively killing the app"); - await Xcrun.killApp(appBundleId); + // // Pre-emptively the kill the app, in case it's already running. + // _log.info("Pre-emptively killing the app"); + // await Xcrun.killApp(appBundleId); FlutterDriver? driver; addTearDown(() async { From 34363e509b6a1b95a10d17f6323d1bde12d7329a Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 14:28:23 -0800 Subject: [PATCH 108/120] Added --vebose and --debug to sh commands --- .../flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 454dcb1..8dfaddc 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -169,7 +169,7 @@ class Xcrun { static Future _runInShell(List commandAndArgs) async { print("Sending shell command: '${commandAndArgs.join(" ")}'"); - final result = await Process.run("sh", ["-c", ...commandAndArgs]); + final result = await Process.run("sh", ["--verbose", "--debug", "-c", ...commandAndArgs]); print("Shell command exit code: ${result.exitCode}"); return result; From e6b448e9618f3296e9ea416fab1f1280b2610142 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 14:43:34 -0800 Subject: [PATCH 109/120] Commented out everything in the test runner exept checking if the app is runnong --- .../lib/src/deep_links/deep_links_ios.dart | 184 +++++++++--------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index fe744a7..b35fab9 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -35,104 +35,104 @@ void testDeepLinkIosAppLaunch( // await Xcrun.killApp(appBundleId); FlutterDriver? driver; - addTearDown(() async { - _log.info("Cleaning up after the test"); - // Dispose the FlutterDriver connection. - driver?.serviceClient.dispose(); - - // Kill the app when we're done. - await Xcrun.killApp(appBundleId); - }); + // addTearDown(() async { + // _log.info("Cleaning up after the test"); + // // Dispose the FlutterDriver connection. + // driver?.serviceClient.dispose(); + // + // // Kill the app when we're done. + // await Xcrun.killApp(appBundleId); + // }); // Ensure the app isn't running yet. _log.info("Checking if the app is running..."); expect(await Xcrun.isAppRunning(appBundleId), isFalse); _log.info("We've verified the app isn't running"); - // Clear previous logcat messages so we don't try to connect to a previous - // Dart VM service listing. - _log.info("Clearing old logs"); - await Xcrun.clearLogcat(); - _log.info("We've cleared old logs"); - - // Listen to iOS logs to find the Dart VM service for the running app. - _log.info("Registering for simulator logs"); - String? dartVmService; - await Xcrun.listenToXcrunForFlutterLogs( - appBundleId, - onLog: (log) { - // _log.info(log); - if (log.contains("Dart VM service")) { - _log.info("Found Dart VM log:\n$log"); - - final regex = RegExp(r'.*Dart VM service.*(http[s]?://[^\s]+)'); - final httpUrl = Uri.parse(regex.firstMatch(log)!.group(1)!); - - dartVmService = - Uri(scheme: "ws", host: httpUrl.host, port: httpUrl.port, path: "${httpUrl.path}ws").toString(); - } - }, - onError: (error) { - _log.shout("iOS ERROR:"); - _log.shout(error); - }, - ); - _log.info("We're now listening to logs and errors from iOS"); - - // Send the deep link. - _log.info("Sending the deep link: $deepLink"); - await Xcrun.launchAppWithUniversalLink(universalLink: deepLink); - - // Wait until the deep link launches the app. - _log.info("Waiting for app to launch: $appBundleId"); - final isAppRunning = await Xcrun.waitForAppToLaunch(appBundleId); - expect( - isAppRunning, - isTrue, - reason: "The app never launched after sending the deeplink. Package: $appBundleId, Deeplink: $deepLink", - ); - - // Wait for a moment so that the app has time to start the Dart VM - // service and report it in the device logs. - _log.info("Waiting a moment so that app can launch the Dart VM service."); - await Future.delayed(const Duration(seconds: 5)); - - // Ensure that we found the Dart VM service URL. - expect( - dartVmService, - isNotNull, - reason: "Couldn't find the Dart VM service for the app that was launched with a deep link.", - ); - expect( - dartVmService, - isNotEmpty, - reason: "Couldn't find the Dart VM service for the app that was launched with a deep link.", - ); - - // Setup port forwarding between the host machine running the test, and the - // Android device that's running the app, so we can talk to the Dart VM service. - final port = Uri.parse(dartVmService!).port; - _log.info("Forwarding simulator port: $port"); - await Xcrun.forwardTcpPort(port); - - // Connect to the Dart VM service in the app with Flutter Driver. - try { - _log.info("Connecting to Flutter Driver extension in the Dart VM service."); - driver = await FlutterDriver.connect( - dartVmServiceUrl: dartVmService, - ); - } catch (exception) { - if (verbose) { - await _logVmDetailsAfterConnectionFailure(dartVmService!); - } - - throw TestFailure( - "Couldn't connect FlutterDriver to the app's Dart VM service (the app successfully launched with the deep link, though)", - ); - } - - // Run the test. - await testRunner(driver); + // // Clear previous logcat messages so we don't try to connect to a previous + // // Dart VM service listing. + // _log.info("Clearing old logs"); + // await Xcrun.clearLogcat(); + // _log.info("We've cleared old logs"); + // + // // Listen to iOS logs to find the Dart VM service for the running app. + // _log.info("Registering for simulator logs"); + // String? dartVmService; + // await Xcrun.listenToXcrunForFlutterLogs( + // appBundleId, + // onLog: (log) { + // // _log.info(log); + // if (log.contains("Dart VM service")) { + // _log.info("Found Dart VM log:\n$log"); + // + // final regex = RegExp(r'.*Dart VM service.*(http[s]?://[^\s]+)'); + // final httpUrl = Uri.parse(regex.firstMatch(log)!.group(1)!); + // + // dartVmService = + // Uri(scheme: "ws", host: httpUrl.host, port: httpUrl.port, path: "${httpUrl.path}ws").toString(); + // } + // }, + // onError: (error) { + // _log.shout("iOS ERROR:"); + // _log.shout(error); + // }, + // ); + // _log.info("We're now listening to logs and errors from iOS"); + // + // // Send the deep link. + // _log.info("Sending the deep link: $deepLink"); + // await Xcrun.launchAppWithUniversalLink(universalLink: deepLink); + // + // // Wait until the deep link launches the app. + // _log.info("Waiting for app to launch: $appBundleId"); + // final isAppRunning = await Xcrun.waitForAppToLaunch(appBundleId); + // expect( + // isAppRunning, + // isTrue, + // reason: "The app never launched after sending the deeplink. Package: $appBundleId, Deeplink: $deepLink", + // ); + // + // // Wait for a moment so that the app has time to start the Dart VM + // // service and report it in the device logs. + // _log.info("Waiting a moment so that app can launch the Dart VM service."); + // await Future.delayed(const Duration(seconds: 5)); + // + // // Ensure that we found the Dart VM service URL. + // expect( + // dartVmService, + // isNotNull, + // reason: "Couldn't find the Dart VM service for the app that was launched with a deep link.", + // ); + // expect( + // dartVmService, + // isNotEmpty, + // reason: "Couldn't find the Dart VM service for the app that was launched with a deep link.", + // ); + // + // // Setup port forwarding between the host machine running the test, and the + // // Android device that's running the app, so we can talk to the Dart VM service. + // final port = Uri.parse(dartVmService!).port; + // _log.info("Forwarding simulator port: $port"); + // await Xcrun.forwardTcpPort(port); + // + // // Connect to the Dart VM service in the app with Flutter Driver. + // try { + // _log.info("Connecting to Flutter Driver extension in the Dart VM service."); + // driver = await FlutterDriver.connect( + // dartVmServiceUrl: dartVmService, + // ); + // } catch (exception) { + // if (verbose) { + // await _logVmDetailsAfterConnectionFailure(dartVmService!); + // } + // + // throw TestFailure( + // "Couldn't connect FlutterDriver to the app's Dart VM service (the app successfully launched with the deep link, though)", + // ); + // } + // + // // Run the test. + // await testRunner(driver); }, timeout: Timeout(timeout)); } From 14d90121e5057d333509ecee10e8e21fcbc2fbca Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 14:45:13 -0800 Subject: [PATCH 110/120] Trying to run command without grep to see if that makes a difference --- .../lib/src/platform_comms/ios/xcrun.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 8dfaddc..0f1cc2a 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -9,6 +9,7 @@ class Xcrun { /// A return value of `true` doesn't mean the app is visible. The app might /// be in the background, but still in memory. static Future isAppRunning(String appBundleId) async { + print("isAppRunning() - $appBundleId"); // final result = await Process.run( // "sh", // [ @@ -23,6 +24,13 @@ class Xcrun { // "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\"", // ]); + print("Trying command through shell - no grep..."); + final result = await _runInShell([ + "xcrun simctl spawn booted launchctl list", + ]); + print("Done with command without grep"); + + print("Trying command through shell with '| grep'..."); final result = await _runInShell([ "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\"", ]); From 2f6b9bca2d83f5d0513391a6c748497ab1dccdb2 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 15:28:20 -0800 Subject: [PATCH 111/120] Fixed compilation error --- .../lib/src/platform_comms/ios/xcrun.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 0f1cc2a..33a8382 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -25,13 +25,13 @@ class Xcrun { // ]); print("Trying command through shell - no grep..."); - final result = await _runInShell([ + var result = await _runInShell([ "xcrun simctl spawn booted launchctl list", ]); print("Done with command without grep"); print("Trying command through shell with '| grep'..."); - final result = await _runInShell([ + result = await _runInShell([ "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\"", ]); final output = result.stdout; From 8880a11bfc43708fcb74d94cc1096097d4802ac5 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 16:48:32 -0800 Subject: [PATCH 112/120] Re-implemented app running without grep --- .../lib/src/platform_comms/ios/xcrun.dart | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 33a8382..6b1873d 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -28,15 +28,23 @@ class Xcrun { var result = await _runInShell([ "xcrun simctl spawn booted launchctl list", ]); - print("Done with command without grep"); - - print("Trying command through shell with '| grep'..."); - result = await _runInShell([ - "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\"", - ]); + print("Done with command without grep:"); + print(result.stdout); final output = result.stdout; - print("Is app running? ${output != null && output is String && output.isNotEmpty}"); - return output != null && output is String && output.isNotEmpty; + if (output is! String) { + // We don't know how to handle this. + return false; + } + + return output.contains(appBundleId); + + // print("Trying command through shell with '| grep'..."); + // result = await _runInShell([ + // "xcrun simctl spawn booted launchctl list | grep \"$appBundleId\"", + // ]); + // final output = result.stdout; + // print("Is app running? ${output != null && output is String && output.isNotEmpty}"); + // return output != null && output is String && output.isNotEmpty; } /// Starts listening to the running iOS device's log stream, and returns the From 6d58884870adb619fe8c4e84d286aeba87d4bb39 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Thu, 2 Jan 2025 23:30:26 -0800 Subject: [PATCH 113/120] Bring back clear logs step --- .../lib/src/deep_links/deep_links_ios.dart | 12 ++++++------ .../lib/src/platform_comms/ios/xcrun.dart | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index b35fab9..c78892a 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -49,12 +49,12 @@ void testDeepLinkIosAppLaunch( expect(await Xcrun.isAppRunning(appBundleId), isFalse); _log.info("We've verified the app isn't running"); - // // Clear previous logcat messages so we don't try to connect to a previous - // // Dart VM service listing. - // _log.info("Clearing old logs"); - // await Xcrun.clearLogcat(); - // _log.info("We've cleared old logs"); - // + // Clear previous logcat messages so we don't try to connect to a previous + // Dart VM service listing. + _log.info("Clearing old logs"); + await Xcrun.clearLogs(); + _log.info("We've cleared old logs"); + // // Listen to iOS logs to find the Dart VM service for the running app. // _log.info("Registering for simulator logs"); // String? dartVmService; diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 6b1873d..d0d22af 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -169,7 +169,7 @@ class Xcrun { } /// Clears all logs in the iOS log stream. - static Future clearLogcat() async { + static Future clearLogs() async { await _runInShell(["xcrun", "simctl", "spawn", "booted", "log", "erase"]); } From 1c5f28ab788a525139d36488c6d52548e2320d72 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Fri, 3 Jan 2025 19:00:29 -0800 Subject: [PATCH 114/120] Combine all args in _runInShell() and also throw exception on bad result code --- .../lib/src/platform_comms/ios/xcrun.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index d0d22af..ce197bf 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -184,9 +184,15 @@ class Xcrun { } static Future _runInShell(List commandAndArgs) async { - print("Sending shell command: '${commandAndArgs.join(" ")}'"); - final result = await Process.run("sh", ["--verbose", "--debug", "-c", ...commandAndArgs]); + final command = commandAndArgs.join(" "); + print("Sending shell command: '$command'"); + final result = await Process.run("sh", ["--verbose", "--debug", "-c", command]); print("Shell command exit code: ${result.exitCode}"); + + if (result.exitCode != 0) { + throw Exception("Failed to execute command in a shell:\n'$command'\nExit code: ${result.exitCode}"); + } + return result; // return Process.run( From 86ccde08c10c3ad29bc5b041d022e00124364122 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Fri, 3 Jan 2025 19:08:53 -0800 Subject: [PATCH 115/120] Try adding stdout and stderr to see what's going wrong --- .../lib/src/platform_comms/ios/xcrun.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index ce197bf..bdcff55 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -190,7 +190,17 @@ class Xcrun { print("Shell command exit code: ${result.exitCode}"); if (result.exitCode != 0) { - throw Exception("Failed to execute command in a shell:\n'$command'\nExit code: ${result.exitCode}"); + throw Exception(''' +Failed to execute command in a shell: +'$command' + +Exit code: ${result.exitCode} + +Stdout: +${result.stdout} + +Stderr: +${result.stderr}'''); } return result; From ebdab7628ca94e3e61b25fbd04b98e472213adf6 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Fri, 3 Jan 2025 19:16:40 -0800 Subject: [PATCH 116/120] Skip clearing logs (GitHub says not permitted). Send the deep link. --- .../lib/src/deep_links/deep_links_ios.dart | 70 ++++++++++--------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index c78892a..08bf84d 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -49,40 +49,42 @@ void testDeepLinkIosAppLaunch( expect(await Xcrun.isAppRunning(appBundleId), isFalse); _log.info("We've verified the app isn't running"); - // Clear previous logcat messages so we don't try to connect to a previous - // Dart VM service listing. - _log.info("Clearing old logs"); - await Xcrun.clearLogs(); - _log.info("We've cleared old logs"); - - // // Listen to iOS logs to find the Dart VM service for the running app. - // _log.info("Registering for simulator logs"); - // String? dartVmService; - // await Xcrun.listenToXcrunForFlutterLogs( - // appBundleId, - // onLog: (log) { - // // _log.info(log); - // if (log.contains("Dart VM service")) { - // _log.info("Found Dart VM log:\n$log"); - // - // final regex = RegExp(r'.*Dart VM service.*(http[s]?://[^\s]+)'); - // final httpUrl = Uri.parse(regex.firstMatch(log)!.group(1)!); - // - // dartVmService = - // Uri(scheme: "ws", host: httpUrl.host, port: httpUrl.port, path: "${httpUrl.path}ws").toString(); - // } - // }, - // onError: (error) { - // _log.shout("iOS ERROR:"); - // _log.shout(error); - // }, - // ); - // _log.info("We're now listening to logs and errors from iOS"); - // - // // Send the deep link. - // _log.info("Sending the deep link: $deepLink"); - // await Xcrun.launchAppWithUniversalLink(universalLink: deepLink); - // + // FIXME: At the moment GitHub CI is saying this operation isn't permitted. + // // Clear previous logcat messages so we don't try to connect to a previous + // // Dart VM service listing. + // _log.info("Clearing old logs"); + // await Xcrun.clearLogs(); + // _log.info("We've cleared old logs"); + print("NOT clearing logs because GitHub CI says not permitted"); + + // Listen to iOS logs to find the Dart VM service for the running app. + _log.info("Registering for simulator logs"); + String? dartVmService; + await Xcrun.listenToXcrunForFlutterLogs( + appBundleId, + onLog: (log) { + // _log.info(log); + if (log.contains("Dart VM service")) { + _log.info("Found Dart VM log:\n$log"); + + final regex = RegExp(r'.*Dart VM service.*(http[s]?://[^\s]+)'); + final httpUrl = Uri.parse(regex.firstMatch(log)!.group(1)!); + + dartVmService = + Uri(scheme: "ws", host: httpUrl.host, port: httpUrl.port, path: "${httpUrl.path}ws").toString(); + } + }, + onError: (error) { + _log.shout("iOS ERROR:"); + _log.shout(error); + }, + ); + _log.info("We're now listening to logs and errors from iOS"); + + // Send the deep link. + _log.info("Sending the deep link: $deepLink"); + await Xcrun.launchAppWithUniversalLink(universalLink: deepLink); + // // Wait until the deep link launches the app. // _log.info("Waiting for app to launch: $appBundleId"); // final isAppRunning = await Xcrun.waitForAppToLaunch(appBundleId); From 3a7e7eb5aed9d5c0cdcf93611a0dc2a09565f7c9 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 4 Jan 2025 10:38:24 -0800 Subject: [PATCH 117/120] The deep link command printed an error, but return code was zero. So now adding following step to wait for app to launch, just in case it really did launch. --- .../lib/src/deep_links/deep_links_ios.dart | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart index 08bf84d..385b0a8 100644 --- a/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart +++ b/packages/flutter_test_runners/lib/src/deep_links/deep_links_ios.dart @@ -85,15 +85,15 @@ void testDeepLinkIosAppLaunch( _log.info("Sending the deep link: $deepLink"); await Xcrun.launchAppWithUniversalLink(universalLink: deepLink); - // // Wait until the deep link launches the app. - // _log.info("Waiting for app to launch: $appBundleId"); - // final isAppRunning = await Xcrun.waitForAppToLaunch(appBundleId); - // expect( - // isAppRunning, - // isTrue, - // reason: "The app never launched after sending the deeplink. Package: $appBundleId, Deeplink: $deepLink", - // ); - // + // Wait until the deep link launches the app. + _log.info("Waiting for app to launch: $appBundleId"); + final isAppRunning = await Xcrun.waitForAppToLaunch(appBundleId); + expect( + isAppRunning, + isTrue, + reason: "The app never launched after sending the deeplink. Package: $appBundleId, Deeplink: $deepLink", + ); + // // Wait for a moment so that the app has time to start the Dart VM // // service and report it in the device logs. // _log.info("Waiting a moment so that app can launch the Dart VM service."); From 67eeabb3114eba9442431258fd52ff7ba97932c5 Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 4 Jan 2025 10:48:07 -0800 Subject: [PATCH 118/120] Reduced verbosity of app running check --- .../lib/src/platform_comms/ios/xcrun.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index bdcff55..a89d6ca 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -1,6 +1,8 @@ import 'dart:convert'; import 'dart:io'; +import 'package:flutter_test/flutter_test.dart'; + /// A Dart interface for common `xcrun` commands. class Xcrun { /// Returns `true` if the app with the given [appBundleId] ID is currently @@ -29,14 +31,17 @@ class Xcrun { "xcrun simctl spawn booted launchctl list", ]); print("Done with command without grep:"); - print(result.stdout); + // print(result.stdout); final output = result.stdout; if (output is! String) { // We don't know how to handle this. + print("Received shell output that isn't a String. Don't know what to do with this."); return false; } - return output.contains(appBundleId); + final isAppRunning = output.contains(appBundleId); + print("Is app running? $isAppRunning"); + return isAppRunning; // print("Trying command through shell with '| grep'..."); // result = await _runInShell([ From 032dbee58d3499dbd10a61ca331325e29df7315f Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 4 Jan 2025 10:48:46 -0800 Subject: [PATCH 119/120] Added process count to app running check --- .../flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index a89d6ca..2f3c517 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -40,7 +40,7 @@ class Xcrun { } final isAppRunning = output.contains(appBundleId); - print("Is app running? $isAppRunning"); + print("Is app running? $isAppRunning - searched ${output.split("\n").length} running processes"); return isAppRunning; // print("Trying command through shell with '| grep'..."); From fc988c197db66cf3187664e4f52a3c4df214515b Mon Sep 17 00:00:00 2001 From: Matt Carroll Date: Sat, 4 Jan 2025 11:20:43 -0800 Subject: [PATCH 120/120] Add 'sudo' to deep link launch behavior --- .../flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart index 2f3c517..7542f21 100644 --- a/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart +++ b/packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart @@ -108,7 +108,7 @@ class Xcrun { // command as a single string. If the command is passed as // individual arguments, it doesn't work. If the command is // run without "sh" and `runInShell` is `true`, it won't work. - return _runInShell(["xcrun simctl openurl booted \"$universalLink\""]); + return _runInShell(["sudo xcrun simctl openurl booted \"$universalLink\""]); // return Process.run( // "sh", // ["-c", "xcrun simctl openurl booted \"$universalLink\""],