-
-
Notifications
You must be signed in to change notification settings - Fork 453
feat: tvos 17+ workaround with skipDeviceCheck
#2194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
To me it looks like we are just trying to workaround a xcodebuild bug. Perhaps, it has also to do with appium/appium#19381 Maybe it would be better to just wait for a fix from Apple rather then adding workarounds thus increasing the tech debt? |
|
Yes, it's reasonable. Ideally, (and hopefully) Apple will expose udid to the macOS system wide as same as USB connected devices (as same as older tvOS versions such as 16). Or at least once Apple fixes |
|
I was thinking about doing something like but even by having the above ugly workaround many other endpoints that work with udid would most likely fail |
|
Hey, thank you so much for publishing this workaround, it literally saved the start of my project. I also wanted to mention one thing that I noticed, maybe you will find it helpful. |
|
note: i wondered if we could get device info via WDA instead of host in some cases for |
|
@KazuCocoa this workaround would work with a physical device ? I am currently blocked with 17.2 on my apple tv |
|
This change itself yes, would work.
|
|
I don't really get what |
|
Then, you could use this branch with local installation. e.g. which is regular usage of Appium v2 |
|
@quidow are you able to start a session with the appium inspector on a physical device ? |
No, in order to use Appium Inspector I need to run WDA first. |
|
@quidow Can you help me out please?
I am using: |
|
I have added the appium:skipDeviceCheck and set it to true
checked out appium-xcuitest-driver |
|
@adriandumitrascu19 I see that you run WDA from this branch, but did you install the Appium driver from this branch as well?
|
|
regular usage of Appium v2 |
|
@adriandumitrascu19 so now it works? |
so with the actual setup (from above) I am able to start the appium session only if I remove the appium:bundleId. I can then start my app and inspect the elements but if I want to run a test suite that needs the bundleId it is not working. Any thoughts ? |
Much appreciated if you can help me. Unfortunately npm install fails... |
yes, it fails |
Our CI and my local succeeded in running npm install and link with |
https://gist.github.com/adriandumitrascu19/be5e3bfff52d2d9c19d99b7bd3980d4f |
|
ah, ok. As the primary usage should be with webDriverAgentUrl in this description, you should use |
|
Hello @KazuCocoa I have left a new comment in my GIST, please help :( |
|
Hi @KazuCocoa @mykola-mokhnach @adriandumitrascu19 @quidow @Jiyvn, hope you guys are well. I just wanted to share that I’ve finally managed to launch my app and successfully run tests on a physical Apple TV device using Appium. Sequence of events:
My setup: Appium version: 2.17.1 Xcode version: 16.0 (16A242d) Please note I did not clone any repos or switch to specific branches as some suggestions in this thread recommend. Working Capabilities: Appium Inspector IntelliJ (Java Project) Hope this helps. |
|
@KazuCocoa can you merge master into this branch ? Thannnk you |
|
@KazuCocoa @ntsikelel0 hello guys, do you know, with latest appium, xcuitest, xcode 26. we still need to use this workaround ? |
|
I haven't tested, but does xcodebuild CLI command succeed in building/installing the WDA onto a TV without Xcode UI tool? |
|
If I remember it correctly, the main issue was that the |
|
The primary reason in terms of TV is xcodebuild. |
|
@KazuCocoa @quidow I’ve been testing this setup in detail: Xcode 26.0.1 + tvOS 18.2 + Appium 3.1.0 (XCUITest 10.2.2). From what we observed: It seems the detection part still depends on the CoreDeviceService API, especially for wireless-paired Apple TVs, since the UDID is hidden from libimobiledevice. Do you think it would make sense to integrate the CoreDeviceService path conditionally for tvOS 18 / Xcode 26 in the main driver, while keeping legacy detection for iOS devices? I’d be happy to share logs if that helps confirm where the detection breaks — just let me know what scenarios you’d like me to try. |
|
If Then, we can re-visit the for tvOS behavior since pre-condition changed so much |
skipDeviceCheckskipDeviceCheck
|
appium xcuitest driver 10.4.2+ with |




[update Mar 1st, 2024]
This skip device check would reduce device preparation time by 1 sec on my local test, so it may be good to add as part of performance improvement for a real device that manages devices on its own.
Note that commands that need to communicate with the device directly (
usbmuxd) do not work. This is expected. This PR aims to make tvOS work over WDA at least while it may have issues with communication method not via WDA.This is currently what we could do as a workaround for appium/appium#19343.
appium/appium#19343 (comment) is my findings for my local apple tv.
xcodebuilditself did not work (was not able to find the network connected tvOS 17 device), thus the primary usage should be withwebDriverAgentUrlFor tvOS 17+: necessary caps:
btw, this skip reduces 1 sec or less's new session creation duration for real devices.
I wondered if this could be similar to
appium:skipDeviceInitializationin uia2.[Update Mar 23th]
Frameworks/XC**framework fromWebDriverAgentRunner_tvOS-Runner.appThen, set
"appium:webDriverAgentUrl": "http://192.168.5.0:8001"capability with this branch's caps. Then, we can start WDA without Xcode.9DA168DB-A406-4350-A1AF-125411E55394is identifier byxcrun devicectl list devices.The path to
WebDriverAgentRunner_tvOS-Runner.appis the result of Xcode. It is signed properly already, so it should be already confirmed the build works on a tvOS device.