From 30c1c46956db1dd962c055e20c4d1c9be2ed40bc Mon Sep 17 00:00:00 2001 From: codinronan Date: Tue, 11 Feb 2020 23:22:19 -0600 Subject: [PATCH 1/3] chore(docs): allow Cordova 8, document using CocoaPods in that version --- README.md | 39 +++++++++++++++++++++++++++++++++------ package.json | 2 +- plugin.xml | 4 ++-- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c8d3e153..86484e5d 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ _Questions? [Contact us](https://support.branch.io/support/tickets/new)_ * [Compiling: Updating the Branch SDK](#compiling-updating-the-branch-sdk) * [Compiling: Incompatible Plugins](#compiling-incompatible-plugins) * [Compiling: Errors](#compiling-errors) + * [Compiling: Cordova 8](#compiling-cordova-8) * [Compiling: Capacitor](#compiling-capacitor) * [AppStore: iOS](#appstore-ios) @@ -1366,15 +1367,40 @@ _Questions? [Contact us](https://support.branch.io/support/tickets/new)_ * #### Compiling: Capacitor - * ##### Version 4.0.1 of this plugin works with Ionic 4 + Cordova and Ionic 4 + Capacitor, with the following caveats: + * ##### Version 4.1.x of this plugin works with Cordova 8, but you need to add some fields to your config.xml file: + + * Cordova 8 does not correctly support CocoaPods, which the 4.x releases of this plugin utilize + * This plugin can't include both versions of the pod spec, which changed between Cordova 8 and Cordova 9. We have chosen to include the Cordova 9 version. + * In order to support Cordova 8's handling of CocoaPods, you must install an extra Cordova plugin to correctly incorporate our CocoaPod ("Branch" v.0.31.3 as of 2020.02.10) + * Install the plugin [cordova-plugin-cocoapods-support](https://github.com/blakgeek/cordova-plugin-cocoapods-support) + * That plugin does not add any code to your app, it is strictly a Cordova hook to create your Podfile before building your app. + * Add the following lines to the `widget/platform[name="ios"]` path in config.xml: + ``` + + + ``` + * Replace `` with the minimum iOS version your app requires, e.g. "8" or "10.0" or "11.4" + * Run `cordova prepare ios` again and ensure you see console output similar to + ``` + Searching for new pods + Checking config.xml for pods. + config.xml requires pod: Branch + Installing pods + Sit back and relax this could take a while. + ``` + * Provided that the dependencies listed in the next section are up to date (see [Compiling: Capacitor](#compiling-capacitor)), you should also be able to do `cordova build ios` without issue. + +* #### Compiling: Capacitor + + * ##### Version 4.1.0 of this plugin works with Ionic 4 + Cordova and Ionic 4 + Capacitor, with the following caveats: * We strongly recommend Node >= 10.15. Node 8 might work, but it is not tested. - * For BOTH Cordova and Capacitor, you must use Xcode >= 11.1, CocoaPods >= 1.8.4, Cordova >= 9.0.0, Ionic-CLI >= 5.1, cordova-ios >= 5.1.0 + * For BOTH Cordova and Capacitor, you must use Xcode >= 11.1, CocoaPods >= 1.8.4, Cordova >= 8.0.0, Ionic-CLI >= 5.1, cordova-ios >= 5.1.0 * Every single one of these dependencies has fixes that allow the command line build, and the pod dependency resolution to work correctly * You MUST use @capacitor/ios >= 1.4.0. Versions prior to that version did not federate the OpenURL notifications to other plugins, including Branch. - * `use_frameworks` has been removed from this plugin and will now be statically built. If the other podfile uses `use_frameworks` that is fine but this plugin no longer flags itself as dynamic. + * `use_frameworks` has been removed from this plugin and will now be statically built. If the another podfile uses `use_frameworks` that is fine but this plugin no longer flags itself as dynamic. Ideally your app should be updated to remove `use_frameworks!` from your Podfile. * When using Capacitor, you must add the following entries yourself to `ios/App/App/Info.plist`: - ```sh + ``` CFBundleURLTypes @@ -1399,11 +1425,12 @@ _Questions? [Contact us](https://support.branch.io/support/tickets/new)_ branch_app_domain [YOUR DOMAIN].app.link ``` + This is a limitation of Capacitor where explicit config changes are the developer's responsibility in order to avoid "magic config" * When using Capacitor, you must add your Associated Domains entitlements via the Xcode entitlement editor yourself - * This MUST be done using Xcode - this is part of Capacitor's philosophy whereby you are in control of every config file change + * This MUST be done using Xcode - again this is part of Capacitor's core philosophy whereby you are in control of every config file change * Open the "Signing & Entitlements" tab in Xcode, add the Associated Domains entitlement, and add the urls found on your Branch dashboard. * #### AppStore: iOS * #### App rejected because it uses push notification features but does not declare the aps-environment key - When branch-cordova-sdk moved to use CocoaPods, a change was introduced in Cordova 9 where the separate entitlement files were no longer flattened together. This issue has been fixed in version 4.0.1 of this plugin. + When branch-cordova-sdk moved to use CocoaPods, a change was introduced in Cordova 9 where the separate entitlement files were no longer flattened together. This issue has been fixed in version 4.1.0 of this plugin by directly adding the Branch config to your existing entitlements rather than creating new entitlement files. This change is backward-compatible with Cordova 8. diff --git a/package.json b/package.json index 9e8be333..6bfd1c91 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "engines": [ { "name": "cordova", - "version": ">=9.0.0" + "version": ">=8.0.0" } ], "dependencies": { diff --git a/plugin.xml b/plugin.xml index 4ae90bd1..1e6767b0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -24,7 +24,7 @@ SOFTWARE. + version="4.1.2"> branch-cordova-sdk @@ -36,7 +36,7 @@ SOFTWARE. - + From f342c9141efca108adde6043382726313066dbc5 Mon Sep 17 00:00:00 2001 From: codinronan Date: Tue, 11 Feb 2020 23:24:16 -0600 Subject: [PATCH 2/3] chore(docs): fix section title --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86484e5d..bac2f47b 100644 --- a/README.md +++ b/README.md @@ -1365,7 +1365,7 @@ _Questions? [Contact us](https://support.branch.io/support/tickets/new)_ Command-line builds result in the above error. Please see the section below [Compiling: Capacitor](#compiling-capacitor) for the full list of up-to-date dependencies needed for CLI builds to work. -* #### Compiling: Capacitor +* #### Compiling: Cordova 8 * ##### Version 4.1.x of this plugin works with Cordova 8, but you need to add some fields to your config.xml file: From 80d83395dcae178a94e0aeb39503fa3fc98d2f32 Mon Sep 17 00:00:00 2001 From: Ernest Cho Date: Wed, 12 Feb 2020 13:49:18 -0800 Subject: [PATCH 3/3] SDK-861 update version and readme --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/android/io/branch/BranchSDK.java | 2 +- src/ios/BranchSDK.m | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19c90d9d..93e96798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ +# [4.1.2](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/compare/v4.1.1...v4.1.2) (2020-2-12) + +* Allow Cordova 8. Update readme with instructions. + # [4.1.1](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/compare/v4.1.0...v4.1.1) (2020-2-3) * Hotfix removing typo in iOS code diff --git a/package.json b/package.json index 6bfd1c91..66961cfe 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "branch-cordova-sdk", "description": "Branch Metrics Cordova SDK", "main": "src/index.js", - "version": "4.1.1", + "version": "4.1.2", "homepage": "https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking", "repository": { "type": "git", diff --git a/src/android/io/branch/BranchSDK.java b/src/android/io/branch/BranchSDK.java index 6e2e880f..298a3663 100644 --- a/src/android/io/branch/BranchSDK.java +++ b/src/android/io/branch/BranchSDK.java @@ -45,7 +45,7 @@ static class BranchLinkProperties extends io.branch.referral.util.LinkProperties // Standard Debugging Variables private static final String LCAT = "CordovaBranchSDK"; // todo pick up plugin version dynamically - private static final String BRANCH_PLUGIN_VERSION = "4.1.1"; + private static final String BRANCH_PLUGIN_VERSION = "4.1.2"; // Private Method Properties private ArrayList branchObjectWrappers; diff --git a/src/ios/BranchSDK.m b/src/ios/BranchSDK.m index 300b0208..1fdff8dd 100644 --- a/src/ios/BranchSDK.m +++ b/src/ios/BranchSDK.m @@ -1,6 +1,6 @@ #import "BranchSDK.h" -NSString * const pluginVersion = @"4.1.1"; +NSString * const pluginVersion = @"4.1.2"; @interface BranchSDK()