Show a warning if ObjCBindingLibrary is used, recommend NativeReference instead
- Dominant language
- C#
- Stars
- 2.9k
- Forks
- 576
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
_From @AlphaNERD- on Thu, 21 Mar 2024 11:39:41 GMT_
Hello .NET MAUI devs,
like many other devs i am migrating to .NET 8. I am working with a few native SDKs for Android and iOS respectively and i ran into a few binding problems which are close to be fixed.
During my ordeal i made what turned out to be a mistake and tried to bind every SDK using `ObjCBindingNativeLibrary`, thus introducing a build error involving clang++. I tried to bind some SDKs using `ObjCBindingNativeLibrary` and others using `NativeReference` and while i could push the build errors aside, i could not actually use the SDK i bound using `ObjCBindingNativeLibrary` during runtime.
Now i've bound every SDK again using `NativeReference` and while i'm still dealing with build errors (duplicate symbols, a potential regression in my specific case compared to Xamarin.iOS) i would like to know the following:
**What is the difference between `NativeReference` and `ObjCBindingNativeLibrary`**
If i had to guess it's that `ObjCBindingNativeLibrary` is some internal thing. I've seen a few people use in the Github Issues but none of the devs have actively discouraged the use of it AFAIK. I do know however that `NativeReference` works better with the SDKs and that Microsoft asks devs to use that to reference SDKs in .NET 8.
_Copied from original issue dotnet/maui#21352_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.