unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.94k stars 724 forks source link

Some files don't get generated with `UWPSyncGenerator` #8490

Closed Youssef1313 closed 1 year ago

Youssef1313 commented 2 years ago

Current behavior

BatteryReport (for example) doesn't get updated when UWPSyncGenerator is run.

Expected behavior

It gets updated.

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

No response

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

workgroupengineering commented 2 years ago

Hi @Youssef1313,
I don't know if it's the same problem. I had a similar problem with the following code:

https://github.com/unoplatform/uno/blob/e7bbb750a0f7009dbe77e88d376928cf103e0070/src/Uno.UWP/Graphics/Imaging/BitmapEncoder.ios.cs#L16-L21

To resol issue i changed code like this:

        private static readonly Dictionary<Guid, Func<UIImage, NSData>> _encoderMap =
            new()
            {
                {JpegEncoderId, AsJPEG},
                {PngEncoderId, AsPNG},
            };
        private static NSData AsPNG(UIImage image) => image.AsPNG();
        private static NSData AsJPEG(UIImage image) => image.AsJPEG(1);
MartinZikmund commented 1 year ago

@Youssef1313 is this still relevant?

Youssef1313 commented 1 year ago

I just tested and it's no longer an issue.