hyperledger-archives / aries-mobile-agent-xamarin

Apache License 2.0
39 stars 31 forks source link

Release Xamarin app for iOS #47

Closed sahil-khanna closed 2 years ago

sahil-khanna commented 2 years ago

Can anyone suggest what build settings should I use to generate an iOS app for the Hyperledger Aries Xamarin project? I am able to run the app on a simulator, but get errors while release-build for a device.

Error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -L../libs/ios -lcrypto -L../libs/ios -lindy -L../libs/ios -lsodium -L../libs/ios -lssl -L../libs/ios -lzmq (MT5201) (SSI.iOS)
horationunez commented 2 years ago

@sahil-khanna what tool are you using to build the project? VSCode, JetBrain Rider, etc?

Also, can you share the build logs?

sahil-khanna commented 2 years ago

@horationunez, I'm using Visual Studio for Mac (v8.10.8) to build the Xamarin Forms project for iOS. Below are the build logs

error MT5209 : Native linking error : undef: _crypto_pwhash_scryptsalsa208sha256_str_verify
error MT5209 : Native linking error : undef: _crypto_pwhash_scryptsalsa208sha256_str
error MT5209 : Native linking error : undef: _crypto_pwhash_scryptsalsa208sha256
MTOUCH : error MT5210: Native linking failed, undefined symbol: _crypto_pwhash_scryptsalsa208sha256_str_verify. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _crypto_pwhash_scryptsalsa208sha256_str. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _crypto_pwhash_scryptsalsa208sha256. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -L../libs/ios -lcrypto -L../libs/ios -lindy -L../libs/ios -lsodium -L../libs/ios -lssl -L../libs/ios -lzmq
clang : error : linker command failed with exit code 1 (use -v to see invocation)
horationunez commented 2 years ago

This might shed some light: https://github.com/xamarin/xamarin-macios/issues/10884#issuecomment-803450479

I will double check if you are adding libsodium correctly.

horationunez commented 2 years ago

@sahil-khanna were you able to solve this?

sahil-khanna commented 2 years ago

@horationunez, This is fixed by changing the following in the iOS Build settings in Visual Studio

horationunez commented 2 years ago

@sahil-khanna I will test it and add it to the documentation. Thanks for confirming it what fixed your build.

Will you have time in the near future to connect and see how are you using the framework? I'm preparing the migration for Maui and will love to learn what can make your life easier.

sahil-khanna commented 2 years ago

@sahil-khanna I will test it and add it to the documentation. Thanks for confirming it what fixed your build.

Will you have time in the near future to connect and see how are you using the framework? I'm preparing the migration for Maui and will love to learn what can make your life easier.

Sure, @horationunez