Closed pneves001 closed 5 years ago
Interesting, Android or iOS, or both?
I haven't tried ios. So right now android. But I will let you know about IOS.
I can confirm I get the exact same result in both. Although to get the IOS version to compile I had to add the following line to the podfile:
use_frameworks!
I'm using a newer version of swift 3.2 so when I put the following line in it didn't compile: config.build_settings['SWIFT_VERSION'] = '3.2'
But the behavior is the same in both IOS and Android at this time.
I also tried using the .then function and even the .catchError and the result was the same. So its not even generating an error.
I have been looking into this issue a bit because it's a bit of a show stopper for me. I really need to get this package working. More specifically when comparing this package with the cordova-plugin-minisodium package for cordova. The two packages are similar. The cordova plugin has both the libsodium-jni project and the libsodium project as dependencies.
As far as I can tell. The flutter_sodium plugin is not installing libsodiumjni at all or the libsodium library. I can't find it anywhere in my build tree. Nor do I find it in my .pub-cache folder. As far as I can tell its not there. I think this might be the source of my problem. Although I've been trying to fix it manually however, I'm still quite new to flutter.
I'm not sure the libsodium dependency is required for Android. For iOS the binary is included. I'm running both Android and iOS, and both work fine.
Are you running in an emulator or an actual device? Have you tried running the example app that is included in GitHub?
Looking at your code snippet: you're doing an utf8.encode on a string in hex-format. You probably do want to do hex.decode (instead of utf8.encode). Also, make sure you pubkey consists of 32 bytes.
Thank you. I will try this. I am currently running it on an actual device with the latest version of Android.
Thank you this worked. I have it working now.
This is a bit of a strange issue. I'm not getting an error, or any kind of response from the function what so ever. It just does nothing. The following code is what I'm using to call the function. The execution just stops when the function is called although my flutter app continues to operate.
var encoder = new JsonEncoder();
The public key is returned from my server in hex format and worked in my ionic version of my app.