-
Notifications
You must be signed in to change notification settings - Fork 14
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
.NET 9, Preview 6 Doesn't run on real iOS device #1282
Comments
It's also worth mentioning that none of the entry points can be debugged, or any console output visible before the app closes. e.g. CreateMauiApp(), FinishedLaunching(). |
We have been using maui.configuration.experimental.useVSDbg set to false since .NET 9. We have tried re-enabling it too and has no effect on execution. |
+1 - I have the same issue. I did try overwriting the NuGet versions of MAUI & Debug, but it made no difference.
Like @richaplinvs says, the only way to get the sample project working is to change the global, such that Example...
|
Here's the full project that doesn't run on dotnet9 preview 5 or preview 6. Note change the application ID to one that your provisioning profile supports (in
Note it works in ✅ Mac Catalyst (desktop) and to the Simply changing to preview 4 will enable the sample project to deploy and run to the physical device. |
@rolfbjarne have you seen this before? |
Is there anything further we can provide to help diagnose this? Given we could get it with a File > New project on a physical device I would have hoped others have been able to experience it to, though the zip file previously provided should re-create the issue? Can someone confirm they can re-create? |
I think this is fixed in .NET 9 Preview 7 by dotnet/runtime#105813 |
Thanks for this. I tried the workaround of explicitly declaring the SwiftError and the project runs fine! I'm just really confused why this isn't seen as a higher priority issue. I can't be the only unlucky person to not being using the SwitError type? Or is this simply a case of me raising the issue on the wrong repo? i.e. vscode-dotnettools vs runtime |
@richaplinvs Yes, as this is a runtime issue there is nothing we can do from the tooling and it sometimes takes longer to root to where it is coming from. The good news is it is already fixed and will be part of Preview 7. |
Describe the Issue
Upgraded from .NET 9, Preview 4 (9.0.100-preview.4.24267.66) to .NET 9, Preview 6 (9.0.100-preview.6.24328.19) prevents app from running on a real iOS device. The app shows the splash screen and then closes but is still visible in the App Switcher.
Note - we had upgraded to Preview 5 but there was an issue with DataTemplates that was too significant to workaround. It also ran ok.
I can create a new app and have the same issue. e.g. dotnet new maui -n MyMauiApp. I used a global.json file set to 9.0.100-preview.6.24328.19 to create the test app.
MyMauiApp runs ok on 9.0.100-preview.4.24267.66 but not on 9.0.100-preview.6.24328.19.
Steps To Reproduce
dotnet new maui -n MyMauiApp
global.json file set to 9.0.100-preview.6.24328.19
Apple silicon macs running macOS Sonoma 14.5 (23F79)
Run on a real iOS device via Visual Studio Code
Expected Behavior
I'd expect the app to run up past the splash screen and show the HomePage. The Preview 6 shows the splash screen before closing. There's no Apple crash report and the app is still available in the App Switcher. However selecting the app from the App Switcher just causes the splash screen to be visible for a short while and then the app disappears; and can once again be found in the App Switcher.
Runs find on iOS sim, Android real and sim devices.
Environment Information
Apple silicon macs running macOS Sonoma 14.5 (23F79)
VSCode
Version: 1.91.1
Commit: f1e16e1e6214d7c44d078b1f0607b2388f29d729
Date: 2024-07-09T22:07:46.768Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.5.0
.NET MAUI plugin v1.2.3 or v1.1.16 (both give the same result)
C# DevKit v1.9.2 or v1.8.14 (both give the same result)
| VS Bug 2173312
The text was updated successfully, but these errors were encountered: