You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Appium - iOS - Building using debug-mode is not supported #120789
Hello everyone. 1st of all, thx for your great work on this project! :)
Trying to use iOS and Appium
Following a research of using iOS, Appium and specific APIs like getRenderObjectDiagnostics I faced some issues that blocked me.
Appium cannot use debug-mode iOS builds
On this ticket: #73935
We see that Appium cannot start an iOS application that was build using debug mode.
Do we have a way to launch a debug-mode iOS build via flutter cli or something of those sorts?
A possible solution is to use profile-mode
While researching on Appium Flutter Driver, I found: appium/appium-flutter-driver#115
Which describes that the solution right now is to build the iOS app in profile mode in order to use Appium.
By using profile-mode iOS builds, some APIs are unavailable
But by doing that, we lose the possibility to use the API I mentioned: #70772
Well, I did good info on those links related to "other options" of integration testing on Flutter apps.
But regarding the core issue, I couldn't find anything.
Just to be in sync, the root problem is **an iOS Flutter app built in debug-mode cannot run externally, without being from Flutter cli".
From there I had 2 options
check exactly why the app can't run, and see if, on Appium, I can make the debug-mode app to run via flutter cli. This would became an Appium concern, thus this issue could be closed
or, forget about debug-mode and use profile-mode. But this creates a new problem: some APIs are not available in this mode. So, here the question is: is there a way to keep them in place? (APIs like getRenderObjectDiagnostics)
2. forget about debug-mode and use profile-mode. But this creates a new problem: some APIs are not available in this mode. So, here the question is: is there a way to keep them in place? (APIs like getRenderObjectDiagnostics)
#70772 would be the right link to follow-up on for this scenario.
check exactly why the app can't run, and see if, on Appium, I can make the debug-mode app to run via flutter cli. This would became an Appium concern, thus this issue could be closed
I am not sure how Flutter would fix anything for this scenario, since it seems to be requirement from iOS level itself as it can't be open in debug mode for iOS 14+, so I think the change should probably made at Appium level to support it.
Based on above, I will go ahead and close it as I don't think this would be actionable from Flutter side. If you disagree, write in comments and I'll reopen it.
Yeah this might actually be a bug that has to be filed with Appium rather than Flutter, but let's reopen this while we figure out exactly where the fix would have to happen.
The limitation is that on iOS 14+ any JIT app (Flutter iOS debug mode) needs to be launched by a debugger either from lldb or Xcode. See: #60657 #62518 flutter-team-archive/engine#20980
When you flutter run or run from a Flutter IDE plugin, the app is built under the covers with xcodebuild, then the .app bundle is being installed and launched via an lldb debugserver session by a tool called ios-deploy which is shipped in the flutter SDK at bin/cache/artifacts/ios-deploy/ios-deploy. Appium, or any tooling, could do the same and use ios-deploy to launch the app with the debugger. See https://github.com/ios-control/ios-deploy#examples or run bin/cache/artifacts/ios-deploy/ios-deploy -h to see the available commands and flags (--justlaunch, etc).
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
darshankawar commentedon Feb 16, 2023
@marceloadsj
Please check this link and this to see if it helps in your case.
marceloadsj commentedon Feb 16, 2023
Hello @darshankawar thanks for your reply.
Well, I did good info on those links related to "other options" of integration testing on Flutter apps.
But regarding the core issue, I couldn't find anything.
Just to be in sync, the root problem is **an iOS Flutter app built in debug-mode cannot run externally, without being from Flutter cli".
From there I had 2 options
check exactly why the app can't run, and see if, on Appium, I can make the debug-mode app to run via flutter cli. This would became an Appium concern, thus this issue could be closed
or, forget about debug-mode and use profile-mode. But this creates a new problem: some APIs are not available in this mode. So, here the question is: is there a way to keep them in place? (APIs like
getRenderObjectDiagnostics)darshankawar commentedon Feb 17, 2023
Thanks for the feedback.
#70772 would be the right link to follow-up on for this scenario.
I am not sure how Flutter would fix anything for this scenario, since it seems to be requirement from iOS level itself as it can't be open in debug mode for iOS 14+, so I think the change should probably made at Appium level to support it.
Based on above, I will go ahead and close it as I don't think this would be actionable from Flutter side. If you disagree, write in comments and I'll reopen it.
marceloadsj commentedon Feb 17, 2023
@darshankawar regarding:
since it seems to be requirement from iOS level itself as it can't be open in debug mode for iOS 14+Do you have, please, any document from iOS, from Flutter or any "code", that explains what exactly is that requirement?
marceloadsj commentedon Mar 1, 2023
Any input from @Hixie side here, please?
I'm tagging you as you asked for us to open an issue to discuss this behaviour.
#70772
Thanks!
Hixie commentedon Mar 1, 2023
Yeah this might actually be a bug that has to be filed with Appium rather than Flutter, but let's reopen this while we figure out exactly where the fix would have to happen.
jmagman commentedon Mar 1, 2023
The limitation is that on iOS 14+ any JIT app (Flutter iOS debug mode) needs to be launched by a debugger either from lldb or Xcode. See:
#60657
#62518
flutter-team-archive/engine#20980
When you
flutter runor run from a Flutter IDE plugin, the app is built under the covers withxcodebuild, then the.appbundle is being installed and launched via an lldb debugserver session by a tool calledios-deploywhich is shipped in the flutter SDK atbin/cache/artifacts/ios-deploy/ios-deploy. Appium, or any tooling, could do the same and useios-deployto launch the app with the debugger. See https://github.com/ios-control/ios-deploy#examples or runbin/cache/artifacts/ios-deploy/ios-deploy -hto see the available commands and flags (--justlaunch, etc).flutter/packages/flutter_tools/lib/src/ios/ios_deploy.dart
Lines 167 to 198 in 888b7b9
flutter/packages/flutter_tools/lib/src/ios/ios_deploy.dart
Lines 121 to 165 in 888b7b9
This is the workaround Flutter tooling uses for the iOS 14+ limitation of running a JIT app on iOS, so Appium should be able to do the same.
Does that answer your question?
marceloadsj commentedon Mar 14, 2023
Thanks a lot everyone for your detailed explanation, I really appreciate it! <3
I believe Appium (and any other userland tooling) can use the info provided by @jmagman to be able to launch Flutter apps in debug mode.
I will close this issue and continue the discussion on Appium side. Thanks again! :)
github-actions commentedon Mar 28, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.