Skip to content

Commit

Permalink
Merge pull request #19 from RodrigoSMarques/enhancement
Browse files Browse the repository at this point in the history
Enhancement / Fix
  • Loading branch information
RodrigoSMarques authored Mar 18, 2020
2 parents f185131 + eb847a1 commit 990e21e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 [email protected]

2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions ios/Classes/SwiftFlutterBranchSdkPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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]))")
Expand All @@ -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]) {
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 990e21e

Please sign in to comment.