Tag: branch.io

当分支链接被点击并打开我的应用程序时,如何访问元数据…?

这是我如何准备和分享给用户的分支链接: let branch = BranchUniversalObject(canonicalIdentifier: UUID().uuidString) branch.title = self.territory.name branch.metadata = self.territory.dictionary let properties = BranchLinkProperties() properties.controlParams = self.territory.dictionary branch.getShortUrl(with: properties) { string, error in if let string = string, let url = URL(string: string) { let controller = UIActivityViewController.controller(activityItem: url, from: sender, traitCollection: self.traitCollection) alert.dismiss(animated: true) self.present(controller, animated: true) } } 然后,我想访问我传递给该链接的参数,但我不知道如何…任何帮助?

只有在用户login后才能redirectBranch.io

点击邀请链接后,我正在使用分支将用户redirect到我的应用程序的特定视图。 它的工作原理除了我需要他们只在他们login后redirect,而不是像现在这样。 从我可以告诉没有方法在我的初始视图控制器被调用后点击一个分支链接,所有的设置必须在AppDelegate上完成。 以下是我的AppDelegate中的一些相关代码: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { Branch.getInstance().initSession(launchOptions: launchOptions, andRegisterDeepLinkHandler: { params, error in guard error == nil else { return } guard let userDidClick = params["+clicked_branch_link"] as? Bool else { return } if userDidClick { let branch = Branch.getInstance() branch?.initSession(launchOptions: launchOptions, andRegisterDeepLinkHandler: { params, error in […]

Swift'无法build立Obj-C模块'BranchInvite'

我一直在遵循实施这个SDK的说明: https : //github.com/BranchMetrics/Branch-iOS-Invite-SDK …下面是我在我的Podfile: platform :ios, '8.0' use_frameworks! target 'My-App' do pod 'BranchInvite' end 这是我得到的错误… 我已经做了很多的疑难解答,试图找出问题,看看这种reporsitory这种types的过去的问题,由于某种原因,我不能得到“BranchWelcomeViewController”(也不BranchInvite)被识别/导入。 任何想法我在这里做错了吗? 我需要填充我的桥接头? PS:我正在使用Xcode 7,Swift 2,OS X 10.10.5和最新版本的Cocoapods。 谢谢

不能在swift中转换AnyHashable 3

我有下面的方法,写在迅速(之前swift 3)。 下面是方法 func application(application: UIApplication, didReceiveRemoteNotification launchOptions: [AnyHashable: Any]) -> Void { Branch.getInstance().handlePushNotification(launchOptions) } 它给出了Use of undeclared type AnyHashable错误。 我怎么能把这个转化为迅速3.我试着跟着。 func application(application: UIApplication, didReceiveRemoteNotification launchOptions: [NSObject : AnyObject]) -> Void { Branch.getInstance().handlePushNotification(launchOptions) } 它消除了错误,但不知道它的行为是一样的。 希望你的帮助。 thanx提前。

在支持通用链接的两个不同应用上支持相同的域。

我有一个支持通用链接的应用程序,它目前在应用程序商店。 说它支持域www.example.com,因此通用链接可以很容易地通过这个打开。 我们将在相关的域名中提供applinks:www.example.com。 现在说,如果我想发布另一个应用程序,它也支持相同的域名。 现在iOS将如何区分通过通用链接打开哪个应用程序..?

分支深层链接不打开应用程序

我一直在尝试(不成功)使用Branch来实现深入链接到我们的iOS应用程序。 分支URL直接redirect到App Store,永远不会尝试打开应用程序。 我肯定错过了什么。 我做了什么: 包括分支SDK(CocoaPods)向应用程序plist添加了branch_key 在应用程序中添加了URLscheme到URLtypes 在开发人员控制台中启用项目和应用程序ID中的Associated Domains 。 确保权利文件包含在构build中。 在AppDelegate中注册深层链接处理程序 仪表板:设置 – >链接设置: 选中“始终尝试打开应用程序” “IOS URI Scheme”被设置为应用程序的自定义URIscheme。 选中“启用通用链接”。 捆绑标识符和Apple App Prefix都设置正确。 在分支仪表板的“营销”选项卡下,我创build了一个链接。 我通过电子邮件将这个链接发送给我自己,并在设备上打开它(Mail.app)。 Safari打开,然后打开App Store,就好像应用程序没有安装。 无论是application:openURL:sourceApplication:annotation或application:continueUserActivity:restorationHandler被调用。 AppDelegate方法: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let branch: Branch = Branch.getInstance() branch.initSessionWithLaunchOptions(launchOptions, andRegisterDeepLinkHandler: { params, error in if (error == nil) { […]