libsignal_protocol_dart icon indicating copy to clipboard operation
libsignal_protocol_dart copied to clipboard

How to use this library?

Open rekire opened this issue 1 year ago • 5 comments

I'm interested in building a Flutter chat app using the signal protocol. However I'm not really sure how to use this library.

Of cause I checked the example, but that one is more or less just a unit test out of my view. I'm looking for information which generated keys I need to store so that I can decrypt them when I restart my app. Which and how do I exchange the keys?

I also tried to check the "real" sample app, but I cannot compile it. At first I get dart compile errors and then (after simply removing the broken code) native errors. Great! I installed therefore the Windows App which requires a sign in from your Android app. Then on my mobile I have to register... I do not want to share my mobile number with you just to check your app. Even the strings from the onboarding are not in the code base. This is so strange.

rekire avatar Nov 05 '23 20:11 rekire

Here we have a better example to show how to use this lib that you can try. https://github.com/MixinNetwork/libsignal_protocol_dart/pull/62

And could you please share compilation error message, maybe we can help with this.

Tougee avatar Nov 06 '23 01:11 Tougee

I got this compile error here (the encoding errors are already in my console):

Nuget.exe not found, trying to download or use cached version.
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_GetRestrictedErrorInfo" in Funktion ""public: __cdecl winrt::hresult_error::hresult_error(struct winrt::hresult,struct winrt::take_ownership_from_abi_t)" (??0hresult_error@winrt@@QEAA@Uhresult@1@Utake_ownership_from_abi_t@1@@Z)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
DesktopNotificationManagerCompat.obj : error LNK2001: Nicht aufgel�stes externes Symbol "WINRT_GetRestrictedErrorInfo". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_RoGetActivationFactory" in Funktion ""struct winrt::Windows::Foundation::IActivationFactory __cdecl winrt::get_activation_factory<struct winrt::Windows::Foundation::IActivationFactory>(struct winrt::param::hstring const &)" (??$get_activation_factory@UIActivationFactory@Foundation@Windows@winrt@@@winrt@@YA?AUIActivationFactory@Foundation@Windows@0@AEBUhstring@param@0@@Z)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
DesktopNotificationManagerCompat.obj : error LNK2001: Nicht aufgel�stes externes Symbol "WINRT_RoGetActivationFactory". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_RoOriginateLanguageException" in Funktion ""private: void __cdecl winrt::hresult_error::originate(struct winrt::hresult,void *)" (?originate@hresult_error@winrt@@AEAAXUhresult@2@PEAX@Z)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
DesktopNotificationManagerCompat.obj : error LNK2001: Nicht aufgel�stes externes Symbol "WINRT_RoOriginateLanguageException". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_SetRestrictedErrorInfo" in Funktion ""public: struct winrt::hresult __cdecl winrt::hresult_error::to_abi(void)const " (?to_abi@hresult_error@winrt@@QEBA?AUhresult@2@XZ)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_WindowsCreateString" in Funktion ""void * __cdecl winrt::impl::create_string(wchar_t const *,unsigned int)" (?create_string@impl@winrt@@YAPEAXPEB_WI@Z)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
DesktopNotificationManagerCompat.obj : error LNK2001: Nicht aufgel�stes externes Symbol "WINRT_WindowsCreateString". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_WindowsCreateStringReference" in Funktion ""public: __cdecl winrt::param::hstring::hstring(class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (??0hstring@param@winrt@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
DesktopNotificationManagerCompat.obj : error LNK2001: Nicht aufgel�stes externes Symbol "WINRT_WindowsCreateStringReference". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_WindowsDeleteString" in Funktion ""public: static void __cdecl winrt::impl::hstring_traits::close(void *)" (?close@hstring_traits@impl@winrt@@SAXPEAX@Z)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
DesktopNotificationManagerCompat.obj : error LNK2001: Nicht aufgel�stes externes Symbol "WINRT_WindowsDeleteString". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_WindowsPreallocateStringBuffer" in Funktion ""public: __cdecl winrt::impl::hstring_builder::hstring_builder(unsigned int)" (??0hstring_builder@impl@winrt@@QEAA@I@Z)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_WindowsDeleteStringBuffer" in Funktion ""public: __cdecl winrt::impl::hstring_builder::~hstring_builder(void)" (??1hstring_builder@impl@winrt@@QEAA@XZ)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_WindowsPromoteStringBuffer" in Funktion ""public: struct winrt::hstring __cdecl winrt::impl::hstring_builder::to_hstring(void)" (?to_hstring@hstring_builder@impl@winrt@@QEAA?AUhstring@3@XZ)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
win_toast_plugin.obj : error LNK2019: Verweis auf nicht aufgel�stes externes Symbol "WINRT_WindowsGetStringRawBuffer" in Funktion ""public: wchar_t const * __cdecl winrt::hstring::begin(void)const " (?begin@hstring@winrt@@QEBAPEB_WXZ)". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
DesktopNotificationManagerCompat.obj : error LNK2001: Nicht aufgel�stes externes Symbol "WINRT_WindowsGetStringRawBuffer". [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\Debug\win_toast_plugin.dll : fatal error LNK1120: 11 nicht aufgel�ste Externe [C:\*censored*\mixin_network_chat\build\windows\plugins\win_toast\win_toast_plugin.vcxproj]
Exception: Build process failed.

This is most likely related to WINRT, I did not google yet how I can install it. Sorry for my laziness.

rekire avatar Nov 06 '23 21:11 rekire

I just noticed that the repo of the PR 62 was deleted. How can I checkout that PR? Was there not some kind of hidden branch?

EDIT Got it with:

git clone [email protected]:MixinNetwork/libsignal_protocol_dart.git
git fetch origin pull/62/head:example_app
git switch example_app

rekire avatar Nov 06 '23 21:11 rekire

A new branch example has been added.

@boyan01 can you help with flutter-app compilation error?

Tougee avatar Nov 07 '23 01:11 Tougee

This is most likely related to WINRT, I did not google yet how I can install it. Sorry for my laziness.

The same as https://github.com/MixinNetwork/flutter-plugins/issues/185 Upgrade visual studio version to latest would solve this error.

boyan01 avatar Nov 07 '23 02:11 boyan01