Skip to content

Callbacks to IBranchLinkShareInterface are never called #138

@yonkahlon

Description

@yonkahlon

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions