FreakyAli / Maui.FreakyControls

FreakyControls is a free OSS UI Kit for .NET MAUI which provides a set of controls and utilities to build modern mobile apps.
MIT License
316 stars 38 forks source link

iOS simulator build fails #134

Closed breyed closed 5 months ago

breyed commented 5 months ago

Description

When the FeakyControls NuGet package is added to a project and built for the iOS simulator, the build fails with:

ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/[user]/.nuget/packages/skiasharp.nativeassets.ios/2.88.0/runtimes/ios/native/libSkiaSharp.framework/libSkiaSharp' for architecture arm64

Code

Just add the package and build of iOS simulator:

<PackageReference Include="FreakyControls" Version="0.4.12" />

Basic Information

breyed commented 5 months ago

This issue is related to mono/SkiaSharp#2307 and can be worked around by adding the latest SkiaSharp to your project.

<PackageReference Include="SkiaSharp" Version="2.88.8" />
FreakyAli commented 5 months ago

@breyed Should this be closed based on the face that the issue is related to SkiaSharp

breyed commented 5 months ago

@FreakyAli I don’t think so. The use of SkiaSharp is an implementation detail. From the perspective of a user of FreakyControls, once you add the FreakyControls package, suddenly your app no longer works on the simulator.

It’s possible the issue can be fixed by just updating Maui.FreakyControls.csproj so that the PackageReference to SkiaSharp.Views.Maui.Controls is for version 2.88.8. It would be best to update any other outdated NuGet packages at the same time.

FreakyAli commented 5 months ago

@breyed I understand your perspective on this but the problem with that is the user is forced to update Maui related packages because of this, and if they are facing a bug in their software because of a specific version they won't be able to downgrade it because of the requirements of our package which is another problem imho, what do you think about this!

breyed commented 5 months ago

@FreakyAli Good point. A good balance point between stability and up-to-dateness would be to use the minimum secure and working (across all targets) version of dependencies. For SkiaSharp, that appears to be 2.88.8.

FreakyAli commented 5 months ago

Well it used to 2.8.3 and things worked fine but one of my friends who was using 2.8.2 was not able to use the controls anymore because of which I downgraded the minimum requirement down to 2.8.0 in any case I'll find an optimum solution find a way that fixes the issue for maximum people using our controls, thanks for all the input appreciate it!

breyed commented 5 months ago

You can specify a version range on the relevant PackageReferences.

FreakyAli commented 5 months ago

@breyed that's interesting I'll check it out next weekend and see if I can make a release!

In the meantime I hope you were able to make things work!