Skip to content

Commit

Permalink
chore: update ios dependency, reinstall framework
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-bansil committed Aug 10, 2016
1 parent 52eec48 commit 7dd6fc9
Show file tree
Hide file tree
Showing 28 changed files with 1,779 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/ios/BranchNPM.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BRANCH_NPM true
//empty
2 changes: 1 addition & 1 deletion src/ios/dependencies/Branch-SDK/BNCFabricAnswers.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import "BNCFabricAnswers.h"
#import "BNCPreferenceHelper.h"
#import "../Fabric/Answers.h"
#import "Answers.h"

@implementation BNCFabricAnswers

Expand Down
2 changes: 1 addition & 1 deletion src/ios/dependencies/Branch-SDK/BNCPreferenceHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import "BNCEncodingUtils.h"
#import "BNCConfig.h"
#import "Branch.h"
#import "../Fabric/Fabric+FABKits.h"
#import "Fabric+FABKits.h"

static const NSTimeInterval DEFAULT_TIMEOUT = 5.5;
static const NSTimeInterval DEFAULT_RETRY_INTERVAL = 0;
Expand Down
14 changes: 2 additions & 12 deletions src/ios/dependencies/Branch-SDK/Branch.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,18 +407,8 @@ typedef NS_ENUM(NSUInteger, BranchCreditHistoryOrder) {
- (void)disableCookieBasedMatching;

/**
TL;DR: If you're using a version of the Facebook SDK that prevents application:didFinishLaunchingWithOptions: from
returning YES/true when a Universal Link is clicked, you should enable this option.
Long explanation: in application:didFinishLaunchingWithOptions: you should choose one of the following:
1. Always `return YES;`, and do *not* invoke `[[Branch getInstance] accountForFacebookSDKPreventingAppLaunch];`
2. Allow the Facebook SDK to determine whether `application:didFinishLaunchingWithOptions:` returns `YES` or `NO`,
and invoke `[[Branch getInstance] accountForFacebookSDKPreventingAppLaunch];`
The reason for this second option is that the Facebook SDK will return `NO` if a Universal Link opens the app
but that UL is not a Facebook UL. Some developers prefer not to modify
`application:didFinishLaunchingWithOptions:` to always return `YES` and should use this method instead.
If you're using a version of the Facebook SDK that prevents application:didFinishLaunchingWithOptions: from returning
YES/true when a Universal Link is clicked, you should enable this option.
*/
- (void)accountForFacebookSDKPreventingAppLaunch;

Expand Down
4 changes: 2 additions & 2 deletions src/ios/dependencies/Branch-SDK/Branch.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
#import "BranchRegisterViewRequest.h"

//Fabric
#import "../Fabric/FABKitProtocol.h"
#import "../Fabric/Fabric+FABKits.h"
#import "FABKitProtocol.h"
#import "Fabric+FABKits.h"

NSString * const BRANCH_FEATURE_TAG_SHARE = @"share";
NSString * const BRANCH_FEATURE_TAG_REFERRAL = @"referral";
Expand Down
15 changes: 0 additions & 15 deletions src/ios/dependencies/Branch-SDK/BranchSDK.h

This file was deleted.

1 change: 1 addition & 0 deletions src/ios/dependencies/Branch.framework/Branch
1 change: 1 addition & 0 deletions src/ios/dependencies/Branch.framework/Headers
42 changes: 42 additions & 0 deletions src/ios/dependencies/Branch.framework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?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>AppIdentifierPrefix</key>
<string>$(AppIdentifierPrefix)</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>io.branch.sdk.ios</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.12.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
framework module Branch {
umbrella header "Branch.h"

export *
module * { export * }

link framework "CoreTelephony"
link framework "MobileCoreServices"
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// BNCCallbacks.h
// Branch-TestBed
//
// Created by Ahmed Nawar on 6/18/16.
// Copyright © 2016 Branch Metrics. All rights reserved.
//

#ifndef BNCCallbacks_h
#define BNCCallbacks_h

@class BranchUniversalObject, BranchLinkProperties;

typedef void (^callbackWithParams) (NSDictionary *params, NSError *error);
typedef void (^callbackWithUrl) (NSString *url, NSError *error);
typedef void (^callbackWithStatus) (BOOL changed, NSError *error);
typedef void (^callbackWithList) (NSArray *list, NSError *error);
typedef void (^callbackWithUrlAndSpotlightIdentifier) (NSString *url, NSString *spotlightIdentifier, NSError *error);
typedef void (^callbackWithBranchUniversalObject) (BranchUniversalObject *universalObject, BranchLinkProperties *linkProperties, NSError *error);

#endif /* BNCCallbacks_h */
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// BNCConfig.h
// Branch-SDK
//
// Created by Qinwei Gong on 10/6/14.
// Copyright (c) 2014 Branch Metrics. All rights reserved.
//

#ifndef Branch_SDK_Config_h
#define Branch_SDK_Config_h

#define SDK_VERSION @"0.12.5"

#define BNC_PROD_ENV
//#define BNC_STAGE_ENV
//#define BNC_DEV_ENV

#ifdef BNC_PROD_ENV
#define BNC_API_BASE_URL @"https://api.branch.io"
#endif

#ifdef BNC_STAGE_ENV
#define BNC_API_BASE_URL @"http://api.dev.branch.io"
#endif

#define BNC_LINK_URL @"https://bnc.lt"

#ifdef BNC_DEV_ENV
#define BNC_API_BASE_URL @"http://localhost:3001"
#endif

#define BNC_API_VERSION @"v1"

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// BNCLinkCache.h
// Branch-SDK
//
// Created by Qinwei Gong on 1/23/15.
// Copyright (c) 2015 Branch Metrics. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BNCLinkData.h"

@interface BNCLinkCache : NSObject

- (void)setObject:(NSString *)anObject forKey:(BNCLinkData *)aKey;
- (NSString *)objectForKey:(BNCLinkData *)aKey;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// BNCLinkData.h
// Branch-SDK
//
// Created by Qinwei Gong on 1/22/15.
// Copyright (c) 2015 Branch Metrics. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, BranchLinkType) {
BranchLinkTypeUnlimitedUse = 0,
BranchLinkTypeOneTimeUse = 1
};

@interface BNCLinkData : NSObject

@property (strong, nonatomic) NSMutableDictionary *data;

- (void)setupTags:(NSArray *)tags;
- (void)setupAlias:(NSString *)alias;
- (void)setupType:(BranchLinkType)type;
- (void)setupChannel:(NSString *)channel;
- (void)setupFeature:(NSString *)feature;
- (void)setupStage:(NSString *)stage;
- (void)setupParams:(NSDictionary *)params;
- (void)setupMatchDuration:(NSUInteger)duration;
- (void)setupIgnoreUAString:(NSString *)ignoreUAString;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//
// BNCPreferenceHelper.h
// Branch-SDK
//
// Created by Alex Austin on 6/6/14.
// Copyright (c) 2014 Branch Metrics. All rights reserved.
//

#import <Foundation/Foundation.h>

#define FILE_NAME [[NSString stringWithUTF8String:__FILE__] lastPathComponent]
#define LINE_NUM __LINE__

@interface BNCPreferenceHelper : NSObject

@property (strong, nonatomic) NSString *branchKey;
@property (strong, nonatomic) NSString *lastRunBranchKey;
@property (strong, nonatomic) NSDate *lastStrongMatchDate;
@property (strong, nonatomic) NSString *appVersion;
@property (strong, nonatomic) NSString *deviceFingerprintID;
@property (strong, nonatomic) NSString *sessionID;
@property (strong, nonatomic) NSString *identityID;
@property (strong, nonatomic) NSString *linkClickIdentifier;
@property (strong, nonatomic) NSString *spotlightIdentifier;
@property (strong, nonatomic) NSString *universalLinkUrl;
@property (strong, nonatomic) NSString *userUrl;
@property (strong, nonatomic) NSString *userIdentity;
@property (strong, nonatomic) NSString *sessionParams;
@property (strong, nonatomic) NSString *installParams;
@property (assign, nonatomic) BOOL isDebug;
@property (assign, nonatomic) BOOL shouldWaitForInit;
@property (assign, nonatomic) BOOL suppressWarningLogs;
@property (assign, nonatomic) BOOL checkedFacebookAppLinks;
@property (assign, nonatomic) NSInteger retryCount;
@property (assign, nonatomic) NSTimeInterval retryInterval;
@property (assign, nonatomic) NSTimeInterval timeout;
@property (strong, nonatomic) NSString *externalIntentURI;

+ (BNCPreferenceHelper *)preferenceHelper;

- (NSString *)getAPIBaseURL;
- (NSString *)getAPIURL:(NSString *)endpoint;
- (NSString *)getEndpointFromURL:(NSString *)url;

- (NSString *)getBranchKey:(BOOL)isLive;

- (void)clearUserCreditsAndCounts;
- (void)clearUserCredits;

- (id)getBranchUniversalLinkDomains;

- (void)setCreditCount:(NSInteger)count;
- (void)setCreditCount:(NSInteger)count forBucket:(NSString *)bucket;
- (void)removeCreditCountForBucket:(NSString *)bucket;
- (NSDictionary *)getCreditDictionary;
- (NSInteger)getCreditCount;
- (NSInteger)getCreditCountForBucket:(NSString *)bucket;

- (void)updateBranchViewCount:(NSString *)branchViewID;
- (NSInteger)getBranchViewCount:(NSString *)branchViewID;

- (void)setRequestMetadataKey:(NSString *)key value:(NSObject *)value;
- (NSMutableDictionary *)requestMetadataDictionary;

- (void)addInstrumentationDictionaryKey:(NSString *)key value:(NSString *)value;
- (NSMutableDictionary *)instrumentationDictionary;
- (void)clearInstrumentationDictionary;

- (void)log:(NSString *)filename line:(int)line message:(NSString *)format, ...;
- (void)logWarning:(NSString *)message;
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// BNCServerInterface.h
// Branch-SDK
//
// Created by Alex Austin on 6/4/14.
// Copyright (c) 2014 Branch Metrics. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BNCServerResponse.h"
#import "BNCPreferenceHelper.h"

typedef void (^BNCServerCallback)(BNCServerResponse *response, NSError *error);

@interface BNCServerInterface : NSObject

@property (strong, nonatomic) BNCPreferenceHelper *preferenceHelper;

- (BNCServerResponse *)getRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)key;
- (BNCServerResponse *)getRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)key log:(BOOL)log;
- (void)getRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)key callback:(BNCServerCallback)callback;
- (void)getRequest:(NSDictionary *)params url:(NSString *)url key:(NSString *)key log:(BOOL)log callback:(BNCServerCallback)callback;

- (BNCServerResponse *)postRequest:(NSDictionary *)post url:(NSString *)url key:(NSString *)key log:(BOOL)log;
- (void)postRequest:(NSDictionary *)post url:(NSString *)url key:(NSString *)key callback:(BNCServerCallback)callback;
- (void)postRequest:(NSDictionary *)post url:(NSString *)url key:(NSString *)key log:(BOOL)log callback:(BNCServerCallback)callback;

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

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// BNCServerRequest.h
// Branch-SDK
//
// Created by Alex Austin on 6/5/14.
// Copyright (c) 2014 Branch Metrics. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BNCServerInterface.h"

@interface BNCServerRequest : NSObject <NSCoding>

- (void)makeRequest:(BNCServerInterface *)serverInterface key:(NSString *)key callback:(BNCServerCallback)callback;
- (void)processResponse:(BNCServerResponse *)response error:(NSError *)error;
- (void)safeSetValue:(NSObject *)value forKey:(NSString *)key onDict:(NSMutableDictionary *)dict;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// BNCServerRequestQueue.h
// Branch-SDK
//
// Created by Qinwei Gong on 9/6/14.
//
//

#import "BNCServerRequest.h"

@class BranchOpenRequest;

@interface BNCServerRequestQueue : NSObject

@property (nonatomic, readonly) unsigned int size;

- (void)enqueue:(BNCServerRequest *)request;
- (BNCServerRequest *)dequeue;
- (BNCServerRequest *)peek;
- (BNCServerRequest *)peekAt:(unsigned int)index;
- (void)insert:(BNCServerRequest *)request at:(unsigned int)index;
- (BNCServerRequest *)removeAt:(unsigned int)index;
- (void)remove:(BNCServerRequest *)request;
- (void)persistEventually;
- (void)persistImmediately;
- (void)clearQueue;

- (BOOL)containsInstallOrOpen;
- (BOOL)containsClose;
- (BranchOpenRequest *)moveInstallOrOpenToFront:(NSInteger)networkCount;

+ (id)getInstance;

@end
Loading

0 comments on commit 7dd6fc9

Please sign in to comment.