Failed to build WebDriverAgent to deployed on iOS 16

I’m getting an error while building a WebDriverAgent for testing on iOS 16

  • Mac mini with chip M1 (OS 13 beta)
  • Xcode 14 Official
  • iPhone SE 2020 (iOS 16 Official)

This my error on terminal

…etc…

Testing failed:

Cannot link directly with dylib/framework, your binary is not an allowed client of /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/XCTAutomationSupport.framework/XCTAutomationSupport for architecture arm64

Testing cancelled because the build failed.

** TEST FAILED **

The following build commands failed:

Ld /Users/macmi034/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/WebDriverAgentLib normal (in target ‘WebDriverAgentLib’ from project ‘WebDriverAgent’)
(1 failure)

I searched on Google but to no avail
I need some help?

It seems like this is an issue that broke with the upgrade to xcode 14. If you need it working now you can downgrade xcode 13.4.1 from apple’s developer site. See this apple developer forum: https://developer.apple.com/forums/thread/712039

1 Like

With a little more digging it looks like this is fixed only in the appium xcuitest driver in appium 2.0 (see the github link below) and won’t be brought in to appium 1.XX. I have had some luck using appium 2.0 with Katalon Studio by using the remote device execution.

I have installed Appium 2.0 beta, however things are not favorable for me. My Katalon can’t start Appium server after 60 seconds
Appium Directory I still use the old link: /usr/local/lib/node_modules/appium

My appium version

If you need any information, let me know

Yes I also run into that issue when I attempt to run an iOS Mobile test. I believe this is because Katalon Studio doesn’t yet support appium 2.0 automatically. The only way I have been able to run tests with appium 2.0 is to use remote device execution. This means you will need to start the appium server separately through your terminal and then run a remote test instead. You will also need to add more information into the desired capabilities that are normally automatic when doing mobile tests including:
“appium:automationName” : “XCUITest”
“appium:deviceName” : “iPhone”
“platformName” : “iOS”
“appium:udid” : “your_device_udid”

There may be an easier way than I have found to start these tests but you can see another post of mine on how I did it.

@kreno @vu.tran But what if I want to adapt to the new version of the application?
like the picture I took above, I can’t start the app with Mobile Recorder, so I can’t Capture the objects

Also, I get an error when I execute the script appium --use-plugins=execute-driver (see image below)

Instead of selecting iOS devices from the Mobile Recorder you can select “Remote” and record a test for the remote device.

I have never really used the mobile recorder and usually work in script mode but here is a screen recording of an example of how the remote mobile recorder can work for appium 2.0. File was large so it is a link to the video:

Note that the remote server url needs to be updated because it is different in appium 2.0 than in 1.XX.

1 Like

Thank you so much @kreno for sharing this workaround.

1 Like

Thank @kreno
I found another simpler way, which is to downgrade my Mac’s OS to 12 Monterey. With this, I was able to run the katalon project on iOS 16

Infor my Mac

Mac OS Monterey 12.3.1
Xcode 13.4.1
appium 1.22.3
Katalon 8.3.0
iPhone SE - iOS 16

In my opinion the problem is in Mac OS Ventura 13
What is your opinion?

1 Like

I still think that the problem is with the version of Xcode instead of the Mac OS version. Xcode 14 had some changes in linking private frameworks which made us unable to build appium’s WebDriverAgent. But it worked when I tested downgrading back to xcode 13.4.1. As long as you stay on that version of xcode you should be able to continue using appium 1.22.3.

1 Like

@kreno

Now xcode 13.4.1 can’t support iOS 16 anymore

Have you upgraded for Xcode 14 and iOS 16 yet?

Hi @thanh.tung.170861 ,

Can you please let us know what did you do to downgrade your Mac’s OS to 12 Monterey and downgrade your Xcode to 13.4.1? Thanks!

Hi @kreno ,

Can you please let us know what did you do to downgrade your Xcode to 13.4.1? Thanks!

@gdearest07 You need to have an apple developer account (free) but if you sign in from this link you should be able to get to all the old versions of xcode.

Thank you, @kreno.

I do have an apple developer account (actually, I even paid for it after not being able to run Katalon neither on iOS simulators nor on iOS real devices, but nothing has helped so far). Does it mean that I can follow these instucttions instead of using your link?

Could you please look into it and let me know whether these instructions are the correct ones? Which do you think is a better aproach - Part 2 or Part 3? Should I delete all the existing projects, cerificates, etc. before atempting to downgrade from Xcode 14?

Thanks!

The link I provided is to the xcode download page. Once signed in you should be able to install whichever version of xcode you like.

That would match with the Part 2 from the link you included. You should not need to delete projects or certificates before downgrading xcode.

1 Like