Replies: 3 comments 20 replies
-
I had similar issue. I read at many places that this kind of thing can happen due to missing assemblies/plugins. And I could fix it from the steps described here. Basically we need to clean up rebuild again. But it is more than project cleanup. How did I find those errors regarding missing assemblies/plugins? Go to Xcode / Devices and Simulators, select your connected iPhone and go to device log. When launching your app, it will show the errors in the device log. I did the below in Visual Studio Code on Mac. You will need to do similar in Visual Studio 2022.
If it doesn't work, make sure you check the device log for errors and get deeper into it. Good luck! |
Beta Was this translation helpful? Give feedback.
-
You really need to figure out why it's crashing, instead of applying solutions at random. The first two things to look at are:
That will hopefully give an idea about what the problem is. |
Beta Was this translation helpful? Give feedback.
-
Closing as per xamarin/xamarin-macios#21228. |
Beta Was this translation helpful? Give feedback.
-
I had a working App which I developed on Android/iOS Simulators and deployed successfully on my local iPhone. The App was working. Since May I really just did development (not much) with test on the Simulators.
Well, in July I wanted to deploy it to my iPhone again and couldn’t start it at all as it crashed instantly on startup.
I hat changes in NuGet versions and one of them in DevExpress which brought some problems with Trimming I had to figure out. Well, changed that, but the App still crashed. When I tried to run the Release App on Simulator I could get further as on my iPhone and figure out that it stopped on a simple Database access to SQLite via Entity Framework.
Anyway, I still needed to find out why it stopped working on my iPhone and as I tried different things with AOT compilation, Optimization, Trimming and nothing helped, I opened the following question on Stackoverflow: Database Access with Entity Framework Core not Working anymore in Release
Long story short: yesterday, I also wanted to prepare a small example project, made a copy of my existing App, renamed the App as well as changed the
<ApplicationTitle>
,<ApplicationId>
and<ApplicationIdGuid>
. I also renamed the the entire occurrence of the App name around the Solution, which basically were changes in the Namespace.After doing that, I deployed to my iPhone and was really confused, as I could start the App this time and got over the Point where my Database access crashed the app previously and now it didn’t.
I thought, maybe my App is blocked by my iOS with the previous name or something like that. Could this be the case?
The App was released with the old Name before all the iOS Updates to 17.x which have had an impact? Also changes in Visual Studio 2022 Preview etc.
But, now changing the
<ApplicationTitle>
,<ApplicationId>
and<ApplicationIdGuid>
in the previous App to see if it was that didn’t bring success. So, compared to the copy of the App, renaming all namespaces and names inside the solution was missing. The original App still crashed with the changed parts above!Now, my question is, how can this be explained and is there anything I have to change or do on Mac side which is used for compilation of the App or on iOS side where the App was deployed in developer mode on previous iOS versions?
@rolfbjarne - sorry for tagging you here explicitly, but I know that you are a real expert in such things and might have an answer?
My concern is that when I do not know what the reason was it stopped working, I might have problems later on and be stuck. Right now, it took me several weeks to even get to this point. Things were working before and from one to another it stopped and crashed right away on my iPhone, even without exceptions. Also no problems in Debug, but crashed without Exception on iPhone or even in Release on Simulator.
What I also find strange is, that when I deploy my original App on my iPhone (the one that crashes) my App size shows 225 MB in size where the working one shows 179 MB. I also deleted it several times and re-deployed with a fresh build. Still higher App size
Visual Studio 2022: Preview or release
Maui: 8.0.70, 8.0.80, 8.0.82
iPhone: 14 Pro Max
iOS: 17.6.1
Xcode: 15.4
MacOS: Sonoma 14.6.1 (latest Updates)
Beta Was this translation helpful? Give feedback.
All reactions