Giter Site home page Giter Site logo

branchmetrics / cordova-ionic-phonegap-branch-deep-linking-attribution Goto Github PK

View Code? Open in Web Editor NEW
234.0 95.0 144.0 104.2 MB

The Branch Cordova Ionic Phonegap SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.

Home Page: https://docs.branch.io/apps/cordova-phonegap-ionic/

License: MIT License

JavaScript 40.32% Java 32.86% Objective-C 24.86% CSS 0.48% HTML 1.47% C 0.02%
deep-links branch-sdk cordova phonegap ionic

cordova-ionic-phonegap-branch-deep-linking-attribution's Introduction

cordova-ionic-phonegap-branch-deep-linking-attribution's People

Contributors

aaaronlopez avatar aaustin avatar aeromusek avatar ahmednawar avatar amit-bansil avatar bklastaitis-branch avatar codinronan avatar echo-branch avatar ethanneff avatar gdeluna-branch avatar gfletcher-branch avatar harshabonthu avatar ilyakamens avatar jakecadams avatar jakub-g avatar jestoniyap avatar jsaleigh avatar kirkkt avatar maximbelov avatar nsingh-branch avatar odaumas avatar pragunvohra avatar renesansz avatar sarkar avatar scotthasbrouck avatar semantic-release-bot avatar sequoiaat avatar trelee avatar tushar-bidchat avatar zackmattor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-ionic-phonegap-branch-deep-linking-attribution's Issues

Compilation error on Android after "Add support for App Links" commit

After the "Add support for App Links" commit (81a201a), building on Android fails due to:

private void readAndStripParam(Activity activity) {
                                   ^
  symbol:   class Activity
  location: class BranchDevice
/platforms/android/src/io/branch/BranchDevice.java:68: error: cannot find symbol
                Bundle bundle = activity.getIntent().getExtras();
                ^
  symbol:   class Bundle
  location: class BranchDevice
/platforms/android/src/io/branch/BranchDevice.java:69: error: cannot find symbol
                Set<String> extraKeys = bundle.keySet();
                ^
  symbol:   class Set
  location: class BranchDevice

Wrong repo in instructions?

When trying to run cordova plugin add https://github.com/BranchMetrics/Web-SDK.git

I get

Error: ENOENT, no such file or directory ....

The solution is to instead run

cordova plugin add https://github.com/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK.git

Was this done on purpose? Am I doing something wrong?

iOS - Builds still failing (2.0.5)

Guys, my builds are still failing. I thought this issue was fixed? I'm using version 2.0.5 from NPM.

CompileC build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/Objects-normal/armv7/BranchSDK.o Veoci\ -\ DEV/Plugins/io.branch.sdk/BranchSDK.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd .../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents.../Platforms/iPhoneOS.platform.../usr/bin:/Applications/Xcode.app/Contents.../usr/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools:/platform-tools"
/Applications/Xcode.app/Contents.../Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents.../Platforms/iPhoneOS.platform.../SDKs/iPhoneOS9.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -g -fvisibility=hidden -Wno-sign-conversion -iquote .../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/Veoci\ -\ DEV-generated-files.hmap -I.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/Veoci\ -\ DEV-own-target-headers.hmap -I.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/Veoci\ -\ DEV-all-target-headers.hmap -iquote .../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/Veoci\ -\ DEV-project-headers.hmap -I.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/device/include -I.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/device/usr/local/lib/include -I.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/UninstalledProducts/include -I.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/device -I.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/DerivedSources/armv7 -I.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/DerivedSources -F.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/device -include .../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/sharedpch/Veoci\ -\ DEV-Prefix-aooswzgffdjakkabtibdsuigiqoe/Veoci\ -\ DEV-Prefix.pch -MMD -MT dependencies -MF .../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/Objects-normal/armv7/BranchSDK.d --serialize-diagnostics .../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/Objects-normal/armv7/BranchSDK.dia -c .../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/Veoci\ -\ DEV/Plugins/io.branch.sdk/BranchSDK.m -o .../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/build/Veoci\ -\ DEV.build/Release-iphoneos/Veoci\ -\ DEV.build/Objects-normal/armv7/BranchSDK.o
In file included from .../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/Veoci - DEV/Plugins/io.branch.sdk/BranchSDK.m:8:
.../builds/build.2016-03-17.09-43-01.wWaLGO.tmp/Veoci_Dev/platforms/ios/Veoci - DEV/Plugins/io.branch.sdk/BranchSDK.h:8:9: fatal error: 'Branch/Branch.h' file not found

import <Branch/Branch.h>

    ^

1 error generated.

logout method causing app crash

In iOS, after setting the user identity successfully, then I try to log the user out the app crashes and I get this log in the console.

2016-04-08 19:24:18.743 myApp[2100:433852] start logout
2016-04-08 19:24:18.744 myApp[2100:433852] start getInstance
2016-04-08 19:24:19.330 myApp[2100:433852] -[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0xb00000000010f7e5
2016-04-08 19:24:19.334 myApp[2100:433852] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0xb00000000010f7e5'
*** First throw call stack:
(0x1815cae38 0x180c2ff80 0x1815d1ccc 0x1815cec74 0x1814ccd1c 0x10018bb44 0x100194b2c 0x100182280 0x100645a7c 0x100645a3c 0x10064b4e4 0x181580dd8 0x18157ec40 0x1814a8d10 0x182d90088 0x18677df70 0x10002c658 0x1810468b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

xcode also displays this line in [BNCPreferenceHelper setUserIdentity:] as the issue.

<+116> at BNCPreferenceHelper.m:293

iOS vs Android - DeepLinkHandler differences

There is an annoying difference in the DeepLinkHandler in iOS vs Android... iOS escapes the string passed so it doesn't come out as an object in javascript (you have to do JSON.parse(data.data);) and in Android it comes out as an object (as i think it should be) and it's not namespaced under a .data object.

Android
https://github.com/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/blob/master/src/android/io/branch/BranchSDK.java#L673

iOS
https://github.com/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/blob/master/src/ios/BranchSDK.m#L101

Bunch of iOS (+1 java) plugin issues that still need to be addressed

BranchSDK.m - unresolved issues:

  1. Only a single BranchUniversalObject on the class (self.branchUniversalObj), which means, as with Java, multiple calls to CreateBranchUniversalObject will clobber prior calls to that method.
  2. setDebug does not resolve a promise #86
  3. Memory leaks (e.g. [NSString alloc] will need to be released)
  4. userCompletedAction still needs a way to resolve a promise depending on if the http call succeeded / via a listener; it returns too early right now

I did not (really) look at the following methods, but if I found anything from a cursory glance that I have not addressed, it's listed here (I also didn't check to ensure that we were returning the proper objects instead of just JSON strings, and whether those objects were consistent with the Java implementation):

  1. getAutoInstance
  2. registerDeepLinkController
  3. redeemRewards
  4. initWithCanonicalIdentifier
  5. initWithTitle
  6. addMetadata - does not resolve a promise
  7. registerView - does not resolve a promise
  8. showShareSheet - does not resolve a promise
  9. listOnSpotlight

BranchSDK.java - unresolved issues:

  1. setDebug does not resolve a promise
  2. userCompletedAction still needs a way to resolve a promise depending on if the http call succeeded / via a listener; it returns too early right now

Facebook plugin + branch on ios does not work

Hi,

I reverted all my code am now trying to get just Facebook and branch plugin to work side by side on my app. Both functionality are crucial for my app. Unfortunately when branch is installed, on ios when I click on the facebook login, I am prompted by facebook to authorize the app but when facebook returns to the app, branch seems to be intercepting the call and I am not receiving any of the response back from the facebook oauth call. Works fine on the android.

Facebook Plugin: https://github.com/Wizcorp/phonegap-facebook-plugin

Debug Logs After FB Login with some sensitive data masked:

2016-03-15 14:31:55.761 <appName>[780:284539] [BNCServerInterface.m:183] body = {
    "branch_key" = "<myLiveKey>";
    "device_fingerprint_id" = <deviceId>;
    "identity_id" = <identityId>;
    retryNumber = 0;
    sdk = "ios0.11.17";
    "session_id" = <sessionId>;
}
2016-03-15 14:31:56.302 <appName>[780:284620] [BNCServerInterface.m:225] returned = Status: 200; Data: {
}
2016-03-15 14:31:56.610 <appName>[780:284539] encoded dictionary : {"external_intent_uri":"fb1050047481724149://authorize#e2e=%7B%22init%22%3A<fbID>%7D&granted_scopes=user_work_history%2Cuser_friends%2Cemail%2Ccontact_email%2Cpublic_profile&signed_request=<signedRequestData>","ios_bundle_id":"<appBundleId>","app_version":"1.0.0","device_fingerprint_id":"<deviceId>","update":1,"os":"iOS","identity_id":"<identityId>","sdk":"ios0.11.17","debug":1,"retryNumber":0,"branch_key":"<myLiveKey>","is_referrable":0,"os_version":"9.2.1","ad_tracking_enabled":1,"uri_scheme":"<appName>"}
2016-03-15 14:31:56.612 <appName>[780:284539] [BNCServerInterface.m:182] using url = https://api.branch.io/v1/open
2016-03-15 14:31:56.613 <appName>[780:284539] [BNCServerInterface.m:183] body = {
    "ad_tracking_enabled" = 1;
    "app_version" = "1.0.0";
    "branch_key" = "<myLiveKey>";
    debug = 1;
    "device_fingerprint_id" = <deviceId>;
    "external_intent_uri" = "fb1050047481724149://authorize#e2e=%7B%22init%22%3A<fbID>%7D&granted_scopes=user_work_history%2Cuser_friends%2Cemail%2Ccontact_email%2Cpublic_profile&signed_request=<signedRequestData>";
    "identity_id" = <identityId>;
    "ios_bundle_id" = "<appBundleId>";
    "is_referrable" = 0;
    os = iOS;
    "os_version" = "9.2.1";
    retryNumber = 0;
    sdk = "ios0.11.17";
    update = 1;
    "uri_scheme" = <appName>;
}
2016-03-15 14:31:56.652 <appName>[780:284539] start setDebug
2016-03-15 14:31:56.652 <appName>[780:284539] start initSession
2016-03-15 14:31:56.652 <appName>[780:284539] start getInstance
2016-03-15 14:31:57.184 <appName>[780:284620] [BNCServerInterface.m:225] returned = Status: 200; Data: {
    "browser_fingerprint_id" = "<null>";
    data = "{\"+is_first_session\":false,\"+clicked_branch_link\":false}";
    "device_fingerprint_id" = <deviceId>;
    "identity_id" = <identityId>;
    link = "https://bnc.lt/a/<myLiveKey>?%24identity_id=<identityId>";
    "session_id" = <sessionId2>;
}
2016-03-15 14:31:57.185 <appName>[780:284539] inside initSessionAndRegisterDeepLinkHandler block
2016-03-15 14:31:57.185 <appName>[780:284539] Success
2016-03-15 14:31:57.185 <appName>[780:284539] returning data to js interface..

Your help would be much appreciated.

Cheers,
TJ

Need to be able to pass nonbranch links

This seems strange that I'm unable to do this.

my_scheme://reset_password?token=asdfawefawef

I can click the link, it opens my app, but I get no information about the link at all. This is a pretty big issue as I don't want to have to create a Branch link on the server side for every link I need to send to my app. I'd also hate to create a dependency for every event in my app when I have all the data I need right there. Is there a way to utilize both Branch and retrieve the URL from the link clicked above?

This is a critical issue for me.

iOS universal_link_url is not reset to nil after consumed

  1. When clicking on a universal link to open the app, the universal_link_url is stored in cordova-src/ios/BNCDevice.m.
  2. Then press the Home button and click on the app icon to open the app (which is NOT a universal link click).
  3. Because the universal_link_url was not reset to nil, the same data from Step 1 got fetched inside getOpenData.

Note: the Android version is correctly resetting the values after consumed in getOpenData e.g. this line

Latest version does not compile on IOS

Hi,

I pulled the latest version of the SDK and when I try to build for ios, I get the following error. Any thoughts?

Undefined symbols for architecture arm64:

  "_OBJC_CLASS_$_CSSearchableItem", referenced from:

      objc-class-ref in BranchCSSearchableItemAttributeSet.o

  "_OBJC_METACLASS_$_CSSearchableItemAttributeSet", referenced from:

      _OBJC_METACLASS_$_BranchCSSearchableItemAttributeSet in BranchCSSearchableItemAttributeSet.o

  "_OBJC_CLASS_$_CSSearchableIndex", referenced from:

      objc-class-ref in BranchCSSearchableItemAttributeSet.o

  "_OBJC_CLASS_$_CSSearchableItemAttributeSet", referenced from:

      _OBJC_CLASS_$_BranchCSSearchableItemAttributeSet in BranchCSSearchableItemAttributeSet.o

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Cheers,
TJ

setIdentity doesn't work in current version

Hi!

I've already used user identity with an older version of this plugin, but since the update I don't see the developer_identity set in the dashboard anymore.

The request seems to go out properly:

https://api.branch.io/v1/profile
identity_id=[IDENTITY_ID]&identity=1063&session_id=[SESSION_ID]&device_fingerprint_id=[DEVICE_FINGERPRINT_ID]&sdk=cordova1.7.0&branch_key=[BRANCH_KEY]

response:

{"identity_id":"[IDENTITY_ID]","link_click_id":"[LINK_CLICK_ID]","link":"https://bnc.lt/j/JVz0WDSvum","referring_data":"{\"$marketing_title\":\"test\",\"$one_time_use\":false,\"target\":\"overlay\",\"value\":\"shop\",\"~campaign\":\"debug\",\"~channel\":\"Test\",\"~creation_source\":1,\"~feature\":\"marketing\",\"~id\":\"[ID]\"}"}

Do you have any ideas what's going wrong?

Best

Christoph

iOS - builds failing because of missing file dependency again

Guys, somehow in NPM version 2.0.3 another missing file seems to have been introduced.

Failed to install 'io.branch.sdk':CordovaError: Uh oh!
"/private/project/cordova/plugins/io.branch.sdk/src/ios/dependencies/Branch-SDK/BNCContentDiscoveryManager.m" not found!
at copyFile (/private/project/cordova/lib/plugman/pluginHandlers.js:261:36)
at copyNewFile (/private/project/cordova/lib/plugman/pluginHandlers.js:293:5)
at installHelper (/private/project/cordova/lib/plugman/pluginHandlers.js:212:9)
at handlers.source-file.install (/private/project/cordova/lib/plugman/pluginHandlers.js:34:13)
at Object.ActionStack.process (/private/project/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
at Plugman.addPlugin (/private/project/cordova/lib/plugman/Plugman.js:82:20)
at Api.addPlugin (/private/project/cordova/Api.js:187:53)
at handleInstall (/usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/install.js:602:6)
at /usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/install.js:391:24
at _fulfilled (/usr/local/lib/node_modules/pgb-plugman/node_modules/q/q.js:787:54)
Uh oh!
"/private/project/cordova/plugins/io.branch.sdk/src/ios/dependencies/Branch-SDK/BNCContentDiscoveryManager.m" not found!

No resource identifier found for attribute 'autoVerify' in package 'android'

When I build the testbed app, I am getting the following error.


FAILED



FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':processDebugResources'.

> 
com.android.ide.common.internal.LoggedErrorException: Failed to run command:

    /Users/tkuben/Library/Android/sdk/build-tools/23.0.2/aapt package -f --no-crunch -I /Users/tkuben/Library/Android/sdk/platforms/android-22/android.jar -M /Users/tkuben/Documents/webroot/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/testbed/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /Users/tkuben/Documents/webroot/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/testbed/platforms/android/build/intermediates/res/debug -A /Users/tkuben/Documents/webroot/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/testbed/platforms/android/build/intermediates/assets/debug -m -J /Users/tkuben/Documents/webroot/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/testbed/platforms/android/build/generated/source/r/debug -F /Users/tkuben/Documents/webroot/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/testbed/platforms/android/build/intermediates/res/resources-debug.ap_ --debug-mode --custom-package io.branch.testbed -0 apk --output-text-symbols /Users/tkuben/Documents/webroot/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/testbed/platforms/android/build/intermediates/symbols/debug

  Error Code:

    1

  Output:

    /Users/tkuben/Documents/webroot/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/testbed/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:41: error: No resource identifier found for attribute 'autoVerify' in package 'android'







* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug
 option to get more log output.


BUILD FAILED



Total time: 11.1 secs

Any Thoughts?
Cheers,
TJ

iOS SSL Error

I'm getting this error Failed to load resource: An SSL error has occurred and a secure connection to the server cannot be made. ---- https://api.branch.io/v1/close When my cordova app (iOS) comes out of paused state.

iOS plugin not necessarily returning the latest params

Alternating between opening our app from the home screen and opening it via a link that I generated (https://bnc.lt/BpSc/6rY8bdZZXr) (note the latest code is not on production so grabbing the production app from the App store won't help here), the following code in JS doesn't necessarily return the latest params. Sometimes when I open the app from my home screen, the latest referring params say that they are from the link and vice versa:

window.Branch.initSession().then(function(params) { 
    console.log("The latest params should be: ", params);
}
window.Branch.initSession().then(function() { 
  window.Branch.getLatestReferringParams().then(function(params) {
    console.log("The latest params should be: ", params);
  }
}

We call initSession in these places:

deviceReady().then(...);
document.addEventListener("resume", ...);
onRegister // function that is hit when a new user registers

Many times I receive these params in DeepLinkHandler (which are wrong):

{+is_first_session: false, +clicked_branch_link: false}

and sometimes I receive the proper params for my link, but when I navigate open the app from my iPhone's home screen instead of via a link.

I haven't looked into if the issue happens for getFirstReferringParams().

This is potentially the last issue that is blocking us from deploying to production, so a resolution here would be great.

Thanks.

ios trying to load branch.js instead of build.min.js

First and foremeost branch.io is awesome. It's making my life so much easier.

However, for ios (android is working fine) I have a phonegap plugin loading the cordova branch.io sdk through npm; when the application runs it seems to be attempting to load branch.js which doesn't exist in the loaded scripts. There is, however, a build.min.js in the available resources.

Here's the console error:
[Error] Failed to load resource: The requested URL was not found on this server. (branch.js, line 0)

A screenshot of the resources from safari remote debugger:
screen shot 2016-02-04 at 3 58 37 pm

And window.branch is an empty object.

note: being built with phonegap

iOS - "SyntaxError: Unexpected identifier 'Error'. Expected ')' to end a argument list."

I'm getting this error when I try to go into offline mode in my app. As best I can tell it is caused by this plugin. If I remove it from my config, everything works correctly.

Unfortunately, it's not giving me any stack trace so I really have no way of debugging this.

My steps to reproduce are:

  • Install
  • Start the app up. Wait a minute for everything to initialize
  • Go into airplane mode to fire the cordova offline handlers.
  • Observe the error in the safari tools

Now I have no idea why it would be throwing a syntax error there and not when it tried to load the script into the view. For the record, this is NOT happening on Android.

Android build fails: Cannot find symbol this.setIntent(intent);

When i'm trying to build my project with the latest version i'm getting the follwing error:
:compileArmv7DebugJavaWithJavac/.../platforms/android/src/io/branch/BranchSDK.java:62: error: cannot find symbol this.setIntent(intent); ^ symbol: method setIntent(Intent)
Maybe this issue is connected with #82 ?

What on earth is going on?

Guys, we had our deeplink integration with you working perfectly for about a month, we pushed to production. Our product works very closely with branch functionality to support our use-cases. If branch breaks, our stack falls over on its face.

  • I went to make a new build last week only to find the plugin is broken, i went to the repo and immediately see a commit ripped out cordova implementation
  • eventually figured out it was moved to this repo, please email your customers?
  • switched to new repo, looks ok. Deploy to device, links aren't opening our app, they go directly to the web fallback url
  • Log into branch dashboard, half our settings for test/live are gone or screwed (bad migrations maybe?)
  • Our schema url was appname://test:// instead of appname:// and the urls were all malformed/missing too.

I still haven't quite been able to get our app to open after clicking a link that has been generated. I'm wondering if this functionality even still works?

Push Version 2.0 to npm

I'd like to use version 2.0 in my app. I'm currently pulling from npm though. Any idea when 2.0 will be published to npm for production use?

Universal links and resume event issue

Following the guide on integrating cordova plugin in Ionic app, I'm handling it like this:

           if (window.branch) {
                window.branch.setDebug(true);
                document.addEventListener('resume', onResume, false);
                window.branch.init(BRANCH_KEY, {
                    isReferrable: true
                }, function (err, data) {
                    handleBranchResponse(data);
                });
                function onResume() {
                    window.branch.init(BRANCH_KEY, {
                        isReferrable: true
                    }, function (err, data) {
                        handleBranchResponse(data);
                    });
                }
            }

The cold start works just fine, I receive the deep link path as expected within the callback and navigate the user to the corresponding page of my app. However when I put the app in background mode and then resume it the callback of the second branch.init() in resume handler receives the same link parameter again although I haven't accessed the app by following the branch.io link. This results in user being taken to the same page again. This happens each time I pause and resume the app and the only way to fix it is to kill the app and start over.

showShareSheet not working iOS

showShareSheet method not pulling up share sheet for iOS. Console on Xcode outputs the following: start showShareSheet
-[NSNull countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x1a159e490
*** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: -[NSNull countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x1a159e490

Was working until upgraded to Cordova 6.1.1

iOS9 - Tries to hit fallback link every time from Safari (Chrome works fine)

This may be a configuration problem on my end, but I can't be sure, especially with all the iOS issues I've run into over the past few weeks using branch. In iOS9 the plugin seems to try and install the app every single time. I can't seem to isolate which side it's coming from; the mapping on the branch side or something with the plugin.

I've got everything set up in my config file for universal links since custom URLs are no longer supported in iOS9:

    <!-- Branch.io universal links -->
    <gap:plugin name="branch-cordova-sdk" source="npm">
        <param name="BRANCH_LIVE_KEY" value="@BRANCH_LIVE_KEY@" />
        <param name="URI_SCHEME" value="@URL_SCHEME@" />
    </gap:plugin>
    <gap:plugin name="cordova-universal-links-plugin" source="npm" />
    <universal-links>
        <ios-team-id value="@TEAM_ID@" />
        <host name="bnc.lt"></host>
    </universal-links>

The URL_SCHEME matches what I have configured in the branch.io dashboard. The links are working correctly in iOS8 and below. There are no errors.

Also, the same setup is working on Android perfectly. This might be a setup issue but since the plugin seems to be working right on Android so I thought it might be the plugin.

Cordova integration getting build error for iOS with phonegap

Hello,
We integrated the new version of branch into our cordova app. Its working good in Android, but when we build the app with phonegap the build server returns the error as "Error - A plugin in your app does not support the compulsory arm64 (64-bit support) architecture." for iOS.

Please help us to resolve this issue.

Android Build issue with latest SDK 2.0.3 - Multiple dex files define Landroid/support/annotation/AnimRes

Hi

I am using the latest master I believe its 2.0.3 and when I build on the android, I am getting the following error:

UNEXPECTED TOP-LEVEL EXCEPTION:

com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;


    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)


    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)


    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)


    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)


    at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)


    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)


    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)


    at com.android.dx.command.dexer.Main.run(Main.java:277)


    at com.android.dx.command.dexer.Main.main(Main.java:245)


    at com.android.dx.command.Main.main(Main.java:106)





FAILED


When I remove the branch plugin and try, I am able to build successfully.

Any Thoughts?
Cheers

TJ

showShareSheet causes app crash

I'm calling showShareSheet like so:

Branch.createBranchUniversalObject({
  ...
}).then(function (branchUniversalObj) {
branchUniversalObj.showShareSheet({
 ...
},{});
}, function (err) {
// Error Callback
console.error(err);
});

Everything seems in order, but every couple of times, selecting an app from the "Show More" menu (e.g. Hangouts) crashes the app.
My logcat experience is limited, but this is what I managed to pull out from CordovaBranchSDK and AndroidRuntime:

D/CordovaBranchSDK( 4357): start showShareSheet()
D/CordovaBranchSDK( 4357): start createLinkProperties()
D/CordovaBranchSDK( 4357): inside onShareLinkDialogLaunched
D/CordovaBranchSDK( 4357): inside onChannelSelected
D/CordovaBranchSDK( 4357): channelName: Hangouts
D/CordovaBranchSDK( 4357): inside onLinkCreate
D/AndroidRuntime( 4357): Shutting down VM
E/AndroidRuntime( 4357): FATAL EXCEPTION: main
E/AndroidRuntime( 4357): Process: com.selfikon.anna, PID: 4357
E/AndroidRuntime( 4357): java.lang.RuntimeException: Unable to pause activity {com.selfikon.anna/com.selfikon.anna.MainActivity}: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
E/AndroidRuntime( 4357):    at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3260)
E/AndroidRuntime( 4357):    at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3219)
E/AndroidRuntime( 4357):    at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3194)
E/AndroidRuntime( 4357):    at android.app.ActivityThread.access$1000(ActivityThread.java:151)
E/AndroidRuntime( 4357):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1314)
E/AndroidRuntime( 4357):    at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 4357):    at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 4357):    at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime( 4357):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 4357):    at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 4357):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime( 4357):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
E/AndroidRuntime( 4357): Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
E/AndroidRuntime( 4357):    at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6357)
E/AndroidRuntime( 4357):    at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:909)
E/AndroidRuntime( 4357):    at android.view.ViewGroup.invalidateChild(ViewGroup.java:4690)
E/AndroidRuntime( 4357):    at android.view.View.invalidateInternal(View.java:11801)
E/AndroidRuntime( 4357):    at android.view.View.invalidate(View.java:11765)
E/AndroidRuntime( 4357):    at android.view.View.startAnimation(View.java:17859)
E/AndroidRuntime( 4357):    at io.branch.referral.AnimatedDialog.slideClose(AnimatedDialog.java:118)
E/AndroidRuntime( 4357):    at io.branch.referral.AnimatedDialog.cancel(AnimatedDialog.java:53)
E/AndroidRuntime( 4357):    at io.branch.referral.ShareLinkManager.cancelShareLinkDialog(ShareLinkManager.java:92)
E/AndroidRuntime( 4357):    at io.branch.referral.Branch$BranchActivityLifeCycleObserver.onActivityPaused(Branch.java:3053)
E/AndroidRuntime( 4357):    at android.app.Application.dispatchActivityPaused(Application.java:217)
E/AndroidRuntime( 4357):    at android.app.Activity.onPause(Activity.java:1468)
E/AndroidRuntime( 4357):    at org.apache.cordova.CordovaActivity.onPause(CordovaActivity.java:228)
E/AndroidRuntime( 4357):    at android.app.Activity.performPause(Activity.java:6101)
E/AndroidRuntime( 4357):    at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1310)
E/AndroidRuntime( 4357):    at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3246)
E/AndroidRuntime( 4357):    ... 11 more
D/CordovaBranchSDK( 4357): inside onShareLinkDialogDismissed

I'm not that great with native development, so any help would be great. From what I see here, my best guess is that a background thread is trying to work with the UI, but that is as far as I've gotten.

setDebug has no effect

Hi!

I'm trying to activate the debug mode by setting branch.setDebug before branch.init, but it doesn't make any difference and only tracks a open instead of an install. I've stepped into it with the debugger and the debug flag is set properly. Unfortunately the compressed google closure code isn't very easy to debug.
It seems to be as if an install tracking is sent to branch backend:
https://api.branch.io/v1/install
request:

sdk:    cordova1.7.0
hardware_id:    [HARDWARE_ID]
is_hardware_id_real:    true
app_version:    [APP VERSION]
brand:  Apple
model:  iPad4,1
os: iOS
uri_scheme: [URI_SCHEME]
os_version: 8.4
screen_width:   2048
screen_height:  1536
is_referrable:  1
branch_key: [BRANCH_KEY]

response:

{
    "session_id": "[SESSION_ID]",
    "identity_id": "[IDENTITIY_ID]",
    "device_fingerprint_id": "[DEVICE_FINGERPRINT_ID]",
    "browser_fingerprint_id": null,
    "link": "https://bnc.lt/j/JVz0WDSvum",
    "identity": "1020",
    "data": "{\"$desktop_url\":\"http://www.desktopurl.com\",\"$marketing_title\":\"Test Install\",\"$one_time_use\":false,\"~campaign\":\"install\",\"~channel\":\"Landingpage\",\"~creation_source\":\"Dashboard\",\"~feature\":\"marketing\",\"~id\":\"176980187282456102\",\"+match_guaranteed\":true,\"+click_timestamp\":1443435811,\"+is_first_session\":false,\"+clicked_branch_link\":true}"
}

Also the trick to add a debug device for a cordova based app somehow doesn't work. Is there a way to do this manually, besides the four finger press trick?

Best

Christoph

iOS - Universal links not configuring correctly

So I've looked everywhere and done everything I can do. As best I can tell, this plugin isn't configuring the necessary entitlements in the packaged IPA file.

I used this web service to test the bnc.lt apple-app-site-association file to make sure my universal links are configured correctly on the branch side of things. I was able to see the app I am looking for and it looks configured correctly.

Then I uploaded my test IPA file that was generated with this plugin. It's telling me Must be able to find entitlements (looking in VeociDev/Payload/VeociDev.app/archived-expanded-entitlements.xcent).

I have the necessary Associated Domains configuration set up for this app ID in the apple developer portal. This is what my plugin configuation looks like in the config.xml file for the build, with the appropriate flags filled in:

   <!-- Branch.io universal links -->
    <plugin name="branch-cordova-sdk" source="npm">
        <param name="BRANCH_KEY" value="@BRANCH_LIVE_KEY@" />
        <param name="URI_SCHEME" value="@URL_SCHEME@" />
    </plugin>
    <branch-config>
        <ios-team-id value="@TEAM_ID@" />
        <android-prefix value="/X9Ug" />
        <host name="bnc.lt" scheme="https" />
    </branch-config>

Am I doing something wrong, or is there a bug here somewhere?

contentMetaData doesn't seem to be appearing in the data when the user clicks the link

Hi,

I created the Branch Universal Object using the following params:

var universalObjParams = {canonicalIdentifier: 'identifier',
                                      title: 'title',
                                      contentDescription: '',
                                      contentImageUrl: '',
                                      contentIndexingMode: 'public', 
                                      contentMetadata: {testData: 'some test data'}};

However, when the user clicks on the link based on this universal object, the data that gets into DeepLinkHandler does not contain the metaData "testData". How can I add additional data sets to a tracking link?

Based on the code base, it doesn't seem like there is anything being done with the contentMetaData:

https://github.com/BranchMetrics/Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK/blob/master/src/android/io/branch/BranchSDK.java#L377

Thoughts?

TJ

Can't get the plugin to build in Phonegap Build - Missing iOS header file

I'm trying to do a build through phonegap build service, but it's failing for both iOS and Android.

For comparison purposes, version 1.8 succeeded in PGB, it was just broken when you tried to use it. I know this isn't support for PGB, but I feel like something introduced here isn't playing nicely.

Here is an error from the iOS build, it's not totally helpful but it's something:

** BUILD FAILED **

The following build commands failed:
CompileC build/VeociDEV.build/Release-iphoneos/VeociDEV.build/Objects-normal/armv7/BranchSDK.o VeociDEV/Plugins/io.branch.sdk/BranchSDK.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

It doesn't give any detail on WHY it failed. If this is not something you can really help out with, you can just close this and I'll try to push the PGB guys, but talking to them is like working in a vacuum. That's why I was hoping we could resolve it here.

Branch not ready on deviceready event

After a lot of struggles with the SDK and seemingly random responses / no response from the branch.init() method I integrated Weiner in order to view the network requests and Local Storage of the device.

Sometimes when logging the branch object the values are populated and methods are in place. However much of the time the branch object logs empty with solely the proto property and the init function is undefined.

As I am using branch asynchronously this blocks the load of my app as other components depend on this data. How can I ensure that branch is ready everytime the user opens the app?

On ios, when someone clicks a link that was generated using an SDK that has contentMetadata, the click does not contain the custom data

Hi,

I create the Universal Branch Object using the following:

{canonicalIdentifier: 'someCan',
  title: 'Title',
  contentDescription: '',
  contentImageUrl: '',
  contentIndexingMode: 'private', 
  contentMetadata: {testData: 'Ssome Test Data'}};

and then generate a link using that object. I successfully receive the link from the call and am able to see the MetaData in my branch dashboard. However, on ios, when someone clicks the link, it opens the app however in the function: DeepLinkHandler, the data does not contain the meta information. This works flawlessly on android.

This is a critical blocker for us as we are not able to deep link on the ios using custom data. Can someone please help!

Cheers,
TJ

Ionic: Uncaught Error: API request /v1/profile missing parameter identity_id

Hi,
I'm trying to use Branch for my Ionic app but it's impossible... I receive this error when trying to set the identity or generating a link (this one is from setIdentity):
Uncaught Error: API request /v1/profile missing parameter identity_id

The init is done correctly as I don't receive any error. But what is strange here is that the result of the init function is an empty structure:
{"data":null,"data_parsed":null,"has_app":null,"identity":null,"referring_identity":null,"referring_link":null}

The init is done in $ionicPlatform.ready and the createUrl is done via a user action (so after init).

What am I doing wrong ?

Thanks !

Integrate with Eddy Verbruggen's plugin

Eddy Vebruggen has made a fantastic plugin for opening cordova apps that works AMAZINGLY with Branch. I was just about to finally give up on branch (I had removed all the code from my app) when I decided to give it one last attempt.

I think that this plugin should either
a) Directly integrate his plugin
b) Tell people to install it first in the instructions

https://github.com/EddyVerbruggen/Custom-URL-scheme

Cordova crashing on android as soon as plugin is installed

As soon as I installed the plugin on my android device (Nexus 5 - fully updated) I started having random crashes with the notice
The connection to the server was unsuccessful. (file ///android_asset/www/index.html)

Uninstalling the plugin fixes the problem immediately.

This also happens on the first gen moto g, but not on some newer devices.

The bug can be intermittent, but opening and closing the app enough times will reproduce it.

build.min.js uses `eval`

If you check out https://github.com/BranchMetrics/Smart-App-Banner-Deep-Linking-Web-SDK/blob/c27bb63f6d98b8614aac3bd9db577d3d247e9e83/dist/build.js and search for unsafeParse, you'll see that because goog.json.USE_NATIVE_JSON is set to false, the closure compiler uses eval instead of JSON.parse to handle API respsonses. I don't know much about closure compiler, but I think that it should probably be configured to use native JSON.

Secondly, this issue silently broke all attribution and deeplinking data because of lines 1157-1159

        try {
          e(null, goog.json.parse(f.responseText), f.status);
        } catch (a) {
          e(null, {}, f.status);
        }

Because I have CSP enabled for my project, the eval failed and erroneously transformed from a "unsafe-eval blocked" error to a "Invalid JSON string" error, which in turn was caught and silently interpreted as the empty payload by the lines above. This was super confusing and probably should at least log an error.

iOS cordova build fails with error: Branch/Branch.h not found

The android build works correctly, but the ios build returns the following error during the build:

CompileC build/Adored.build/Debug-iphonesimulator/Adored.build/Objects-normal/i386/BranchSDK.o Adored/Plugins/io.branch.sdk/BranchSDK.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/alec/Developer/adored/adored-ember/cordova/platforms/ios
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/alec/.rvm/gems/ruby-2.2.4/bin:/Users/alec/.rvm/gems/ruby-2.2.4@global/bin:/Users/alec/.rvm/rubies/ruby-2.2.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/alec/.rvm/bin:/Users/alec/Library/Android/sdk/platform-tools:/Users/alec/Library/Android/sdk/tools"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=364 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=c99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/x4/tgy478h91pq8sf3h3_93bly00000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/Adored.build/Debug-iphonesimulator/Adored.build/Adored-generated-files.hmap -I/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/Adored.build/Debug-iphonesimulator/Adored.build/Adored-own-target-headers.hmap -I/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/Adored.build/Debug-iphonesimulator/Adored.build/Adored-all-target-headers.hmap -iquote /Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/Adored.build/Debug-iphonesimulator/Adored.build/Adored-project-headers.hmap -I/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/emulator/include -I/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/emulator/usr/local/lib/include -I/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/UninstalledProducts/include -I/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/UninstalledProducts/iphonesimulator/include -I/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/emulator -I/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/Adored.build/Debug-iphonesimulator/Adored.build/DerivedSources/i386 -I/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/Adored.build/Debug-iphonesimulator/Adored.build/DerivedSources -F/Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/emulator -FAdored/Plugins/io.branch.sdk -include /Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/sharedpch/Adored-Prefix-fadfkttyfyggspahrxbdtpvzcege/Adored-Prefix.pch -MMD -MT dependencies -MF /Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/Adored.build/Debug-iphonesimulator/Adored.build/Objects-normal/i386/BranchSDK.d --serialize-diagnostics /Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/Adored.build/Debug-iphonesimulator/Adored.build/Objects-normal/i386/BranchSDK.dia -c /Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/Adored/Plugins/io.branch.sdk/BranchSDK.m -o /Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/build/Adored.build/Debug-iphonesimulator/Adored.build/Objects-normal/i386/BranchSDK.o
In file included from /Users/alec/Developer/adored/adored-ember/cordova/platforms/ios/Adored/Plugins/io.branch.sdk/BranchSDK.m:8:
Adored/Plugins/io.branch.sdk/BranchSDK.h:8:9: fatal error: 'Branch/Branch.h' file not found

import <Branch/Branch.h>

    ^

1 error generated.

** BUILD FAILED **

Looking at the xcode project the Branch.framework exists but it doesn't have a Headers directory like other frameworks. Looking at it on the file system, however, it seems to be structured correctly like other frameworks.

Error onNewIntent on Android while application is running

We are experiencing problems when using local notification plugin (http://github.com/katzer/cordova-plugin-local-notifications) in combination with Branch. BranchSDK is throwing the following error when a new Intent is created (e.g. click on push notification) while the application is already running:

FATAL EXCEPTION: main java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.success(org.json.JSONObject)' on a null object reference at io.branch.BranchSDK$SessionListener.onInitFinished(BranchSDK.java:806) at io.branch.referral.Branch.initUserSessionInternal(Branch.java:1062) at io.branch.referral.Branch.initSession(Branch.java:742) at io.branch.referral.Branch.initSession(Branch.java:816) at io.branch.BranchSDK.initSession(BranchSDK.java:257) at io.branch.BranchSDK.onNewIntent(BranchSDK.java:58) at org.apache.cordova.PluginManager.onNewIntent(PluginManager.java:328)

We assume that this happens because _callbackContext of SessionListener is set to null on onNewIntent and onInitFinished is called from initUserSessionInternal (Branch.java line 1048) without checking if _callbackContext is set.
Actually there is a check for callback in initUserSessionInternal but in this case callback is an instance of SessionListener which is not null but internally has no _callbackContext set.

Can somebody with more Android experience have a look into this issue, please? ๐Ÿ˜…

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.