Enrico
Enrico

Reputation: 6266

Visual Studio raises an error MT1045 Failed to execute when deploy a MAUI app to a real device

I have my .NET8 MAUI application and I try to test it on my physical iPhone. Visual Studio is connected to my iMac and the iPhone to the iMac. The deployment on Simulator is working fine. When I deploy on the iPhone, Visual Sutdio shows this error

error MT1045: Failed to execute 'devicectl': 'devicectl -j /var/folders/dm/bwmxpbzn6bvdsyy73c_b453w0000gn/T/tmpBkAavG.tmp device install app --device "Enrico???s iPhone" /Users/enrico/Library/Caches/Xamarin/mtbs/builds/LanguageInUse/1fa03704bb15e35c6f47a701d9d92131e3e0740198296a93338bb3c829bc9cf7/bin/Debug/net8.0-ios/ios-arm64/device-builds/iphone15.2-17.3.1/LanguageInUse.app' returned the exit code 1. 0

In the Output window, I also notice this error:

NSLocalizedFailureReason = This app cannot be installed because its integrity could not be verified. NSLocalizedRecoverySuggestion = Failed to install embedded profile for com.languageinuse.app : 0xe800801f (Attempted to install a Beta profile without the proper entitlement.)

I like to highlight that I deployed the application on the iPhone roughly a month ago without issues. I got the Provisioning Profile from the Apple Store and so on.

The configuration on Visual Studio for iOS is the following.

enter image description here

What can I do to fix this issue?

Upvotes: 2

Views: 1498

Answers (1)

Michael Rumpler
Michael Rumpler

Reputation: 335

I got that error on a new iPad where Developer Mode was not switched on yet. Unfortunately the error in VS does not hint at that at all. I only got a meaningful error message when I looked at the device in Xcode.

To switch Developer Mode on for your device go to:

Settings -> Privacy & Security -> Developer Mode

(Settings -> Search also does not find this)

Upvotes: 2

Related Questions