Show a warning if ObjCBindingLibrary is used, recommend NativeReference instead #20358
Labels
binding-projects
Issue or PR that affects binding projects
enhancement
The issue or pull request is an enhancement
Milestone
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 usingObjCBindingNativeLibrary
and others usingNativeReference
and while i could push the build errors aside, i could not actually use the SDK i bound usingObjCBindingNativeLibrary
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
andObjCBindingNativeLibrary
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 thatNativeReference
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
The text was updated successfully, but these errors were encountered: