question

ShantimohanElchuri-8757 avatar image
0 Votes"
ShantimohanElchuri-8757 asked RobCaplan edited

Xamarin Forms iOS project runs in simulator but not in device

I have an app published in App Store and I have not modified any code. Actually before modifying code I wanted to run it once. It ran well in iPhone Xr simulator. No issues. But when I tried to run on my iPhone 6 it was crashing after the load. No messages. Nothing in Output window. Debug or Release nothing works. Deleted bin & obj folders and rebuilt the project but in vain.

Is it that iPhone 6 running iOS 12.x and the Xcode 12.5.1 not compatible? I was trying from VS 2019 ver 16.10.3.

As per this StackOverflow thread I checked and every code behind had XamlCompilation attribute set at the beginning of the code.


dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You could try to use another device to check if this issue still exists. You can also check the Device Logs as following steps , maybe you can get some useful information to known why the app crashed.
1. Connect the device with Xcode
2. Open Xcode, click "Window", select"Devices and Simulators"
3. Click "View Device Logs"

115226-image.png


115311-image.png


0 Votes 0 ·
image.png (309.1 KiB)
image.png (101.8 KiB)
WenyanZhang-MSFT avatar image
1 Vote"
WenyanZhang-MSFT answered WenyanZhang-MSFT edited

Hello,
Welcome to our Microsoft Q&A platform!
There is a similar issue. It caused by incremental builds, you can try to close incremental builds. For more information you can refer to
https://stackoverflow.com/questions/68101464/xamarin-ios-app-crashing-with-error-dyld-library-not-loaded-mapped-file-has-no
116889-image.png



Best Regards,
Wenyan Zhang



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
[1]: https://docs.microsoft.com/en-us/answers/articles/67444/email-notifications.html


image.png (44.8 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes, "Incremental Build' is the culprit. Unchecking it worked for me.

0 Votes 0 ·
WenyanZhang-MSFT avatar image WenyanZhang-MSFT ShantimohanElchuri-8757 ·

Hi, ShantimohanElchuri-8757. There are some privacy information in the screenshot, I have edited it.

0 Votes 0 ·

ThanQ... very much

But I am not able to set your post as the answer.

0 Votes 0 ·
Show more comments
ShantimohanElchuri-8757 avatar image
0 Votes"
ShantimohanElchuri-8757 answered WenyanZhang-MSFT converted comment to answer

@WenyanZhang-MSFT Here is the screenshot of the device log fetched from Xcode.
117342-image.png


iOS Build and iOS Bundle Signing tabs of the iOS Project Properties are shown below.
117381-image.png

117362-image.png

I don't find any issue with these settings as they are similar to other projects under development.

But one thing is noted: Though I don't have another iPhone readily available to test, I get the issue with only the app that has been published to App Store. I have only one app published. All other apps that are not published are running find in my iPhone 6.



image.png (101.4 KiB)
image.png (53.8 KiB)
image.png (46.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.