Skip to content

Appium cannot start flutter app in debug mode in iOS14 #73935

@hex0cter

Description

@hex0cter

Hi,

I understand that iOS14 seems to have limitations on debugger mode flutter apps.

Due to changes in debugger mechanisms, once a Flutter debug application is installed on the device (either by using flutter run a Flutter-enabled IDE, or from Xcode), the application can no longer be re-launched by tapping the application’s icon in the home screen in iOS 14 on physical devices.

(from https://flutter.dev/docs/development/ios-14)

We are using Appium to test the app built by Flutter. When Appium loads the app built by flutter build ios --flavor=firebase --debug on a real iPhone, the UI only shows:

In iOS 14+, debug mode Flutter apps can only be launched from Flutter tooling, IDEs with Flutter plugins or from Xcode. Alternatively, build in profile or release modes to enable launching from the home screen.

Is this due to the reasons above? If so, does it mean there is NO way at all to test flutter apps using Appium on a real device with iOS14+?

I am new to flutter so please let me know if mixed up things. Any suggestions on how to build a testable app for real iOS devices are appreciated. (By the way, I tried flutter build ios --flavor=firebase --release, but Appium cannot locate any element inside of UI with the app built by it. Not sure if any debugging symbols used by Appium are stripped).

Steps to Reproduce

  1. Run flutter build ios --flavor=firebase --debug.
  2. In appium, using the following desired capabilities:
  3. {
    "platformName": "iOS",
    "platformVersion": "14.3",
    "deviceName": "iPhone XS",
    "automationName": "XCUITest",
    "xcodeOrgId": "******",
    "xcodeSigningId": "Apple Development",
    "udid": "uniq-device-id",
    "app": "/Runner.app"
    }
  4. The app is launched on the phone and shows: In iOS 14+, debug mode Flutter apps can only be launched from Flutter tooling, IDEs with Flutter plugins or from Xcode. Alternatively, build in profile or release modes to enable launching from the home screen.

Some logs:

flutter doctor -v

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /usr/local/Caskroom/flutter/1.22.4/flutter
    • Framework revision 7891006299 (5 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/daniel.han/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /Users/daniel.han/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.0

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin installed
    • Dart plugin version 201.9245
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Connected device (1 available)
    • d4n13l h4n (mobile) • ******* • ios • iOS 14.3

• No issues found!

====end of the logs=====

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions