Every time I run my Xamarin.iOS UITest, I get an error:
System.Exception : Unable to contact test backend running in app. A common cause is that the app is not properly linked with Calabash. Please verify that it includes the Calabash component.
But I don't want to connect to any test backend - I want to run it locally on my iPhone Simulator (I am on a Mac). I created a basic Xamarin project, added a UITest project, and am able to run Android with no issues. I did install the Xamarin.TestCloud.Agent package, and included the #if ENABLE_TEST_CLOUD block in AppDelegate.cs (just in case it was required for local testing), but I can't get it to run locally.
Interestingly, the simulator DOES load, and so does the app. But the test never actually starts (it will fail on .StartApp()). I also get the Mac alert 'Do you want the application "DeviceAgent-Runner.app" to accept incoming network connections?' to which I answer Allow, because why not.
I'm so confused...
Thanks!
edit: this is my app ConfigureApp code:
return ConfigureApp
.iOS
.Debug()
.AppBundle ("../../../Kroe761Test.iOS/bin/iPhoneSimulator/Debug/device-builds/iphone 11-13.5/kroe761.iOS.app")
.DeviceIdentifier("D68D731A-775F-4BF1-8EF6-13F3FEDD00CF") // iphone 11 pro
.StartApp();
I guess you missed adding ENABLE_TEST_CLOUD; in your project options.
Follow all the steps from here.
https://learn.microsoft.com/en-us/appcenter/test-cloud/uitest/get-started-xamarin-forms
Clean and build your project. It should be working.
Related
I can't figure out how to test running my watchOS app as a standalone app. When I run it on the simulator it never works unless I also have the associated iOS app. Running the watch scheme shows that the iOS app is running along with the watchOS app. I created a scheme which just builds the watch and it will cause the watch app to start, but it doesn't actually update the compiled binary.
First of all, you have to create certificates for all project targets and upload on Testflight, Through Testflight (mobile application) you can install the app and it will sync automatically in the watch.
The second option will, Connect your watch with mobile and install that watch application via Xcode on mobile, it will sync automatically in the watch.
This is my first cordova app and i'm trying to use the cordova.plugins.diagnostic plugin. I have it installed correctly i believe. On device ready I can alert that
alert(cordova.plugins.diagnostic != null) // returns true
// Appears to do nothing, i get no alerts
cordova.plugins.diagnostic.isLocationEnabled(function(enabled){
alert(enabled)
}, function(){
alert("ERROR");
});
I assume my error is with how i am running the app. I build the app via
cordova build ios
Then I run the build via xCode 9.4 to a local iPhone X
Any ideas on what i am doing wrong is much appreciated.
I have found the issue! Originally, when running
cordova build ios
I would receive and archive not found error, that i was essentially ignoring because it didnt seem to effect anything when built via xCode.
I resolved the error by running instead
cordova build ios --buildFlag="-UseModernBuildSystem=0"
Then, I can take the outputed .ipa file and install it onto my device via
Window > Devices and Simulators > {select device} > drag and drop ipa into app list
Running the app after this allowed for successfull response from isLocationEnabled!
I hope this answer helps someone else :D
I want to see the results of my code on my iPhone 5 device instead of Xcodes simulator.
I followed this website https://facebook.github.io/react-native/docs/running-on-device.html which has pretty clear directions. I followed it all but whenever I hit run on my WebStorm IDE, it still gets directed to the Xcode simulator.
In Xcode, which's where you configure these settings, I tried (like the website says):
Product > Destination > My iPhone
but again, despite doing this, it still gets directed to the Xcode simulator.
It's not currently possible to choose a device, please please follow this feature request for updates: WEB-23927.
You can pass device name to react-native by specifying --device "your_device_name" in Run arguments: field of React Native run configuration
I originally asked this here
http://forums.xamarin.com/discussion/79195/xamin-app-terminated-in-simulator-after-using-test-recorder-please-help#latest
Just like it says. After I've used test recorder, the simulator will always terminate the app with a log message of "exited due to invalid code signature". I have a feeling it is because of this:
https://developer.xamarin.com/guides/testcloud/testrecorder/
When recording tests for an iOS application, the Test Recorder will
automatically inject a special library called the Test Recorder Plugin
into the app bundle (Android apps do not need this library). The Test
Recorder Plugin is extra code that allows the Test Recorder to observe
the application that is being tested and generated the C# code for the
various events. The presence of this library is grounds for the Apple
App Store to reject the app bundle; do not submit any IPAs that were
used by the Test Recorder to the App Store for distribution.
How do I undo this? I've already uninstalled the app from the simulator, cleaned and rebuilt the project.
Have you tried Simulator -> Reset Content and Settings? It's possible the resigned app is getting cached by the simulator (even after uninstalling) and not installing the rebuilt app from Xamarin Studio. Test Recorder always resigns the .app/.ipa as a separate file with the prepended 'xtr'-filename.
I have a project with two targets -- an iOS app and an OSX console app. The latter was created using Xcode File->New Target and selecting "Command Line Tool". This console app is used to prep a default database needed by the iOS app -- using CoreData. This has been working fine until I upgraded to Mountain Lion and xCode 4.4. Now when I try to run the command line tool I get a "Could Not Launch -- permission denied" error. I have tried playing around with signing certificates, to no avail. Interestingly if I create a new "hello, world" command line tool in a new project it works just fine -- and it is not signed at all.
I checked the file and it has -rwxr-xr-x permission. In the debugger the app fails on startup even before it tries to access the moms. If I try to run this outside of the debugger at the command line, it ends with a kill 9 message.
Any ideas would be greatly appreciated.
I just had the same problem in my iOS/Mac project. None of the above suggestions helped but I managed to find the correct answer so I'm sharing for future ref.
I had to set code signing to Don't codesign for the MacOSX target. The rest works fine no matter if your deployment target is set to default or not. Don't forget to set your Base SDK to Current OSX and supported platforms to "x86_64 i386".
HTH! Cheers
Also you can get "Could Not Launch -- permission denied" error when trying to launch app on device with password which not unlocked at launch time.
Found the answer. On the Info page I had to change OS X deployment target from Default to 10.8. Default I guess no longer defaults correctly. Anyway it now works.
I also saw this error message when attempting to run a newly created Cocoa app target. The problem was that I had created my app target in an iOS app project, but instead I needed to create a subproject and create the app target in the new project.
Ran into this when I tried to run before creating and installing the provisioning profile.
in my case, I changed deployment target to 10.8(previous is 10.6),and it works.