Branch.initSession not returning data in Ionic v1 on iOS

家住魔仙堡 提交于 2019-12-11 13:37:18

问题


I have installed and configured branch as documented. Everything works fine on Android, but I am not able to make it work on iOS.

Here is what I followed.

Ionic v1 project

  1. Created Branch account and configured everything.
  2. Configured keys, domains etc in config.xml file.
  3. Calling branchInit() on deviceready and resume event.

function branchInit() {
  // Branch initialization
  if (Branch) {
    Branch.initSession(function(data) {
      alert("Branch Data", JSON.stringify(data));
      if (data['+clicked_branch_link']) {
        alert("Yes");
      } else {
        alert("No");
      }
    });
  }
}

I have created a link on branch similar to this.

https://abc.app.link/myurl

Click on the link from notes app.

On Android this seems to work fine. Data is returned and I am getting the Yes alert and I can log the data.

On iOS the data is not being returned. The control is not even entering the Branch.initSession method, and I don't see any alerts.

Any helps will be appreciated.

来源:https://stackoverflow.com/questions/49484904/branch-initsession-not-returning-data-in-ionic-v1-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!