Error "dyld: Library not loaded: @rpath/XCTest.framework/XCTest" displays When deploying WebDriverAgent into real device

@chiwhitesox56
@hung.nguyen201087

I just wanted to update you that I’m still trying to figure it out. I’m also struggling to run on a real IOS Device.

When I run: xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=c8be317ecec81cd9b8d06b47bcb575a7f46ced57’ test

Testing failed:
Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the project editor.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.2’
** TEST FAILED **

I got passed the above by.

  1. Open Xcode
  2. File Open
  3. Navigated to: /Users/[User]/node_modules/appium-xcuitest-driver/WebDriverAgent
  4. Selected: WebDriverAgent.xcodeproj
  5. Click the General link in Xcode
  6. Select WebDriverAgentLib (Under Target)
  7. Check: Automatically manage signing
  8. Added: My Team
  9. Selected: WebDriverAgentRunner (Under Target)
  10. Check: Automatically manage signing
  11. Added: My Team
  12. Open Terminal and re ran: xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=c8be317ecec81cd9b8d06b47bcb575a7f46ced57’ test
  13. Got Successful Message

writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/h8/vkp1j5193d5g9kpmbyd3f3700000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/1192305d407e59dac528a7de89efab56/c8be317ecec81cd9b8d06b47bcb575a7f46ced57/ManifestCache.plist
Test Suite ‘All tests’ started at 2017-01-21 14:05:05.232
Test Suite ‘WebDriverAgentRunner.xctest’ started at 2017-01-21 14:05:05.236
Test Suite ‘UITestingUITests’ started at 2017-01-21 14:05:05.238
Test Case ‘-[UITestingUITests testRunner]’ started.
t = 0.00s Start Test at 2017-01-21 14:05:05.243
t = 0.01s Set Up

  1. Executed the automated script and failed launching with the below error.

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not initialize ios-deploy make sure it is installed and works on your system (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 378 milliseconds
Build info: version: ‘2.52.0’, revision: ‘4c2593c’, time: ‘2016-02-11 19:03:33’
System info: host: ‘Darins-MacBook-Pro.local’, ip: ‘10.0.0.8’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.12.2’, java.version: ‘1.7.0_79’
Driver info: io.appium.java_client.ios.IOSDriver

  1. Enter: which ios-deploy and I get the below
    /Users/[user]/.nvm/versions/node/v6.0.0/bin/ios-deploy

**I got past the above by running brew install ios-deploy from the /Users/[User]/node_modules/appium-xcuitest-driver/WebDriverAgent *Not sure if you need to execute from here.

When I executed the automated script:

Testing failed:
Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the project editor.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.2’

read pavanbachu
After you are done setting up the config file rebuild the APP.
Try executing again.