xamarin-branch-deep-linking-attribution
xamarin-branch-deep-linking-attribution copied to clipboard
Callbacks to IBranchLinkShareInterface are never called
After running GetShortURL(), the ReceivedUrl callback method is successfully called (part of IBranchUrlInterface):
Branch.GetInstance().GetShortURL(this, _branchObj, _linkProperties);
When I call ShareLink() in the ReceivedUrl callback, none of the IBranchLinkShareInterface methods are called to let me know what the user did.
Branch.GetInstance().ShareLink(this, _branchObj, _linkProperties, "[My message text]");
If you go to the Branch-Xamarin-SDK.iOS project, and look at BranchIOS.cs, there is this code:
public override void ShareLink (IBranchLinkShareInterface callback,
BranchUniversalObject universalObject,
BranchLinkProperties linkProperties,
string message)
{
IOSNativeBranch.BranchUniversalObject buo = BranchIOSUtils.ToNativeUniversalObject (universalObject);
IOSNativeBranch.BranchLinkProperties blp = BranchIOSUtils.ToNativeLinkProperties (linkProperties);
UIKit.UIWindow window = UIKit.UIApplication.SharedApplication.KeyWindow;
buo.ShowShareSheetWithLinkProperties (blp, message, window.RootViewController, delegate(string url, bool isShared) { });
}
Nothing is being done when buo.ShowShareSheetWithLinkProperties is complete (you can see there is just an empty delegate. An IBranchLinkShareInterface object is passed to this method, so I wonder if it should be used in the completion delegate?