Jean Carlo Vega
Jean Carlo Vega

Reputation: 1

Xamarin UI Tests IOS Device Error: Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to install DeviceAgent

Configuration:

Visual Studio 8.5 Build 2739 Mono 6.8.0.104 Xcode Version 11.3.1 (11C504)

Visual Studio 8.4.5 Build 19 Mono 6.6.0.155 Xcode Version 11.3.1 (11C504)

Code:

ConfigureApp.iOS
            .InstalledApp("com.xamarin.MyNewApp55")
            .StartApp();

Exception:

Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to install DeviceAgent

ExitCode: 5

  -c,--codesign-identity  <codesign-identifier> [OPTIONAL]    Identity

used to codesign app bundle [device only]. Deprecated - should use profile path. DEFAULT= -d,--device-id iOS Simulator GUID, physical device ID, or an alias -f,--force [OPTIONAL] Reinstall the app if the device contains an older version than the bundle specified DEFAULT=0 -i,--resources-path [OPTIONAL] Path to resources (executables) to inject into app directory. A list of colon separated files may be specified. -p,--profile-path [OPTIONAL] Path to provisioning profile install Application com.apple.test.DeviceAgent-Runner is not installed on 00008030-0003048114F0802E Error installing application: Failed to install application with path /var/folders/39/0rfg9kc92gx9bbslgw3td95h0000gq/T/xdb/DeviceAgent.iOS.Dependencies/b747d1445588083eee4d1d93a53f3e5b/ipa/DeviceAgent-Runner.app

How can I solve this issue?

Upvotes: 0

Views: 1328

Answers (1)

Junior Jiang
Junior Jiang

Reputation: 12723

About method InstalledApp(string bundleId) , it has follow definition :

Configures the installed app to use. Will force a run on physical device.

enter image description here

You should run it in a physical device .

Therefore , if need to run in simulator device ,should use AppBundle (string path) :

Configures the app bundle to use. Will force a run on simulator.

enter image description here

The AppBundle method can be used to specify where on the file system the app bundle may be found. There are two ways to do so, with an absolute path, or a relative path. This snippet shows using an absolute path to the app bundle:

IApp app = ConfigureApp
    .iOS
    .AppBundle("/path/to/iosapp.app")
    .StartApp();

To use a relative path, the path must be relative to the Xamarin.UITest assembly. This snippet is and example of how to use a relative path to locate the app bundle:

IApp app = ConfigureApp
    .iOS
    .AppBundle("../../../iOSAppProject/bin/iPhoneSimulator/Debug/iosapp.app")
    .StartApp();

The relative path example tells AppBundle to go up three directories from the Xamarin.UITest assembly, and then navigate down the project tree of the iOS application project to find the app bundle.

Here is the official document about Initialize IApp for iOS Applications.

Upvotes: 1

Related Questions