Skip to content

Instantly share code, notes, and snippets.

View aaustin's full-sized avatar

Alex Austin aaustin

View GitHub Profile
@aaustin
aaustin / Branch-Android-README.md
Last active August 29, 2015 14:02
Temporary Android SDK docs
@aaustin
aaustin / Branch iOS SDK.md
Created June 10, 2014 23:14
Branch iOS SDK Public Docs

BRANCH IOS MOBILE CHALLENGE

Thanks for your interest in Branch!

Specs

The challenge is to build a crash-resistent, and globally accesssible queue (+ extra) for our iOS SDK. Using Objective C, build a queue that holds ServerRequest custom objects (see below for the spec on that).

Some specs:

  1. The same instance of the queue should be accessible anywhere in the app without passing it as a parameter. For example, the state of the queue to persist throughout the entire life cycle of the application, and be accessible from any View Controller. That means, in View Controller 1, a user could insert a ServerRequest object into the queue. Then in View Controller 2, the user could consume that same ServerRequest object.

BRANCH ANDROID MOBILE CHALLENGE

Thanks for your interest in Branch!

Specs

The challenge is to build a crash-resistent, and globally accessible queue (+ extra) for our Android SDK. Using Java, build a queue that holds String objects

Some specs:

  1. The same instance of the queue should be accessible anywhere in the app without passing it as a parameter. For example, the state of the queue to persist throughout the entire life cycle of the application, and be accessible from any Activity. That means, in Activity 1, a user could insert a String object into the queue. Then in Activity 2, the user could consume that same String object.
@aaustin
aaustin / gist:317c37ae442060c4f6a6
Created November 4, 2014 21:31
Dispatcher issue
hey alex
you there by any chance?
is it possible that you dont send the "identity" field anymore when you call the webhook if i've opened the app once through a deep link?
i just double checked that i'm calling identityUser
and the payloads i'm receiving from you on the webhook endpoint are as follows:
reqBody: { [-]
event: Viewed JobImpression
metadata: { [-]
ip: 38.122.182.107
jobId: I1084382446
@aaustin
aaustin / gist:b13e83090397cdd9ee1a
Last active August 29, 2015 14:22
Product Management Trial

Branch Product Management Trial

The purpose of this exercise is to give the team at Branch some insight into the way you think, and your style of product design. There's no time limit to complete the exercise.

Deliverable

Design spec document to alex@branch.io

Challenge

<head>
<link rel="alternate" href="imdb://title/tt0117500/" />
< -- ! other stuff -- >
</head>
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *))restorationHandler {
BOOL handledByBranch = [[Branch getInstance] continueUserActivity:userActivity];
return handledByBranch;
}
@aaustin
aaustin / ul-init.m
Last active September 21, 2015 17:36
[[Branch getInstance] initSessionWithLaunchOptions:launchOptions andRegisterDeepLinkHandler:^(NSDictionary *deepLinkParams, NSError *error) {
if (!error) {
NSLog(@"finished init with params = %@", [deepLinkParams description]);
if ([deepLinkParams objectForKey:@"object_id"]) {
UINavigationController *navController = (UINavigationController *)self.window.rootViewController;
NSString * storyboardName = @"Main";
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle: nil];
UIViewController *nextVC = [storyboard instantiateViewControllerWithIdentifier:@"ObjectViewController"];
[navController setViewControllers:@[nextVC] animated:YES];
}