I'm building a Xamarin app, and, so far, I've been able to build without issue on the iPhone Simulator, but I haven't been able to get the app to launch successfully on a physical iPhone device. In the past (about a month ago), the app was working fine on the same device. Here's some background on the specifics:
I develop my Xamarin code on my Windows machine, which is linked a remote Mac (hosted by MacStadium, a third-party hosting service).
My test phone is an iPhone 5c running iOS 10.3.3
To deploy to my iPhone, I build my app in Release mode in Visual Studio, upload the code to a third-party app installation service, Installr, which hosts the IPA file and assists with the installation of my app on the physical device. I've never had an issue with Installr and have no reason to believe that this is the source of my problem.
Since the last time the app worked on the physical device, I updated Visual Studio to version 16.3.2 and updated Xamarin. Here's the Xamarin Specs:
Generally, what happens, is that I download and install my app on the iPhone without any issue. However, when I click on the app, the splash screen loads for about 5 seconds, a white screen briefly appears as follow, then the app crashes.
I've seen several related articles on StackOverflow and other sources on the internet, but none of the proposed solutions see to work for me. For example, I've tried adding [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
to App.xaml.cs with no luck.
I've also played around with changing the CSProj file settings to compile for various combinations of ARM64 and ARMv7. Changing this didn't help either. I've tried changing the linker behavior to "Don't Link" from "Link Framework SDKs Only", and I get an error message stating that the native code is too large for 32-bit architectures. I would compile for only 64-architectures to get around this error, but I believe that the iPhone 5c uses a 32-bit architecture.
Here's what my iOS Project's CSProj file looks like currently. I've tried checking just about all of those checkboxes with no luck:
I'm stumped as to what this could be. Any suggestions would be greatly appreciated. To further complicate things, I haven't been able to get a good log file from the iPhone. Since the Mac is remotely hosted, I can't plug my phone into XCode to pull the logs that way. Does anyone have a reliable solution to get log files another way?
It looks like upgrading solved the problem. Visual Studio was updated to Visual Studio to 16.3.5 from 16.3.2. XCode on my Mac was updated to Version 11.1. After these updates, Visual Studio performed an update while connecting to the Mac remotely.
Related
I have looked through the Microsoft documentation but everything seems to want you to run everything with the development code. I used a bitbar tutorial to help start my C# xamarinui test framework. I have the emulators working I just want the apk and ios apps to install as the first test. I know how to drag and drop and put the app on the phone manually. I am looking for a way to get the app to install and launch through test code or by some operation. I do not have access to the source.
Only for the Android case, google for the apk, usually they are available on sites like apk pure etc. If the apk has executables for x86 inside you could install in on android simulator using just drag and drop.
For iOS this seems not possible as the installer has to be signed with appropriate profiles that only app developer has in his possession.
I have 3 self-written apps on my phone. 2 written with Xamarin.Android and one written with Xamarin.Forms. But there is a big problem. It always work only 2 or 1 app depending on which of the 3 apps was installed last. If one of the two Xamarin.Android apps was installed last, then both Android apps work. The Forms App, however, crashes immediately. Same the other way around. If the Forms app was installed last, it works fine. The two Android apps crash immediately.
Is there any reason for that? Are the frameworks not compatible?
I had the same problem trying to install the apk from Debug folder.
Steps that worked for me:
- Disable "Use Shared Runtime"
- In Advanced Settings, Select supported architecture
Check the screenshot if not clear
If you are deploying a debug apk into the same device, with different Runtimes, when the apk is installed will remove the previous / override. So, you will need to: disable Shared Runtime, or make sure the dependencies are all the same in all the applications
If you are using visual studio then Check "Application output" with release on device.
In Application Output you can see if any exception is causing problem..
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
I am Using CEF(Chromium Embedded frame work) in my windows application. its working fine in my machine. but after it is installed in user machine, not working. not sure which file is missing. i hope i dont want to do anything with the code as its working locally.
Getting the below error for the users
using VS2015 -
framework:4.5.2 -
cefsharp dll :51.0.0.0
I also make sure required files are there after installation see below
https://github.com/cefsharp/CefSharp/wiki/Output-files-description-table-(Redistribution)
refered below links in my case not working
CefSharp doesn't run in WIndows 7
Unable to deploy CefSharp application
https://github.com/cefsharp/CefSharp/blob/master/NuGet/Readme.txt#L16
wondering how its working in the visual studio installed system?.in few windows7 system its working and not working in same windows 7 with vs2015..???
so is there any specific thing needs to be installed on users system.
Thanks
Dev
After few research i have resolved the issue. while doing the setup project for release or installation.Apart from cefsharp dll we need to add few more supporting files explicitly.find the below images. First images is the checklist you should make sure these are added along. Second image shows how to add.
Thanks
Dev
I've been trying to setup mobile development on VS2015 for several days. The issue is
I created blank app
Started Emulator From Xamarin Android Player
Started Debugging
I got my solution built succeed but deploy failed. Here is image
I checked the error list but as we can see it is nothing there.
Well, I searched on internet with different queries and came to know that this problem is quite common but no permanent solution is provided. Some of the solutions suggested on other sites including Xamarin Official Forums are as follows:
Restart debugger.
Install valid Java Sdk Manager.
Restart Visual Studio.
Install android packages for targeted platform.
Create virtual device.
Change settings in Hyper-V manager.
Set your project as Startup Project.
Uninstall android components and reinstall them.
Disable Fast Deployment Option in Project Properties.
I tried everything but issue stands still. The packages I have installed for SDK are in image as follows
I don't know what part of package installation I am missing or there is some problem with VS2015. I have been trying to resolve this deployment issue but in vain.
Note*: I am using HP EliteBook 8460p with Win 10 64-bit installed on it.