Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Fixed rare "No such proxy method" error for native callback functions
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirkula committed Mar 9, 2024
1 parent 70c1cc8 commit 99559c8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Plugins/NativeShare/Android/NSShareResultCallbackAndroid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public NSShareResultCallbackAndroid( NativeShare.ShareResultCallback callback )
callbackHelper.callback = callback;
}

[UnityEngine.Scripting.Preserve]
public void OnShareCompleted( int result, string shareTarget )
{
if( !callbackHelper )
Expand All @@ -24,6 +25,7 @@ public void OnShareCompleted( int result, string shareTarget )
callbackHelper.OnShareCompleted( result, shareTarget );
}

[UnityEngine.Scripting.Preserve]
public bool HasManagedCallback()
{
return callbackHelper && callbackHelper.callback != null;
Expand Down
2 changes: 1 addition & 1 deletion Plugins/NativeShare/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Native Share for Android & iOS (v1.5.1) =
= Native Share for Android & iOS (v1.5.3) =

Documentation: https://github.com/yasirkula/UnityNativeShare
FAQ: https://github.com/yasirkula/UnityNativeShare#faq
Expand Down
1 change: 1 addition & 0 deletions Plugins/NativeShare/iOS/NSShareResultCallbackiOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public static void Initialize( NativeShare.ShareResultCallback callback )
instance.callback = callback;
}

[UnityEngine.Scripting.Preserve]
public void OnShareCompleted( string message )
{
NativeShare.ShareResultCallback _callback = callback;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.yasirkula.nativeshare",
"displayName": "Native Share",
"version": "1.5.1",
"version": "1.5.3",
"documentationUrl": "https://github.com/yasirkula/UnityNativeShare",
"changelogUrl": "https://github.com/yasirkula/UnityNativeShare/releases",
"licensesUrl": "https://github.com/yasirkula/UnityNativeShare/blob/master/LICENSE.txt",
Expand Down

0 comments on commit 99559c8

Please sign in to comment.