videokit-ai / natshare

Cross-platform social sharing for Unity Engine.
https://github.com/natmlx/videokit
Apache License 2.0
134 stars 28 forks source link

Link sharing is unavailable #45

Closed JokerDen closed 5 years ago

JokerDen commented 5 years ago

When I'm trying to share link to the game, share dialog is not shown up. But with plain text it works fine.

olokobayusuf commented 5 years ago

What platform does this happen on? It might be expected behaviour.

JokerDen commented 5 years ago

Sorry, forgot to say that my case is for iOS. Also notice that other plugin https://assetstore.unity.com/packages/tools/integration/native-share-for-android-ios-112731 has no problem to share link as text.

olokobayusuf commented 5 years ago

You can probably workaround this by adding a space before the link and sharing that string (trick iOS into thinking the text is not a link). Did you actually test this other plugin? Because the code is the exact same.

JokerDen commented 5 years ago

If I'm adding plain text before link, share not working too; only if remove link totally. It's strange because other plugin that you are linking works fine.

olokobayusuf commented 5 years ago

It might be related to this: https://github.com/olokobayusuf/NatShare-API/blob/47c19f9f2f3a0e37d7a4faf3caecf94dd8dbed9b/Assets/NatShare/Plugins/Managed/NatShareiOS.cs#L29-L32

On iOS specifically, you can hack your way through by sharing the link as plain text:

#if UNITY_IOS
NatShareU.Platforms.NatShareBridge.ShareText(link);
#endif
olokobayusuf commented 5 years ago

Closing due to inactivity.