From eb847a1903c89d75e8dd73fc0c7d2be234393147 Mon Sep 17 00:00:00 2001 From: Rodrigo de Souza Marques Date: Wed, 18 Mar 2020 01:42:19 -0300 Subject: [PATCH] Enhancement / Fix * Fix handled by Branch links * Improve attribution for Apple Search Ads * Documentation Update --- CHANGELOG.md | 4 ++++ README.md | 13 +++++++------ example/pubspec.lock | 2 +- ios/Classes/SwiftFlutterBranchSdkPlugin.swift | 12 +++++++----- pubspec.yaml | 2 +- 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d25ba3fe..97d8f790 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.0 +* Fix handled by Branch links +* Improve attribution for Apple Search Ads +* Documentation Update ## 0.2.0 * Add Referral System Rewarding Functionality ## 0.1.5 diff --git a/README.md b/README.md index 0beb8239..a2ac7999 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,19 @@ Implemented functions in plugin: ## Getting Started ### Configure Branch Dashboard * Register Your App -* Complete the Basic integration in https://dashboard.branch.io/login +* Complete the Basic integration in [Branch Dashboard](https://dashboard.branch.io/login) -For details see: https://docs.branch.io/apps/ios/#configure-branch and https://docs.branch.io/apps/android/#configure-branch, only session **Configure Branch** +For details see: +[https://help.branch.io/using-branch/docs/default-link-behavior]() ## Configure Platform Project ### Android Integration -Follow the steps on the page https://docs.branch.io/apps/android/#configure-app, session _**Configure app**_: +Follow the steps on the page [https://help.branch.io/developers-hub/docs/android-basic-integration#section-configure-app](), session _**Configure app**_: * Add Branch to your AndroidManifest.xml ### iOS Integration -Follow the steps on the page https://docs.branch.io/apps/ios/#configure-bundle-identifier, from session _**Configure bundle identifier**_: +Follow the steps on the page [https://docs.branch.io/apps/ios/#configure-bundle-identifier](), from session _**Configure bundle identifier**_: * Configure bundle identifier * Configure associated domains * Configure entitlements @@ -343,8 +344,8 @@ Practices to avoid: # Branch Documentation Read the iOS or Android documentation for all Branch object parameters -* Android - https://github.com/BranchMetrics/android-branch-deep-linking-attribution -* iOS - https://github.com/BranchMetrics/ios-branch-deep-linking-attribution +* Android - [https://help.branch.io/developers-hub/docs/android-advanced-features]() +* iOS - [https://help.branch.io/developers-hub/docs/ios-advanced-features]() # Author This project was authored by Rodrigo S. Marques. You can contact me at rodrigosmarques@gmail.com diff --git a/example/pubspec.lock b/example/pubspec.lock index fffbc48e..a070883c 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -75,7 +75,7 @@ packages: path: ".." relative: true source: path - version: "0.2.0" + version: "0.3.0" flutter_test: dependency: "direct dev" description: flutter diff --git a/ios/Classes/SwiftFlutterBranchSdkPlugin.swift b/ios/Classes/SwiftFlutterBranchSdkPlugin.swift index 2eb2930b..9ef60f58 100644 --- a/ios/Classes/SwiftFlutterBranchSdkPlugin.swift +++ b/ios/Classes/SwiftFlutterBranchSdkPlugin.swift @@ -32,6 +32,9 @@ public class SwiftFlutterBranchSdkPlugin: NSObject, FlutterPlugin, FlutterStream Branch.getInstance().setDebug() #endif + // This will usually add less than 1 second on first time startup. Up to 3.5 seconds if Apple Search Ads fails to respond. + Branch.getInstance().delayInitToCheckForSearchAds() + Branch.getInstance().initSession(launchOptions: launchOptions) { (params, error) in if error == nil { print("Branch InitSession params: \(String(describing: params as? [String: Any]))") @@ -56,13 +59,13 @@ public class SwiftFlutterBranchSdkPlugin: NSObject, FlutterPlugin, FlutterStream } public func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { - Branch.getInstance().application(app, open: url, options: options) - return true + let branchHandled = Branch.getInstance().application(app, open: url, options: options) + return branchHandled } public func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]) -> Void) -> Bool { - Branch.getInstance().continue(userActivity) - return true + let handledByBranch = Branch.getInstance().continue(userActivity) + return handledByBranch } public func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) { @@ -309,7 +312,6 @@ public class SwiftFlutterBranchSdkPlugin: NSObject, FlutterPlugin, FlutterStream response["success"] = NSNumber(value: true) response["credits"] = credits } else { - print(error) let err = (error as! NSError) response["success"] = NSNumber(value: false) response["errorCode"] = String(err.code) diff --git a/pubspec.yaml b/pubspec.yaml index dcb6e535..cad2ce6e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_branch_sdk description: Flutter Plugin for create deep link using Brach SDK (https://branch.io). This plugin provides a cross-platform (iOS, Android). -version: 0.2.0 +version: 0.3.0 homepage: https://github.com/RodrigoSMarques/flutter_branch_sdk dependencies: