Xamarin IOS app fails - c#

New to using Xamarin with Visual Studio 2015. I have set up what I think is a very simple IOS app where it counts the number of button clicks.. I am using a MacInCloud machine as my build host. I am using an IPhone simulator.
When I build and deploy, the application sort of flashes for a moment and then goes away. It does this repeatedly. In the output window I get the following error
Launching 'NewApp.iOS' on 'iPhone 5 iOS 9.0'...
The app has been terminated.
Launch failed. The app 'NewApp.iOS' could not be launched on 'iPhone 5 iOS 9.0'. Error: An error occurred while executing MTouch. Please check the logs for more details.
The app has been terminated.
If anybody can offer me some direction with this it would be greatly appreciated.
--Jason

It has been a while since I had this specific issue. Try cleaning your project. Possibly go as far as deleting the bin/debug folder contents in your IOS project. Make sure your architecture is set to 86_64 under the build / advance tab. Make sure your MAC build client is up to date, Make sure you are building for debug. close VS and reopen. Also do a cold restart on your mac and windows machines. Don't "Reopen windows" either.

Related

Native iOS app built in Xamarin/Visual Studio opening then instantly closing

Our company has a native iOS app that was built in Xamarin/Visual Studio. We originally uploaded it to the App Store a few years ago and have made a few changes to it over the years.
The app itself is very basic. It's basically just a web view that navigates to a Single Page Application. There is very little native app code in the project.
Every week or so I regular launch the native app on our company iPad. Instead of running a version pulled down from the App Store, I periodically rebuild and upload the app from a Mac Mini running Visual Studio and/or debug it directly from the Mac Mini through Visual Studio.
A few days ago I tried launching the native app and after opening it immediately closed. I tried rebooting the iPad but the app still minimizes/closes immediately after opening. If I double-tab the Home button on the iPad, I can see the app still running in the background, but any time I tap on it it immediately minimizes itself.
I tried Cleaning and Rebuilding the native app solution in Visual Studio and re-uploading it to the iPad and that didn't fix it. I updated Visual Studio (and all of its packages) on the Mac Mini, updated XCode, updated Mac OS, updated iOS on the iPad, and nothing resolved the issue.
When I attempt to debug the app from Visual Studio, it shows two error codes in the Output window: MT1043 and MT1007. The debugger always fails to attach to the app as well.
I've tried Googling the error codes and the problem itself and haven't found anything that has worked. I've tried generating a new Development Certificate and Provisioning Profile to use to sign the app when uploading it to the iPad but that didn't work either.
What's strange is that if I download the app off of the App Store it works just fine. The source code that I'm attempting to build/run right now is identical to what it was at the time it was deployed to the app store. What else is strange is that, if I spin up an iOS Emulator and upload/debug against that, the app works just fine.
I tried using a different iPad and it had the same issue. The app minimizes itself immediately after attempting to launch it.
Found the answer. Had to set the system certificate trust from "Always Trust" to "Use System Default". Same solution as provided here: https://stackoverflow.com/a/52506186/9704484

Cannot install UWP app package in release mode on windows 10 iot core

I have an application that i want publish it using application packages file and install manually i don`t want to use Microsoft Store for publishing my app. I create my application package files as you can see below
After that when I want to install my application package from Windows 10 iot Device Portal I didn`t got any error but when application run it stucks on splash screen page.
Generally, if you encountered an app hung up when running, you can follow the below steps to troubleshoot.
Try to deploy/debug the app from Visual Studio;
Try to deploy/debug with a blank app;
Set break points or trace the event log to check if there is some exception or what code causes the hung up.
When debugging with Visual Studio, checked the Compile with .Net Native tool chain in Debug setting, by default, when the app runs in debug mode, it will not use Compile with .Net Native tool chain. Please see this blog.
If possible, you can share the code of your splash page.

Xamarin app deployment errors

