Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dot net MAUI does not support iOS 18.3.1 #22243

Open
MohanadFalah opened this issue Feb 24, 2025 · 6 comments
Open

Dot net MAUI does not support iOS 18.3.1 #22243

MohanadFalah opened this issue Feb 24, 2025 · 6 comments
Labels
bug If an issue is a bug or a pull request a bug fix mlaunch
Milestone

Comments

@MohanadFalah
Copy link

Description

Hi , dot net MAUI does not support the current version of iOS 18.3.1 ?!
we can not run any iOS app on Simulators.
Thank you.

Steps to Reproduce

In vs code when we try to run the iOS :
dotnet build -t:Run -f net9.0-ios

output :

MyApp net9.0-ios failed with 2 error(s) (3.6s) → bin/Debug/net9.0-ios/iossimulator-arm64/MyApp.dll
EXEC : error MT1206: Could not find the simulator runtime 'com.apple.CoreSimulator.SimRuntime.iOS-18-2'.
/usr/local/share/dotnet/sdk/9.0.200/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1175,5): error MSB3073: The command "/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.2/18.2.9180/tools/bin/mlaunch --launchsim bin/Debug/net9.0-ios/iossimulator-arm64/MyApp.app/ --device ":v2:runtime=com.apple.CoreSimulator.SimRuntime.iOS-18-2,devicetype=com.apple.CoreSimulator.SimDeviceType.iPad-mini-A17-Pro" --stdout /dev/ttys003 --stderr /dev/ttys003 --wait-for-exit:true" exited with code 1.

Link to public reproduction project repository

No response

Version with bug

9.0.14 SR1.4

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.14 SR1.4

Affected platforms

iOS

Affected platform versions

iOS 18.3.1

Did you find any workaround?

no

Relevant log output

MyApp net9.0-ios failed with 2 error(s) (3.6s) → bin/Debug/net9.0-ios/iossimulator-arm64/MyApp.dll
    EXEC : error MT1206: Could not find the simulator runtime 'com.apple.CoreSimulator.SimRuntime.iOS-18-2'.
    /usr/local/share/dotnet/sdk/9.0.200/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1175,5): error MSB3073: The command "/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net9.0_18.2/18.2.9180/tools/bin/mlaunch --launchsim bin/Debug/net9.0-ios/iossimulator-arm64/MyApp.app/ --device ":v2:runtime=com.apple.CoreSimulator.SimRuntime.iOS-18-2,devicetype=com.apple.CoreSimulator.SimDeviceType.iPad-mini-A17-Pro" --stdout /dev/ttys003 --stderr /dev/ttys003 --wait-for-exit:true" exited with code 1.
@drasticactions
Copy link
Contributor

@MohanadFalah I believe your issue should go to dotnet/macios, it's unrelated to the MAUI UI tooling.

@Ying-6
Copy link

Ying-6 commented Feb 25, 2025

This issue has been verified using Visual Studio Code 1.97.2 (9.0.40 & 9.0.14 & 9.0.0). Can repro this issue on iOS 18.3.1 platform.
But by pressing F5 or clicking Start Debugging on VSCode, can successfully debug to iOS 18.3.1

cmd: dotnet build -t:Run -f net9.0-ios
Image

F5 or clicking Start Debugging:
Image
MauiApp1.zip

@drasticactions
Copy link
Contributor

drasticactions commented Feb 25, 2025

You're going to have the same thing happen if you build a net9.0 ios app outside of MAUI. Running that command without picking a device is going to pick the first one in its list, which is going to fail, because it's looking for 18.2 runtimes and simulators and, I'm assuming, you've installed the 18.3 simulators (They upgraded in place with the current Xcode 16.2).

It works in VSCode because you've selected the device, so it can deploy directly to it.

If you select the device you're deploying to (https://learn.microsoft.com/en-us/dotnet/maui/ios/cli?view=net-maui-9.0#launch-the-app-on-a-specific-simulator) you should be able to work around that.

@rolfbjarne What do you think?

e. Doing dotnet new ios and trying to deploy it gets the same error

Image

Following the doc I linked to and specifically selecting the device

Image Image

It works fine

@Ying-6
Copy link

Ying-6 commented Feb 25, 2025

@drasticactions I can successfully use cmd to deploy according to the method you provided.
Image

@rolfbjarne rolfbjarne transferred this issue from dotnet/maui Feb 25, 2025
@drasticactions
Copy link
Contributor

drasticactions commented Feb 25, 2025

Thanks for migrating it!

For a little more context, when you install the 18.3 simulators in Xcode, it automatically builds defaults for the 18.3 simulators, and the first one in the list (at least for me) is com.apple.CoreSimulator.SimDeviceType.iPad-mini-A17-Pro, which is 18.3.

@rolfbjarne rolfbjarne added bug If an issue is a bug or a pull request a bug fix mlaunch labels Feb 25, 2025
@rolfbjarne
Copy link
Member

I can reproduce this after updating the iOS 18.2 simulator, it seems our logic to find a simulator to use doesn't handle the scenario when a particular iOS SDK version doesn't contain a simulator for that same SDK version (i.e. the iOS 18.2 SDK doesn't contain an iOS 18.2 simulator).

The workaround is as @drasticactions, manually select a simulator by passing -p:_DeviceName=... to the dotnet run command.

@rolfbjarne rolfbjarne added this to the Future milestone Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug If an issue is a bug or a pull request a bug fix mlaunch
Projects
None yet
Development

No branches or pull requests

4 participants