Appium cannot start flutter app in debug mode in iOS14
See original GitHub issueThe problem
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+?
The flutter documentations (https://flutter.dev/docs/development/ios-14) says:
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.
Is this the reason why I cannot test it in Appium? If so, does it mean there is NO way at all to test flutter apps using Appium on a real device with iOS14+?
Environment
- Appium version (or git revision) that exhibits the issue: 1.20.0
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: MacOS Big Sur
- Node.js version (unless using Appium.app|exe): v12.16.2
- Npm or Yarn package manager: npm 6.14.11
- Mobile platform/version under test: iOS14.3
- Real device or emulator/simulator: Real iPhone XS
- Appium CLI or Appium.app|exe: Both CLI and Appium desktop
Code To Reproduce Issue [ Good To Have ]
- Build the flutter app with
flutter build ios --flavor=firebase --debug
. - In Appium, using the following desired capabilities:
{
"platformName": "iOS",
"platformVersion": "14.3",
"deviceName": "iPhone XS",
"automationName": "XCUITest",
"xcodeOrgId": "******",
"xcodeSigningId": "Apple Development",
"udid": "uniq-device-id",
"app": "/Runner.app"
}
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.
(PS: the issue was originally reported in the flutter project but closed because the owner thinks it is an Appium issue: https://github.com/flutter/flutter/issues/73935)
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
iOS 14 not letting Flutter apps (still in dev) to launch from the ...
Apparently, this is a known issue of Flutter on iOS 14 for apps in debug mode, see this article on the Flutter website,...
Read more >[Solved]-Flutter ios appium wont launch app to run tests on ...
From your post, I understand that you are not able to generate .ipa in debug mode and rather are using release mode itself....
Read more >iOS 14 Not Letting Flutter Apps (Still In Dev) To Launch From ...
So, Flutter app can run as debug mode only when the app is built by flutter It does not work when someone launches...
Read more >[Flutter][Appium] A note about iOS 14, profile build
Flutter development changes in iOS 14. So, Flutter app can run as debug mode only when the app is built by flutter command...
Read more >Appium Flutter Testing on Sauce Labs
Preprocessing your Flutter App · Open your Flutter project in your favorite IDE. · In your pubspec. · Run the following command to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I assume Apple did some breaking changed to iOS 14, which affected the Flutter-based apps automation. I would try to report the issue to flutter driver repository. We did not change anything related to the application deployment in xcuitest driver.
Closing this issue as third party one. Flutter requires their apps to be executed in a hacky way, which is different from the standard one. As a workaround I would probably try to prelaunch the app on the device and then run xcuitest driver with
noReset
option enabled.