Forum Cross Platform with Xamarin

Trouble running cross platform UITests on Xamarin.iOS

I am having a few issues running my Xamarin UItests on iOS side of a shared application. The tests run no problem on Android, but I am getting a System.Exception when I try to run them on iOS.

SetUp : System.Exception : This app bundle is not valid for running on a simulator. To fix this issue please ensure that your target device is a simulator.To run against an installed app on a physical device you can useInstalledApp("ie.eoin.myapp")
I try run the tests on the simulator as well as on a real device with the same exception. Below is the start of the stack trace.

Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal(Xamarin.UITest.Configuratienter code hereon.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x0008a] in :0
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, Xamarin.UITest.TestCloud.TestCloudiOSAppConfiguration testCloudAppConfiguration, Xamarin.UITest.Shared.Http.HttpClient testCloudWsClient, Xamarin.UITest.Shared.Http.HttpClient xtcServicesClient, System.Boolean testCloudUseDeviceAgent) [0x0007a] in :0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00302] in :0
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in :0
at Shared.UITest.AppInitializer.StartApp () [0x00036] in /Users/eoinahern/Documents/xamarin_projs/HomeApp.Mobile/Shared/Shared.UITests/AppInitializer.cs:23
at Shared.UITest.Common.SetUp () [0x00002] in /Users/eoinahern/Documents/xamarin_projs/HomeApp.Mobile/Shared/Shared.UITests/Common.cs:17
at Shared.UITests.MapScreensTests.SetUp () [0x00002] in /Users/eoinahern/Documents/xamarin_projs/HomeApp.Mobile/Shared/Shared.UITests/MapScreens/MapScreensTests.cs:16
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.6.0/bockbuild-mono-4.6.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
In my startApp() method in the AppInitializer class, the path is pointing to the correct .app file in bin directory.

public static IApp StartApp()
switch (TestEnvironment.Platform)
case TestPlatform.Local:

if IOS

                platform = Platform.iOS;
                return ConfigureApp
                                .AppBundle(GetLocalIOSTestAppPath())                                        .StartApp(Xamarin.UITest.Configuration.AppDataMode.Clear) as IApp;


I am not sure why the tests wont run. I tried changing to an actual device. Also, the .app file has what looks like the symbol from a stop sign as its icon. Not sure what this means. I'll check out what that means next, but for now I am stumped. Any help is appreciated. seriously stuck here.

Sign In or Register to comment.