Forum Xamarin.iOS

What do I have to do to use a native reference from a Nuget package?

JimBordenJimBorden USMember ✭✭

I am pretty sure this used to work but I haven't tried in quite a while. Everything works well on simulator (probably because no AOT is done) but when compiling for a device I get an mtouch error because of "framework not found" on the Framework I am trying to reference.

I see here at the MTouch task that it is passing the full path:

--framework=/Users/borrrden/.nuget/packages/ in the middle. But then later I see this:

/Applications/ -framework Foundation -framework UIKit -weak_framework LiteCore -weak_framework CFNetwork -Xlinker -rpath -Xlinker @executable_path /Users/borrrden/Development/couchbase-lite-net-ee/couchbase-lite-net/src/Couchbase.Lite.Tests.iOS/obj/iPhone/Debug/device-builds/iphone8.2-11.0/mtouch-cache/arm64/Couchbase.Lite.Support.iOS.dll.o /Library/Frameworks/Xamarin.iOS.framework/Versions/ /Library/Frameworks/Xamarin.iOS.framework/Versions/ -lz -liconv -gdwarf-2 -std=c99 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/ -isysroot /Applications/ -Qunused-arguments -miphoneos-version-min=10.0 -arch arm64 -shared -read_only_relocs suppress -install_name @rpath/libCouchbase.Lite.Support.iOS.dll.dylib -fapplication-extension -o /Users/borrrden/Development/couchbase-lite-net-ee/couchbase-lite-net/src/Couchbase.Lite.Tests.iOS/obj/iPhone/Debug/device-builds/iphone8.2-11.0/mtouch-cache/arm64/libCouchbase.Lite.Support.iOS.dll.dylib -DDEBUG

ld: framework not found LiteCore
clang : error : linker command failed with exit code 1 (use -v to see invocation)

Even adding the native reference directly to the app does not help. This is an absolute showstopper for our Nuget package if it cannot be worked around. I've tried with the latest version (11.14), the previous (11.10) and the version shown here (11.8) all with the same results.

Full build log here ->


Sign In or Register to comment.