Windows Surface Laptop 7 (ARM) - VS 2022 17.12.3 - MAUI - Hot Restart iOS - Object reference not set to an instance of an object.

Christopher Meehan 0 Reputation points
2024-12-23T03:48:52.1833333+00:00

Hello - going a bit kookoo here. Working on a MAUI app, not updated to 9 yet. It debugs, builds and can push to test group in Google Play Store. I'll preface all this next bit with this... I was not able to test at all on a physical usb connected iOS device prior to having to replace my main device and elected to go with ARM SL7. I now have access to two different physical iOS devices (iPad and iPhone), both of which I can see in iTunes.. To setup Hot Restart, I did the following..

  1. I have a valid apple developer account.
  2. devices are provisioned in the developer account portal.
  3. Certificates and provisioning profiles are setup correctly (deleted and redid all this 3x)
  4. VS 2022 see's my account, finds valid certs and provisioning profiles, with no errors.

However, I don't recall the hot restart wizard identifying the plugged in device at first run on this new machine as some of the setup articles describe and when I'm in VS, I only see iOS Local Device --> Local Device. It doesn't show, iOS Local Device --> Local Device --> "test iPhone" or whatever the device name is.

I plan to get access to mac / xcode in the near future, but this is insanity, simply trying to see if I can even launch my MAUI app on a physical device as I'm building.

I can't seem to find anything that tells me how to start the full hot restart setup wizard again from scratch either. Maybe deleting some local configuration files? I tried disabling and re-enabling Hot Restart in the tools --> options --> xamarin --> iOS settings but nothing.

When I do try to run it with debug and "Local Device", it builds, then flips to the output view and states one line "object reference not set to an instance of an object". I'm happy to trace further but don't know and kind find where any logging data would be for this.

I sense that I'm supposed to be seeing the usb attached device's name in the "Local Device" menu when before I hit F5 but I don't. Really just want to test the gobs and gobs of code that works on android, but extremely fearful of how much I'm going to have to fix being so difficult to work with Apple.

Any help or guidance would be massively appreciated. Thanks for the time for anyone that read through all that!

-C

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,316 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,769 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 68,721 Reputation points
    2024-12-23T17:25:09.92+00:00

    Visual Studio can only build and run an IOS application via a paired Mac. Xcode is used for the build and deploy to the simulator or physical device (which is plugged into the Mac).

    https://zcusa.951200.xyz/en-us/dotnet/maui/ios/pair-to-mac?view=net-maui-9.0


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.