When I create a xamarin android blank app template and try to debug the emulator pops up, but the app itself doesn't when I close it it says I have deployment errors I changes the log to debug mode, but I can't find anything wrong (I also read running in administrator mode fixes it but it didn't work for me).
Build Output : http://pastebin.com/gEyY1TZD
Make sure your settings inside the Android Emulator have developer mode enabled and the correct adb settings too, same goes for usb if you use that in the end.
Also, if you're using Xamarin Android Player then try using the main Android AVD Manager to emulate your apps. (and vice versa).
If it still doesn't work, then try using a physical device connected via ADB to then debug the app.
I fixed this by going into that app and enabling developer mode (just like Imdad said) then going to build>>rebuild solution then clean solution. then build >> rebuild "your_app_name" then clean "your_app_name " and then finally going build deploy app. Thanks everyone for helping me out.

Xamarin deploying not working with Android

I've set up a new Xamarin.Forms Project. I want to build and deploy it to an emulator or an Android device, but it is not working. In the Outputwindow of Visual Studio, the following error is displayed:
The application could not be started. Ensure that the application has
been installed to the target device and has a launchable activity
(MainLauncher = true).
Update:
If I look in the build logs i can find following:
2>Mono.AndroidTools.InstallFailedException: Unexpected install output:
Error: Could not access the Package Manager. Is the system running?
2> bei
Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String
output, String packageName)
2> bei
Mono.AndroidTools.AndroidDevice.c__AnonStoreyD.<>m__0(Task`1
t)
2> bei
System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
2> bei System.Threading.Tasks.Task.Execute()
2>Deployment failed because of an internal error: Unexpected install
output: Error: Could not access the Package Manager. Is the system
running?
You need to first set the Android project as the Startup Project.
Right click the Android Project and select Set as StartUp project.
Ensure that you have checked the Build and Deploy checkboxes.
You can right click the Solution and select Configuration Manager.
Also, please ensure that the Emulator is already running.
You need to wait for the emulator to full start - takes about a few minutes. Once it is fully started (UI on the emulator will change), it should work.
You will need to restart the app after the emulator is running and choose the running emulator (when prompted).
This can be caused by a few things. When ever I get this, I switch the Output window drop-down to Build. Usually that shows an INCOMPATIBLE error of some kind. That usually means the app install on the device/emulator got corrupted/messed up in some way. The app probably will not even show up on the app dashboard area but if you go into Settings -> App (or App Manager) -> then look for the app's App ID (NOT the app's name). When you find it, uninstall it and try again.
Another common cause of the error for me is that the correct architecture is not selected in the Android project properties. This usually is the case when trying to run on the Xamarin Android Player. To fix that, right-click the Xamarin Android project -> Properties -> Android Options -> Advanced -> select x86
This means you are deploying to a device/emulator with an app that doesn't contain the appropriate architecture.
So let's make sure you have the following, first go to your android project options and make sure you have these checked:
Then you might also need to click Advanced on this screen and check the appropriate architectures:
I keep getting this error too with an Android emulator running Android 4.4.2 (though I am not using Xamarin.Forms) and it only happens with that emulator. I resolve it as follows:
1) In the command console (cmd.exe) type the following commands to restart ADB:
adb kill-server
adb start-server
2) In your project choose the Build menu and choose Clean Solution.
3) Try deploying the app again.
You might have to repeat the above twice sometimes (if it doesn't work its a good idea to shut down the emulator and then restart ADB then try deploy again).
In my case application icon needs to be set on Android Manifest.

ClickOnce windows application will not start

I have created a windows application using c# VS express 2012. The app works great in the VS environment. I have published the application using VS(ClickOnce) to the Desktop as an offline application, which does not check for updates. The app is not signed and security is disabled. The application seems to install fine when I run the setup.exe file. However, when I try to run the program from the start menu nothing happens. In the task manager, a process for the application appears for a few seconds then just goes away. The app window doesn't show and there aren't any indications of an error. If I navigate directly to the .exe of the app (%userprofile%\appdata\local\apps\2.0\%random id%......) and run it that way, it starts up and appears to function as designed. I've done some research and found that certain drivers and software (if installed) will cause this behavior (i.e. Kensington Mouse driver and Provencia software(?)). I've checked and I do not have either of these installed. Any help with this will be much appreciated.
Thanks in advance.

Categories

Resources