Reputation: 23
We are currently switching from the static version of BlackBerry Dynamics SDK for Xamarin iOS to the new dynamic version. As far as I understand now GoodDynamics.iOS.dll does not contain all the resources anymore, but instead references the contents of the folder "GoodDynamics.iOS.resources" which has to be in the same folder as the dll. The problem is that the native linking fails when trying to build Xamarin iOS apps using that new library on Visual Studio for Windows (paired to a Mac build agent).
Here's what I did:
Result: Using Visual Studio on Mac OS it builds fine. But when I try to build it from Windows with Visual Studio paired to a Mac build agent I get the following messages/error in the build output:
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(235,3): warning MT1302: Could not extract the native library 'libGD_CPPWrapper.a' from '/Users/{UserName}/Library/Caches/Xamarin/mtbs/builds/GreetingsClient/dafdd80e9da4129fe5916d9283ff66211b655dba54eca9615ebdc599e5fa50eb/obj/iPhone/Debug/mtouch-cache/libGD_CPPWrapper.a'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(235,3): error : no such file or directory: '/Users/{UserName}/Library/Caches/Xamarin/mtbs/builds/GreetingsClient/dafdd80e9da4129fe5916d9283ff66211b655dba54eca9615ebdc599e5fa50eb/obj/iPhone/Debug/mtouch-cache/libGD_CPPWrapper.a'
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(235,3): error : clang: error: no such file or directory: '/Users/{UserName}/Library/Caches/Xamarin/mtbs/builds/GreetingsClient/dafdd80e9da4129fe5916d9283ff66211b655dba54eca9615ebdc599e5fa50eb/obj/iPhone/Debug/mtouch-cache/libGD_CPPWrapper.a'
Note: I exchanged the real user name by {UserName} in the above log lines.
So it seems it cannot find the contents of that GoodDynamics.iOS.resources folder where the 'libGD_CPPWrapper.a' and the xcframework folders are located. These don't even seem to get copied to the build Mac. Any ideas how I should adjust the build process so it can be built from Windows too?
Upvotes: 1
Views: 53