Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘carthage bootstrap –platform iOS,tvOS’ exited with code 1

Solution for Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘carthage bootstrap –platform iOS,tvOS’ exited with code 1
is Given Below:

Hi Im still having an issue when running my basic script using Appium.

The issue is Unable to launch WebDriveragent because of xcodebuild failure.

Tried executing the Carthage bootstrap –platform iOS,tvOS’ but returns an error

platform iOS,tvOS

IntelliJ Error

I’ve tried to backtrack the issue by going to my webdriveragent and entering

./Scripts/bootstrap.sh -d

but still it produce an issue

Bootstrap Issue

so I tried to use

carthage bootstrap –use-xcframeworks –platform iOS –no-use-binaries;

it does not return any issue

Appium Server Issue

Im using

MacOS = BigSur 11.5
Appium = 1.17
Xcode = 12.5.1
Carthage version = 0.38.0

Sorry I’m really new to iOS world. Followed all tutorial in the web. Manage to connect an app (IntegrationApp.app) and it works in iOS Real device and simulator but when I tried to connect Appium to real device and simulator it fails
Also tried to reinstall Carthage and even the whole Appium (tried the whole process)

Steps I did

  1. Install Appium desktop and Appium doctor

  2. Open the location of Appium and look for webdriveragent

  3. Open terminal and set it to the location of webdriveragent

  4. code I use is : mkdir -p Resources/WebDriverAgent.bundle

  5. ./Scripts/bootstrap.sh -d (didn’t work so tried other which stated above)

  6. Open the WebDriverAgent file in Xcode and set the necessary field (Build success)

  7. Tried to open IntegrationApp.app in iOS device(real and simulator)(Success)

  8. Tried to open Appium inspector and set the following:

    DesiredCapabilities cap = new DesiredCapabilities();
    cap.setCapability(“platformName”, “iOS”);
    cap.setCapability(“platformVersion”, “14.5”);
    cap.setCapability(“deviceName”, “iPhone 12”);
    cap.setCapability(CapabilityType.BROWSER_NAME, “safari”);
    // cap.setCapability(“app”);
    URL url = new URL(“”);
    IOSDriver driver = new IOSDriver(url, cap);

Manage to solve this problem (Though it has another issue on real device – still has answers here)

Download new Appium version v1.18.3
Tried to setup again but after creating the Resource Directory (mkdir -p Resource/WebDriverAgent.bundle). instead using ./Source/bootstrap.sh -d I used

sudo ./Source/bootsrap.sh -d

I’m using a company provided macbook air. And I also run the

sudo carthage bootstrap --use-xcframeworks --platform iOS --no-use-binaries;

And this is a good read to https://www.mutuallyhuman.com/blog/webdriveragent-getting-started-with-automated-ios-testing/