Git Product home page Git Product logo

branchmetrics / ios-branch-deep-linking-attribution Goto Github PK

View Code? Open in Web Editor NEW
725.0 107.0 229.0 726.13 MB

The Branch iOS 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://help.branch.io/developers-hub/docs/ios-sdk-overview

License: MIT License

Objective-C 84.58% Ruby 0.86% Shell 1.46% Swift 13.09% C 0.01%

ios-branch-deep-linking-attribution's Introduction

Branch SDK Documentation for iOS

The Branch iOS SDK for deep linking and attribution.

Branch Sandbox Program

As part of this sandbox program, you will be able to partner directly with Branch’s Product and Engineering team for exclusive access to test drive our innovative products before the market and proactively exchange valuable feedback. With your support, we will create the winning measurement and linking solutions of the future together.

If you would like to join, please reach out to us today at [email protected] or by filling out this form.

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.

View Branch's SDK documentation for iOS

ios-branch-deep-linking-attribution's People

Contributors

aaustin avatar agerstner-branch avatar agrimn avatar ahmednawar avatar bklastaitis-branch avatar dependabot[bot] avatar derrickstaten avatar e-b-smith avatar echo-branch avatar gdeluna-branch avatar github-actions[bot] avatar jagadeeshkaricherla-branch avatar jakecadams avatar jdee avatar joshuafeldman avatar kdama-branch avatar maheshbudhe avatar ndixit-branch avatar nidhidixit09 avatar nsingh-branch avatar parthkalavadia avatar pbcorriganbranch avatar qinweigong avatar sarkar avatar scotthasbrouck avatar shortstuffsushi avatar snakingfire avatar sojanpr avatar sreenivastangella avatar zhukn1 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  avatar  avatar  avatar  avatar

ios-branch-deep-linking-attribution's Issues

Crash in -[BNCServerRequestQueue persist] method

Hello.

We are using Branch-iOS-SDK via cocoapods (like pod 'Branch', '0.3.0') and faced the crash in -[BNCServerRequestQueue persist] method. Found on iPhone 6+ Simulator with iOS 8.1.
Here is a stack trace:

thread #4: tid = 0x1234a4, 0x000000010ff6d00b libobjc.A.dylib'objc_msgSend + 11, queue = 'brnch_persist_queue', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
frame #0: 0x000000010ff6d00b libobjc.A.dylib'objc_msgSend + 11
frame #1: 0x000000010cab9ac3 Foundation'_encodeObject + 158
frame #2: 0x000000010cab96e9 Foundation'+[NSKeyedArchiver archivedDataWithRootObject:] + 162
frame #3: 0x000000010a37eb13 MyAppName'__32-[BNCServerRequestQueue persist]_block_invoke(.block_descriptor=) + 563 at BNCServerRequestQueue.m:153
frame #4: 0x0000000110bb6ba6 libdispatch.dylib'_dispatch_call_block_and_release + 12
frame #5: 0x0000000110bd47f4 libdispatch.dylib'_dispatch_client_callout + 8
frame #6: 0x0000000110bbcb22 libdispatch.dylib'_dispatch_queue_drain + 1417
frame #7: 0x0000000110bbc432 libdispatch.dylib'_dispatch_queue_invoke + 235
frame #8: 0x0000000110bbefc1 libdispatch.dylib'_dispatch_root_queue_drain + 685
frame #9: 0x0000000110bc0612 libdispatch.dylib'_dispatch_worker_thread2 + 52
frame #10: 0x0000000110f6cef8 libsystem_pthread.dylib'_pthread_wqthread + 314
frame #11: 0x0000000110f6ffb9 libsystem_pthread.dylib'start_wqthread + 13

And the screenshots:
https://www.dropbox.com/s/kirtbpxpm2n4dzj/screen1.png?dl=0
https://www.dropbox.com/s/870abousaubj95a/screen2.png?dl=0

Random users receiving random link params upon initUserSessionWithCallback

Hello,

I am having an issue where users are receiving random referral link param, even when they NEVER clicked on any links.

This is the scenario:

  1. UserA sends an email referral link to UserB
  2. UserB clicks on the link on his device, then opens the app. Upon calling initUserSessionWithCallback, the referral link params are received, as expected.
  3. A different UserC installs the app on his device. This is a different device than the one used by UserA and UserB. Upon calling initUserSessionWithCallback, the same referral params are being received!

This scenario happened multiple times. UserA sent multiple links to UserB, all of which were clicked by UserB. And...UserC received all of the link params, one at a time, at each app relaunch.

Why is this happening? Could this be something that we've incorrectly set-up somehow?

Let me know if you need more details.

Wrong string length used when converting JSON dict to NSData

https://github.com/BranchMetrics/iOS-Deferred-Deep-Linking-SDK/blob/master/Branch-SDK/Branch-SDK/BNCEncodingUtils.m#L200

In method + (NSData *)encodeDictionaryToJsonData:(NSDictionary *)dictionary, you used jsonString.length instead of length of bytes. As a result, if the dictionary contains non-ascii characters, e.g. Asian characters (which happens mostly in carrier field), jsonString.length < length of bytes, so the result NSData is shorter than jsonString, which result in server returning:

Status: 400; Data: {
    error =     {
        code = 400;
        message = "Invalid JSON";
    };
}

Solution is quite strait forward:

+ (NSData *)encodeDictionaryToJsonData:(NSDictionary *)dictionary {
    NSString *jsonString = [BNCEncodingUtils encodeDictionaryToJsonString:dictionary];
    NSUInteger length = [jsonString lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
    return [NSData dataWithBytes:[jsonString UTF8String] length:length];
}

Another solution is use system class NSJSONSerialization instead of custom converter:

[NSJSONSerialization dataWithJSONObject:dictionary options:0 error:&error];

Branch is leaking on iOS 9

Hi looks like there are few leaks detected by instruments from the library version 0.11.4

in - (void)genericHTTPRequest:(NSURLRequest *)request log:(BOOL)log callback:(BNCServerCallback)callback

here the screenshot from the instruments please have a look. Thanks!

screen shot 2015-09-18 at 6 21 15 pm

SDK needs to support apps with multiple URL schemes

Presently the SDK incorrectly assumes that the Branch URL scheme is the first URL scheme in an app's Info.plist. Docs need to be updated to indicate this for apps adding Branch support that may likely already have one or more URL schemes already defined.

Crash in BranchOpenRequest

I'm getting a crash after upgrading to SDK 0.8.1. Reproduced on 3 separate devices.

Thread : Crashed: com.apple.main-thread
0  App                            0x0000000100204fc4 -[BranchOpenRequest processResponse:error:] (BranchOpenRequest.m:115)
1  App                            0x00000001001fe178 __30-[Branch processNextQueueItem]_block_invoke (Branch.m:954)
2  App                            0x00000001001f4e54 __79-[BNCServerInterface genericHTTPRequest:retryNumber:log:callback:retryHandler:]_block_invoke (BNCServerInterface.m:114)
3  CFNetwork                      0x000000018355f310 __67+[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]_block_invoke_2 + 188
4  Foundation                     0x0000000184a831c4 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
5  Foundation                     0x00000001849d4604 -[NSBlockOperation main] + 96
6  Foundation                     0x00000001849c41cc -[__NSOperationInternal _start:] + 636
7  Foundation                     0x0000000184a85f28 __NSOQSchedule_f + 228
8  libdispatch.dylib              0x0000000195a11954 _dispatch_client_callout + 16
9  libdispatch.dylib              0x0000000195a1620c _dispatch_main_queue_callback_4CF + 1608
10 CoreFoundation                 0x0000000183b537f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
11 CoreFoundation                 0x0000000183b518a0 __CFRunLoopRun + 1492
12 CoreFoundation                 0x0000000183a7d2d4 CFRunLoopRunSpecific + 396
13 GraphicsServices               0x000000018d2936fc GSEventRunModal + 168
14 UIKit                          0x0000000188642fac UIApplicationMain + 1488
15 App                            0x00000001000fb0c4 main (main.m:14)
16 libdyld.dylib                  0x0000000195a3ea08 start + 4

Warnings when generating dSYM with 0.11.4

Description

I'm getting several hundred warnings on the "GenerateDSYMFile" step of the build process with warnings such as:

while processing /Users/zac/MyProject/Vendor/Branch.framework/Branch(BNCServerRequest.o):
warning: /var/folders/vw/btz_bylj5vx_7vpzw74lvkbw0000gn/C/org.llvm.clang.derrickstaten/ModuleCache/V72NIT1MFFNB/Foundation-K7W1BMS6PHG4.pcm: No such file or directory
while processing /Users/zac/MyProject/Vendor/Branch.framework/Branch(BNCServerRequest.o):
warning: Could not resolve external type c:objc(cs)NSObject

Please notice the hard-coded clang module cache path.

Steps to Reproduce:

  1. Create a new blank project.
  2. Edit the "Debug Information Format" build configuration to produce "DWARF with dSYM File" when building with the Debug configuration (or just compile with Release).
  3. Integrate the Branch.framework using the Quickstart Guide.
  4. Build the project.

Expected: The project should build with no issues.
Actual: The project produces multiple build warnings relating to the generation of the dSYM.

CoreSpotlight

I got the issue reported as fixed in the last release while updating the pod this morning (to 0.11.4)

  • removes the need to include CoreSpotlight
    I am compiling from Xcode 6.4

Is the patch available in this cocoapod release?

initSessionWithLaunchOptions called multiple times

Branch *branch = [Branch getInstance];
[branch initSessionWithLaunchOptions:launchOptions andRegisterDeepLinkHandler:^(NSDictionary *params, NSError *error){

}

initSessionWithLaunchOptions:launchOptions is called multiple times
.Whenever A Permission is granted .OS calls didBecomeActive which inturn calls your initSessionWithLaunchOptions:launchOptions .

Branch class should have prefix

Since Objective-C doesn't have name space and "Branch" is pretty common word, I would suggest adding BNC prefix to Branch and BranchServerInterface as well.

What do you guys think?

crash in BNCServerRequest

here is the log we got from crashlytics:

Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x2425b5f7 __exceptionPreprocess + 126
1 libobjc.A.dylib 0x31ee5c77 objc_exception_throw + 38
2 CoreFoundation 0x24176841 -[__NSPlaceholderArray initWithObjects:count:] + 428
3 Foundation 0x24f0127d -[NSDictionary(NSDictionary) encodeWithCoder:] + 792
4 Foundation 0x24f00425 _encodeObject + 1068
5 Gogobot 0x001851e9 -BNCServerRequest encodeWithCoder:
6 Foundation 0x24f00425 _encodeObject + 1068
7 Foundation 0x24f067c1 +[NSKeyedArchiver archivedDataWithRootObject:] + 156
8 Gogobot 0x000e88f3 __32-[BNCServerRequestQueue persist]_block_invoke (BNCServerRequestQueue.m:147)
9 Gogobot 0x004347c1 __NR__dispatch_async_block_invoke + 364624
10 libdispatch.dylib 0x32446423 _dispatch_call_block_and_release + 10
11 libdispatch.dylib 0x324505d9 _dispatch_queue_drain$VARIANT$mp + 948
12 libdispatch.dylib 0x324500a9 _dispatch_queue_invoke$VARIANT$mp + 84
13 libdispatch.dylib 0x324520d3 _dispatch_root_queue_drain + 330
14 libdispatch.dylib 0x324531fb _dispatch_worker_thread3 + 106
15 libsystem_pthread.dylib 0x325c3e25 _pthread_wqthread + 668
16 libsystem_pthread.dylib 0x325c3b78 start_wqthread + 8

Fatal Exception: NSInvalidArgumentException
*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]

Crash when backgrounding the app after clearing user defaults.

Hi

We are running version 0.7.7 and found a crash bug. It happens when backgrounding the app after calling

[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:domainName];
Callstack is:
#0  0x00e7dad6 in -[Branch processNextQueueItem] at /Users/gransell/src/iphone-clean/Pods/Branch/Branch-SDK/Branch-SDK/Branch.m:1360
#1  0x00e7cd97 in -[Branch callClose] at /Users/gransell/src/iphone-clean/Pods/Branch/Branch-SDK/Branch-SDK/Branch.m:1253
#2  0x035206d9 in __NSFireTimer ()
#3  0x060ee866 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#4  0x060ee1ed in __CFRunLoopDoTimer ()
#5  0x060ac54a in __CFRunLoopRun ()
#6  0x060aba5b in CFRunLoopRunSpecific ()
#7  0x060ab88b in CFRunLoopRunInMode ()
#8  0x0767c2c9 in GSEventRunModal ()
#9  0x0767c106 in GSEventRun ()
#10 0x0424a106 in UIApplicationMain ()
#11 0x0007943a in main at /Users/gransell/src/iphone-clean/qapital/Supporting Files/main.m:16
#12 0x06a3fac9 in start ()

Let me know if you need any thing else.

Deep link handler not called on launch

Since updating to 0.10.0 I have an issue where the deep link handler is not called on app launch (works fine on resume). Also broken in 0.9.3. I had to downgrade to 0.8.4 to get it working again.

Nothing in *error, it just doesn't get called. I'm not sure if I'm missing something on upgrading.

    Branch *branch = [Branch getInstance];
    [branch initSessionWithLaunchOptions:launchOptions andRegisterDeepLinkHandler:^(NSDictionary *params, NSError *error) {
        if (!error) {
            DDLogDebug(@"Branch deep link params: %@", [params description]);
             [self processBranchPayloadWithParams:params];
        } else {
            DDLogDebug(@"Branch error: %@", error);
        }
    }];
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    DDLogDebug(@"Deep link url: %@", url);
    if ([url.scheme hasPrefix:@"fb"]) {
        return [FBSession.activeSession handleOpenURL:url];
    } else if ([[Branch getInstance] handleDeepLink:url]) {
        return YES;
    } else {
        [self processURLSchemeWithURL:url];
        return YES;
    }
}

setIdentity not updating User ID

I am getting mixed results using setIdentity:

  • When I run a beta build in XCode, the call to setIdentity works only after a fresh install, subsequent calls do not update the identity
  • When i run the same build from TestFlight, the call to setIdentity never has any effect.

I am observing the effect using the dashboard at branch.io

0.11.0 release has min requirement of ios 9

I understand that the 0.11.0 release will have ios dependent features. But many apps will at least have support for ios 8.X for a couple of months. So would it be possible to lower the min os to 8.X for this release?

How to get parameters when the app is in background

When the app is in background we call

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation
{
    if (![[Branch getInstance] handleDeepLink:url]) {
    // do other deep link routing for the Facebook SDK, Pinterest SDK, etc
   } else {
    //handle the link
  }
   return YES;
}

how do I get the url parameters from the link 'myapp://open?link_click_id=12345'. set in my dashboard to navigate to the deep link screen.

Unbalanced transition warning On iOS9

On the first launch of the application, while using Branch I get a warning in the debug log

Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x7f8fe06f2a70>.

I'm pretty sure this is due to the SFSafariViewController that you are presenting in your own UIWindow.

Clear BNCLinkCache on logout

Running into a problem where a user logs out and another user then logs in. We go to generate a referral URL for the new user and it returns the referral URL from the BNCLinkCache for the previous user. Is this by design? Should the link cache be cleared when a user logs out?

Crash in - (void)setIdentity:(NSString *)userId

If user session is not yet initialized when call to setIdentity the app crash trying to create the post dictionary because [BNCPreferenceHelper getDeviceFingerprintID], [BNCPreferenceHelper getSessionID], [BNCPreferenceHelper getIdentityID] return nil values.

sdk v0.6.0 crashes

after updating the SDK to v0.6.0 it crashing inside updateAllRequestsInQueue, on the next action:
[request.postData setValue:[BNCPreferenceHelper getSessionID] forKey:SESSION_ID];
with the next crash:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSDictionaryI 0x1740f4a00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key session_id.'
*** First throw call stack:

Crash report.

Hi there

Here is the log we got from crashlytics

Thread : Crashed: brnch_persist_queue
0  libsystem_kernel.dylib         0x000000019622b270 __pthread_kill + 8
1  libsystem_pthread.dylib        0x00000001962c9170 pthread_kill + 112
2  libsystem_c.dylib              0x00000001961a2b18 abort + 112
3  libsystem_malloc.dylib         0x00000001962663e4 _nano_malloc_check_clear + 318
4  libsystem_malloc.dylib         0x00000001962652f8 nano_free + 192
5  CoreFoundation                 0x0000000184459a88 __CFBinaryPlistWriteOrPresize + 824
6  Foundation                     0x0000000185352668 -[NSKeyedArchiver finishEncoding] + 604
7  Foundation                     0x0000000185358370 +[NSKeyedArchiver archivedDataWithRootObject:] + 212
8  Shareon1.0                     0x00000001002cb6d4 __32-[BNCServerRequestQueue persist]_block_invoke (BNCServerRequestQueue.m:168)
9  libdispatch.dylib              0x00000001960e5994 _dispatch_call_block_and_release + 24
10 libdispatch.dylib              0x00000001960e5954 _dispatch_client_callout + 16
11 libdispatch.dylib              0x00000001960f00a4 _dispatch_queue_drain + 1448
12 libdispatch.dylib              0x00000001960e8a5c _dispatch_queue_invoke + 132
13 libdispatch.dylib              0x00000001960f2318 _dispatch_root_queue_drain + 720
14 libdispatch.dylib              0x00000001960f3c4c _dispatch_worker_thread3 + 108
15 libsystem_pthread.dylib        0x00000001962c522c _pthread_wqthread + 816
16 libsystem_pthread.dylib        0x00000001962c4ef0 start_wqthread + 4

Please click link blow for details.
http://crashes.to/s/1d088edc574

Thank you.

Test failed in iOS9

Hi,
iOS version of branchIO in circleCI is iOS8,so when I use xcode7&iOS9 to run the test, the BNCServerInterfaceTests was failed. After I delete the iOS9 code in BNCServerInterface.m between line 77 and 128, the tests were passed.

Universal links not working

I can't get universal links to work in iOS 9. I followed the guide and everything is setup properly in the app, on the apple dev portal, in the provisioning profiles and in the branch dashboard. Minimum deployment target is iOS 8.2.

I've checked my device logs and it seems there is some error with the apple-app-site-association on the branch website. SSL certificate troubles?

Sep 12 12:19:01 TF6 swcd[270] <Notice>: 2015-09-12 12:19:01.811913 PM [SWC] ### Rejecting URL 'https://htl.st/apple-app-site-association' for auth method 'NSURLAuthenticationMethodServerTrust': -6754/0xFFFFE59E kAuthenticationErr

Bundle id is com.hitlistapp.ios

My entitlements file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>com.apple.developer.associated-domains</key>
        <array>
            <string>applinks:bnc.lt</string>
            <string>applinks:htl.st</string>
        </array>
        <key>com.apple.security.application-groups</key>
        <array>
            <string>group.com.hitlistapp.ios</string>
        </array>
    </dict>
</plist>

SDK breaks iOS 6

Your using several constants not defined on iOS 6, causing a crash on startup.

  • UIActivityTypeAddToReadingList
  • UIActivityTypeAirDrop
  • UIActivityTypePostToFlickr
  • UIActivityTypePostToTencentWeibo
  • UIActivityTypePostToVimeo

iOS 9 minimum SDK?

Hello!
How can I still use Branch with iOS SDK 8 or do I have to update my entire SDK to use Branch? 😄

Branch SDK should be able to tell whether it's running on Debug or Release build

It's currently possible to release an app with just Branch test keys.

This SDK should prevent developers from committing that mistake.

It really should be the responsibility of the Branch SDK to know whether it’s running on a debug or release version of the app. It can use things such as preprocessor macros or environmental variables to be able to determine that.

Then developers would only need a single Branch key!

third party keyboard make crash.

I tired to use TouchPal (one of popular new keyboard app) as my keyboard.
when I click textfield to trigger keyboard. It crashed app.

  • (BOOL)isSimulator {
    UIDevice *currentDevice = [UIDevice currentDevice];
    return [currentDevice.model rangeOfString:@"Simulator"].location != NSNotFound;
    }
    make crash in BNCSystemObserver.

Default iOS keyboard works fine. I think this can affect many cases when user use another keyboard.

crash report.

Hi branch iOS team.

Please check crash report below.

http://crashes.to/s/4cbf00ca0cb

Thread : Crashed: brnch_persist_queue
0  CoreFoundation                 0x23bcb050 __CFBasicHashRehash + 19296
1  libsystem_malloc.dylib         0x3256c887 szone_malloc_should_clear + 2730
2  Foundation                     0x2487116d -[NSKeyedArchiver _initWithOutput:] + 392
3  Foundation                     0x24877bb3 +[NSKeyedArchiver archivedDataWithRootObject:] + 118
4  Shareon1.0                     0x002fbdb9 __32-[BNCServerRequestQueue persist]_block_invoke (BNCServerRequestQueue.m:163)
5  libdispatch.dylib              0x324592e3 _dispatch_call_block_and_release + 10
6  libdispatch.dylib              0x32461729 _dispatch_queue_drain + 1468
7  libdispatch.dylib              0x3245baad _dispatch_queue_invoke + 84
8  libdispatch.dylib              0x32462f9f _dispatch_root_queue_drain + 394
9  libdispatch.dylib              0x324643c3 _dispatch_worker_thread3 + 94
10 libsystem_pthread.dylib        0x325c0dc1 _pthread_wqthread + 668

Callback in "initUserSessionWithCallback" is being called multiple times

I am getting an issue where the callback passed in "initUserSessionWithCallback" is being called each time the app comes to foreground. Why is the callback being called more than once? Should it not be called only once?

When the callback the first time right after clicking on a link, the params list contains information. For each subsequent call, the params list is usually empty, which is good. However...I've encountered cases where the params list is NOT empty for each subsequent call. This results in my welcome alert view appearing more than once.

This is my set-up:

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    [Branch getInstance:@""];

    [[Branch getInstance] initUserSessionWithCallback:^(NSDictionary *params) {
    //This callback is being called each time the app comes to foreground.
    NSLog(@"Referral link data: %@", [params description]);
    if (params.count > 0){
    //Show a welcome alert view based on param values.
    }
    } withLaunchOptions:launchOptions];

    return YES;
    }

-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
if ([[Branch getInstance] handleDeepLink:url]) {
return YES;
}
return NO;
}

Distinguish deep links & new installs

I'd like to be able to tell, preferably within a deep link handler, whether a launch was triggered by a deep link on an existing app or launch options dict on a new install. Can you guys add this to your iOS API?

Referral

Hi All,
how to add referral value at getBranchActivityItemWithParams

Branch API Error: Please specify an app id

I have initialized Branch with my AppID in ApplicationDelegate didFinishLaunchingWithOptions:
[Branch getInstance:@"myAppIDHere"];

However, I sometimes get this error:
Branch API Error: Please specify an app id

And when this error occurs, it just keeps occurring all the time constantly.

Debugging into Branch's code, the getAppKey method in PreferenceHelper was returning NO_STRING_VALUE. Not sure why this would be the case though.

Question about the security issues.

Hi there,
We are using the branch SDK for sending data by link and the data of the link is very personal information.
So I have a question, the data is attached to link is secure?
Or we have to encrypt that data ourselves?

problem in 0.7.4 release

I get Branch-SDK/Branch-SDK/BNCServerInterface.h not found when I try to build with Branch 0.7.4 which I installed via cocoapods

Deployment Target

Hi,
why Branch.framework library deployment target is set to iOS 8.3?
In podspec file platform is set to support iOS 6+ ...

object file (Branch.framework/Branch(Branch.o)) was built for newer iOS version (8.3) than being linked (7.0)

Question - Does getShortURLWithParams generate a unique URL every time?

I wasn't sure where to post this question, so I figured GitHub would be ok.

Does getShortURLWithParams generate a unique URL every time it is called? Say I generate a url with getShortURLWithParams:andChannel:andFeature:andStage:andCallback, and then I immediately call the method again with the same exact params, tags, channel, feature, and stage. What is the expected behavior? Should a unique URL be generated and a new row be added under "Export" on the dashboard?

Thanks, and let me know if there is a more appropriate place to ask this question.

CocoaPod doesn't compile

I just updated to 0.4.0 and it doesn't compile with error message: 'BranchActivityItemProvider.h' file not found

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.