Unable to deploy any xamarin forms (ios) app to a physical device

andy hollis 0 Reputation points
2023-07-26T09:48:07.82+00:00

After upgrading to the latest visual studio for windows (17.6.5) , xcode (14.3.1) and xamarin.ios on the mac (16.4.0.6). Deploying to a physical device just fails "An error occurred executing MTouch." It builds fine and runs on a simulator.

Im convinced i had it running under iOS16 yesterday but today its the same mtouch error.

Looking in the logs in the mac i can see it is trying to execute mlaunch with -sdk 0.0 .

I assume this means it cannot find the required version of the sdk?

The release notes for xcode say "The Xcode 14.3.1 release supports on-device debugging in iOS 11 and later" so I have set my deployment target to 11, but no change. Do i need to install the older SDK's on the Mac somehow?

My main project is 5 years old, so I've tried creating a brand new Xamarin forms project and get the same error so its not project specific.

Any suggestions would be greatly appreciated as ive been stuck for 3 days now.

Thanks

Andy

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,378 questions
{count} votes

1 answer

Sort by: Most helpful
  1. andy hollis 0 Reputation points
    2023-07-27T16:39:13.7566667+00:00

    The xamarin project in VS 17.6.5 does not deploy to a device running ios 15.7.

    It works fine if ios16+

    Once attempting iOS15 where the deployment fails, all subsequent attempts to deploy even with ios16 will fail until visual studio is restarted which added to the confusion.

    Other issues were caused by trying 101 fixes and should be ignored


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.