-
Notifications
You must be signed in to change notification settings - Fork 549
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
[Maui] SkiaSharp OnPaintSurface not called on iOS device connected to Windows dev computer #2001
Comments
What version of Visual Studio are you using? |
Microsoft Visual Studio Community 2022 (64-bit) - Preview |
I have the same issue. I am using VS for Mac 17.3 Preview. It works fine for Android and it correctly fires OnPaintSurface on InvalidateSurface, but on iOS, it is not calling OnPaintSurface. |
Strangely, it works from my M1 Mac. I have the issue with Intel Mac. May be this is an Intel x86 architecture thing. |
It's not getting invoked on any of the platforms (tried iOS, Android, and Windows) with both the recent stable (2.88.0) and preview (2.88.1-preview.63) release versions. Tried with both XAML and C# definitions, there is no change in the result. Working with .NET MAUI GA and VS2022 for Windows ver. 17.3.0 Preview 1.1 |
I am also seeing this issue with 2.88.3, built with .NET MAUI 7 and Rider 2022.3.1. I can only test on Windows and Android, but |
It looks like this issue may be caused by placing the |
Had same issue now (VS 2022 17.6.3 and SkiaSharp 2.88.3)
|
I have placed under a ContentView.... |
Any solution for this have the same problem on 8 rc1 and Mac m1 and on release off app to App Store. //Joacim |
Same issue in MAUI .NET 8 rc 2 on Windows and Android also with StackLayout. |
For me on Android it doesn't work when it is inside a grid and I set HorizontalOptions="center". Without it it works. |
I solved all my problems on Android where OnPaintSurface wasn't called. Haven't tried iOS yet. It is like returning back 8 years when Xamarin was a chaos and such kind of hacks were needed for everything. |
I had the same problem. I called InvalidateSurface intermittently with System.Timer and on IOS it doesn't call OnPaintSurface. MainThread.BeginInvokeOnMainThread(InvalidateSurface) solves this problem. |
I'm facing the same issue, solely for iOS as well, and none of the workarounds here work. Android works perfectly fine. Edit: Removing VerticalOptions and HorizontalOptions in the XAML of my SKCanvasView worked, my bad. |
Can confirm that this workaround worked for me on Android & iOS with .NET8 MAUI 8.0.100 |
Description
InvalidateSurface does not trigger OnPaintSurface, when the app is deployed to an iOS device, directly connected to the Windows dev computer.
The problem does not occur, when the app is deployed to a remotely connected device via Mac build-host.
Maybe this info saves some time for someone.
Reference: Maui Issue dotnet/maui#6120
The text was updated successfully, but these errors were encountered: