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

Branch IO Deep Linking works only after I clear the Safari history and cache data on iOS #186

Open
johnnypi6 opened this issue May 6, 2020 · 7 comments

Comments

@johnnypi6
Copy link

johnnypi6 commented May 6, 2020

I'm trying to add a sharing feature to my existing app using Unity Branch SDK. I retrieve custom data from initSession function of Branch SDK (Unity).

void Start()
{
    Branch.initSession(CallbackWithBranchUniversalObject);
}

void CallbackWithBranchUniversalObject(BranchUniversalObject buo,
                                    BranchLinkProperties linkProps,
                                    string error)
{
    string senderDeviceID = linkProps.controlParams["$deviceID"];
}

But initSession function seems to work a few times but it returns empty BranchUniversalObject JSON and BranchLinkProperties JSON after that. After a few days of struggling, I found that Safari history and cache data causes the issue. When I clear the Safari history and cache data, initSession function works again as I expected and I can retrieve custom data from Branch deep link.

How do Safari history and cache data affect the Branch deep link? What should I do to fix the problem of empty BranchUniversalObject JSON and BranchLinkProperties JSON?

@echo-branch
Copy link
Contributor

Logging a ticket to see if we can repro the issue you're seeing. Could you provide what version of the SDK you're using along with some information about the device you're seeing this on? Also are you seeing the same issue on all test devices?

@johnnypi6
Copy link
Author

Thank you for your kind reply.

Branch Unity SDK
version: 0.6.5

Test Devices

Device Name: iPad Air2
iOS version: 13.4.1

I used the following code to generate a deep link.

public static void GenerateShortURL(BranchManagerCallbackWithShortUrl callback = null)
{
    BranchUniversalObject universalObject = new BranchUniversalObject();
    BranchLinkProperties linkProperties = new BranchLinkProperties();
    string deviceUniqueIdentifier = SystemInfo.deviceUniqueIdentifier;
    
    universalObject.canonicalIdentifier = "xLeagueShareLink";
    universalObject.canonicalUrl = "http://xleague.games/";
    universalObject.title = MetaDataManager.Title;
    universalObject.contentDescription = MetaDataManager.Description;
    universalObject.imageUrl = MetaDataManager.Image;
    universalObject.contentIndexMode = 0;
    universalObject.localIndexMode = 0;

    Branch.registerView(universalObject);

    linkProperties.feature = "sharing";
    linkProperties.controlParams.Add("$desktop_url", "http://xleague.games/xleague-solitaire-share/");
    linkProperties.controlParams.Add("$android_url", "http://xleague.games/android");
    linkProperties.controlParams.Add("$ios_url", "https://apps.apple.com/us/app/xleague-solitaire/id1480117114");
    linkProperties.controlParams.Add("$ipad_url", "https://apps.apple.com/us/app/xleague-solitaire/id1480117114");
    linkProperties.controlParams.Add("$og_title", MetaDataManager.Title);
    linkProperties.controlParams.Add("$og_description", MetaDataManager.Description);
    linkProperties.controlParams.Add("$og_image_url", MetaDataManager.Image);
    linkProperties.controlParams.Add("$deviceID", deviceUniqueIdentifier);

    Debug.Log("Starting get short URL...");

    Branch.getShortURL(universalObject, linkProperties, (param, error) =>
    {
        callback(param, error);
    });
}

Would you please help me?

@echo-branch
Copy link
Contributor

Thanks for the information! I'm hoping to devote the next sprint to working through github issues.

@johnnypi6
Copy link
Author

Please let me know if you need any other information to resolve this issue.

@psilvestre-dev
Copy link

Hi, I'm facing the same issue... do we know if the fix is prioritized to be in the roadmap? Thanks!

@hateshkumar
Copy link

Hi, does anyone has found any kinda of solution for this? I am still facing an issues

1 similar comment
@Kanaktechtree
Copy link

Hi, does anyone has found any kinda of solution for this? I am still facing an issues

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

5 participants