Xamarin iOS unable to debug over local device iOS 17.1.1

Alex 0 Reputation points
2024-04-11T07:21:13.1733333+00:00

I have two real devices:

  • iPhone 15 Pro Max iOS 17.1.1
  • iPhone 7 iOS 15.7.8

I'm trying to debug my Xamarin application over a real device. Using my iPhone 7 works as expected. But it has been impossible for me to do the same using my iPhone 15 Pro Max.

Xamarin.iOS does not support running or debugging the previous built version of your project. Please ensure your solution builds before running or debugging it.

Keeps on popping on my screen. Also my Error List tab is showing the following:

error MT1045: Failed to execute 'devicectl': 'devicectl -j /var/folders/sx/z644_31d36l4lvbqn3kh4yl40000gn/T/tmpQa6AoB.tmp device install app --device "iPhone de Alex" /Users/alex/Library/Caches/Xamarin/mtbs/builds/MyApp.iOS/36146cef03c6dc5d96831a19912e2eba12555937b6af687d85e404c7a773ae5e/bin/iPhone/Debug/device-builds/iphone16.2-17.1.1/MyApp.iOS.app' returned the exit code 1

I have tried everything that I could think of:

  • Revoke all my provisioning profiles & certificates and generate them all over again.
  • Remove my apple developer account from VS and put it back again.
  • Clean & Rebuild
  • Manually remove bin and obj and Rebuild
  • Disable HotReload
  • Restart everything

Nothing is working. I also tried to debug over iOS 17.2 and iOS 17.4 (lastest one) simulators, and everything is working as expected. But, for my scenario, I must debug using a real device.

My environment:

  • Windows 11
  • Microsoft Visual Studio Enterprise 2022 (64-bit) - Version 17.9.6
  • macOS Sonoma 14.4.1
  • Xcode 15.3

I can provide logs, just tell me what you need

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

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 26,416 Reputation points Microsoft Vendor
    2024-04-18T06:00:03.8433333+00:00

    Hello,

    Xamarin.iOS does not support running or debugging the previous built version of your project.

    Please open Xcode, go to Settings->Location->Command Line Tools, and then choose Xcode15.2.

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    0 comments No comments