Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use this library? #76

Open
rekire opened this issue Nov 5, 2023 · 5 comments
Open

How to use this library? #76

rekire opened this issue Nov 5, 2023 · 5 comments

Comments

@rekire
Copy link

rekire commented Nov 5, 2023

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.

@Tougee
Copy link
Member

Tougee commented Nov 6, 2023

Here we have a better example to show how to use this lib that you can try.
#62

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

@rekire
Copy link
Author

rekire commented Nov 6, 2023

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
Copy link
Author

rekire commented Nov 6, 2023

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

@Tougee
Copy link
Member

Tougee commented Nov 7, 2023

A new branch example has been added.

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

@boyan01
Copy link
Collaborator

boyan01 commented Nov 7, 2023

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

The same as MixinNetwork/flutter-plugins#185 Upgrade visual studio version to latest would solve this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants