It's a question and I find it's hard to fill that issue template...
I'm currently building a native package for MacCatalyst and iOS.
For .NET 6 desktop platform like Windows/macOS desktop, I know putting native library files in runtimes/{rid}/native just work. However, Xamarin.iOS docs tells me that I must use PackNativeLibrary item to add them, so I add a .target file to my packge and it works.
I also found that SkiaSharp.NativeAssets.MacCatalyst doesn't use PackNativeLibrary, it only put files in runtimes. After testing this works well for me too.
Now is what confusing me
Another package SkiaSharp.NativeAssets.iOS, doesn't like the one for catalyst, includes .targets files for net6.0-ios13.6 and xamarinios1.0. But it also works after removing these .targets files. (Tested on simulator. I don't have any real iOS device, so I don't know if the behavior is the same on a real phone.)
The question
By checking #11667, I believe just put these native files in runtimes/{rid}/native is enough, and no NativeReference is required. Is that correct?
I'm currently building a native package for MacCatalyst and iOS.
For .NET 6 desktop platform like Windows/macOS desktop, I know putting native library files in
runtimes/{rid}/nativejust work. However, Xamarin.iOS docs tells me that I must usePackNativeLibraryitem to add them, so I add a.targetfile to my packge and it works.I also found that SkiaSharp.NativeAssets.MacCatalyst doesn't use
PackNativeLibrary, it only put files inruntimes. After testing this works well for me too.Now is what confusing me
Another package SkiaSharp.NativeAssets.iOS, doesn't like the one for catalyst, includes
.targetsfiles fornet6.0-ios13.6andxamarinios1.0. But it also works after removing these.targetsfiles. (Tested on simulator. I don't have any real iOS device, so I don't know if the behavior is the same on a real phone.)The question
By checking #11667, I believe just put these native files in
runtimes/{rid}/nativeis enough, and noNativeReferenceis required. Is that correct?