Skip to content
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

When I run WebDriverAgent using xcode connection, it works fine, but when I click on the software to run it, it crash. ios version is 17.1.2, xcode version is 15.0.1. #822

Closed
wcb133 opened this issue Dec 11, 2023 · 7 comments

Comments

@wcb133
Copy link

wcb133 commented Dec 11, 2023

When I run WebDriverAgent using xcode connection, it works fine, but when I click on the software to run it, it crash. ios version is 17.1.2, xcode version is 15.0.1.

2_1702264370.mp4
@KazuCocoa
Copy link
Member

Because when you click the icon, it works as no-XCTest process. WDA is designed to run as XCTest (https://developer.apple.com/documentation/xctest)

@HaoWShi
Copy link

HaoWShi commented Mar 6, 2024

When I run WebDriverAgent using xcode connection, it works fine, but when I click on the software to run it, it crash. ios version is 17.1.2, xcode version is 15.0.1.

2_1702264370.mp4

did you achieve it? by tap icon of wda to launch it ?

@HaoWShi
Copy link

HaoWShi commented Mar 8, 2024

Fortunately, I found a way to launch WDA on IOS by clicking on the icon after installing WDA.
Refer to the following links:
https://blog.csdn.net/boildoctor/article/details/123588999
https://zhuanlan.zhihu.com/p/673319266

1)deploy wda to IOS by xcode, trust the phone device
2)Build wda by xcode, and remember the output path of build.
3)do
`
$ xcodebuild build-for-testing -scheme WebDriverAgentRunner -sdk iphoneos -configuration Release -derivedDataPath /tmp/derivedDataPath
$ cd /tmp/derivedDataPath
$ cd Build/Products/Release-iphoneos # path might be different

Created folder Payload and put .app into it
then compressed to zip, change extention name to .ipa. That's all.
$ mkdir Payload && cp -r .app Payload
`
4) delete XC
* folder in WebDriverAgentRunner-Runner.app/Frameworks
5) Reconstructing Signature Information Refer the https://blog.csdn.net/boildoctor/article/details/123588999
I use the '方法2', Finally, a message indicating that the signature is being replaced is obtained.
6) use 'zip -r WDA.ipa Payload' to deploy wda, and install WDA.ipa to iphone

After the preceding steps are performed, you can directly click the wda icon on the mobile phone to start the wda.

@KazuCocoa
Copy link
Member

Did it work on iOS 17 as well? It works on iOS 16 and lower, but iOS 17 did not before. Lauching it as a xctest process was okay.

@HaoWShi
Copy link

HaoWShi commented Mar 8, 2024

Yes, I test it on iphone15(IOS17..2) and Mac

@KazuCocoa
Copy link
Member

KazuCocoa commented Mar 8, 2024

Thank you, it's interesting. Then, you could use https://appium.github.io/appium-xcuitest-driver/latest/guides/run-prebuilt-wda/#download-prebuilt-wda (available https://github.com/appium/WebDriverAgent/releases) for the .app in your step. You only need 5 and 6. (Maybe 5 does resign)

@HaoWShi
Copy link

HaoWShi commented Mar 9, 2024

I'll test it next week. If it works, it'll be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants