Skip to content

Commit

Permalink
Updates for 0.12.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmednawar committed Apr 1, 2016
1 parent cae2194 commit 97073c1
Show file tree
Hide file tree
Showing 15 changed files with 331 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Branch-SDK/Branch-SDK/BNCConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef Branch_SDK_Config_h
#define Branch_SDK_Config_h

#define SDK_VERSION @"0.11.18"
#define SDK_VERSION @"0.12.0"

#define BNC_PROD_ENV
//#define BNC_STAGE_ENV
Expand Down
60 changes: 60 additions & 0 deletions Branch-SDK/Fabric/FABAttributes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
//
// FABAttributes.h
// Fabric
//
// Copyright (C) 2015 Twitter, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#pragma once

#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x)))

#if __has_feature(nullability)
#define fab_nullable nullable
#define fab_nonnull nonnull
#define fab_null_unspecified null_unspecified
#define fab_null_resettable null_resettable
#define __fab_nullable __nullable
#define __fab_nonnull __nonnull
#define __fab_null_unspecified __null_unspecified
#else
#define fab_nullable
#define fab_nonnull
#define fab_null_unspecified
#define fab_null_resettable
#define __fab_nullable
#define __fab_nonnull
#define __fab_null_unspecified
#endif

#ifndef NS_ASSUME_NONNULL_BEGIN
#define NS_ASSUME_NONNULL_BEGIN
#endif

#ifndef NS_ASSUME_NONNULL_END
#define NS_ASSUME_NONNULL_END
#endif


/**
* The following macros are defined here to provide
* backwards compatability. If you are still using
* them you should migrate to the new versions that
* are defined above.
*/
#define FAB_NONNULL __fab_nonnull
#define FAB_NULLABLE __fab_nullable
#define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN
#define FAB_END_NONNULL NS_ASSUME_NONNULL_END
59 changes: 59 additions & 0 deletions Branch-SDK/Fabric/FABKitProtocol.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//
// FABKitProtocol.h
// Fabric
//
// Copyright (C) 2015 Twitter, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import <Foundation/Foundation.h>

/**
* Protocol that a class in a Fabric Kit must conform to to provide information to Fabric at runtime.
*/
@protocol FABKit <NSObject>

@required

/**
* Required. The globally unique identifier of the Kit.
* We encourage the use of reverse-DNS notation.
* Example: @"io.fabric.sdk.ios"
*/
+ (NSString *)bundleIdentifier;

/**
* Required. Must return the current version of the Kit that is being used at runtime.
* We encourage the use of semantic versioning (http://semver.org/), without prefixing the version with a "v".
* This is commonly referred to as the "marketing version".
* Example: @"1.2.3"
*/
+ (NSString *)kitDisplayVersion;

@optional

/**
* The build version of the kit. Should be monotonically increasing and unique.
* Example: 137
*/
+ (NSString *)kitBuildVersion;

/**
* Perform any necessary initialization.
* This method will be invoked on the Kit when the user calls +[Fabric initializeKits].
* @note This method being called does not necessarily imply that the developer has started using the Kit yet.
*/
+ (void)initializeIfNeeded;

@end
38 changes: 38 additions & 0 deletions Branch-SDK/Fabric/Fabric+FABKits.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// Fabric+FABKits.h
// Fabric
//
// Copyright (C) 2015 Twitter, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import "Fabric.h"

@protocol FABKit;
// Use this category for methods that kits can call on Fabric.
@interface Fabric (FABKits)

/**
* Returns a dictionary containing the kit configuration info for the provided kit.
* The configuration information is parsed from the application's Info.plist. This
* method is primarily intended to be used by kits to retrieve their configuration.
*
* @param kitClass The class of the kit whose configuration should be returned.
* It should conform to the FABKit protocol.
*
* @return A dictionary containing kit specific configuration information or nil if none exists.
*/
+ (fab_nonnull NSDictionary *)configurationDictionaryForKitClass:(fab_nonnull Class)kitClass;

@end
67 changes: 67 additions & 0 deletions Branch-SDK/Fabric/Fabric.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//
// Fabric.h
// Fabric
//
// Copyright (C) 2015 Twitter, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

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

NS_ASSUME_NONNULL_BEGIN

/**
* Fabric Base. Coordinates configuration and starts all provided kits.
*/
@interface Fabric : NSObject

/**
* Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use.
*
* For example, in Objective-C:
*
* `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];`
*
* Swift:
*
* `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])`
*
* Only the first call to this method is honored. Subsequent calls are no-ops.
*
* @param kits An array of kit Class objects
*
* @return Returns the shared Fabric instance. In most cases this can be ignored.
*/
+ (instancetype)with:(NSArray *)kitClasses;

/**
* Returns the Fabric singleton object.
*/
+ (instancetype)sharedSDK;

/**
* This BOOL enables or disables debug logging, such as kit version information. The default value is NO.
*/
@property (nonatomic, assign) BOOL debug;

/**
* Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
*/
- (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");

@end

NS_ASSUME_NONNULL_END

28 changes: 20 additions & 8 deletions Branch-TestBed/Branch-TestBed.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@
7D58823A1CA1DF2700FF6358 /* BNCDeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D5882391CA1DF2700FF6358 /* BNCDeviceInfo.m */; };
7E6B3B561AA42D0E005F45BF /* Branch_SDK_Functionality_Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E6B3B551AA42D0E005F45BF /* Branch_SDK_Functionality_Tests.m */; };
9F4BE02E2EFA48B94EB8CEAD /* libPods-Branch-SDK-Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA508DAFBC70E7B594A5D76C /* libPods-Branch-SDK-Tests.a */; };
E214D3801CADFD58007FF922 /* FABAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = E214D37C1CADFD58007FF922 /* FABAttributes.h */; };
E214D3811CADFD58007FF922 /* FABKitProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = E214D37D1CADFD58007FF922 /* FABKitProtocol.h */; };
E214D3821CADFD58007FF922 /* Fabric.h in Headers */ = {isa = PBXBuildFile; fileRef = E214D37E1CADFD58007FF922 /* Fabric.h */; };
E214D3831CADFD58007FF922 /* Fabric+FABKits.h in Headers */ = {isa = PBXBuildFile; fileRef = E214D37F1CADFD58007FF922 /* Fabric+FABKits.h */; };
E2546CDA1C82B164006AD5D2 /* BranchSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = E2546CD91C82B164006AD5D2 /* BranchSDK.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -291,10 +295,10 @@
D258D2C41A794D64004A1C90 /* BranchActivityItemProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchActivityItemProvider.h; sourceTree = "<group>"; };
D258D2C51A794D64004A1C90 /* BranchActivityItemProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchActivityItemProvider.m; sourceTree = "<group>"; };
D85A06FB422AB22B126B40DE /* libPods-Branch-SDK Load Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Branch-SDK Load Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E220F4241C7D39CD00F5B126 /* FABAttributes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FABAttributes.h; sourceTree = "<group>"; };
E220F4251C7D39CD00F5B126 /* FABKitProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FABKitProtocol.h; sourceTree = "<group>"; };
E220F4261C7D39CD00F5B126 /* Fabric.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Fabric.h; sourceTree = "<group>"; };
E220F4271C7D39CD00F5B126 /* Fabric+FABKits.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Fabric+FABKits.h"; sourceTree = "<group>"; };
E214D37C1CADFD58007FF922 /* FABAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FABAttributes.h; sourceTree = "<group>"; };
E214D37D1CADFD58007FF922 /* FABKitProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FABKitProtocol.h; sourceTree = "<group>"; };
E214D37E1CADFD58007FF922 /* Fabric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Fabric.h; sourceTree = "<group>"; };
E214D37F1CADFD58007FF922 /* Fabric+FABKits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Fabric+FABKits.h"; sourceTree = "<group>"; };
E2546CD91C82B164006AD5D2 /* BranchSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BranchSDK.h; sourceTree = "<group>"; };
FDC715ABABBD5DC03AF5936B /* libPods-Branch-SDK Debugger Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Branch-SDK Debugger Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -570,10 +574,10 @@
E220F4281C7D39D500F5B126 /* Fabric */ = {
isa = PBXGroup;
children = (
E220F4241C7D39CD00F5B126 /* FABAttributes.h */,
E220F4251C7D39CD00F5B126 /* FABKitProtocol.h */,
E220F4261C7D39CD00F5B126 /* Fabric.h */,
E220F4271C7D39CD00F5B126 /* Fabric+FABKits.h */,
E214D37C1CADFD58007FF922 /* FABAttributes.h */,
E214D37D1CADFD58007FF922 /* FABKitProtocol.h */,
E214D37E1CADFD58007FF922 /* Fabric.h */,
E214D37F1CADFD58007FF922 /* Fabric+FABKits.h */,
);
name = Fabric;
sourceTree = "<group>";
Expand All @@ -595,6 +599,7 @@
buildActionMask = 2147483647;
files = (
466B58721B17780A00A69EDE /* Branch.h in Headers */,
E214D3831CADFD58007FF922 /* Fabric+FABKits.h in Headers */,
466B587E1B17780A00A69EDE /* BranchActivityItemProvider.h in Headers */,
46946B9A1B2689A100627BCC /* BranchCreditHistoryRequest.h in Headers */,
46946B871B26898E00627BCC /* BranchLogoutRequest.h in Headers */,
Expand All @@ -607,11 +612,13 @@
466D5A111B5991E3009DB845 /* BNCContentDiscoveryManager.h in Headers */,
466B58741B17780A00A69EDE /* BNCPreferenceHelper.h in Headers */,
54391A151BA249FA0061CB0F /* BranchCSSearchableItemAttributeSet.h in Headers */,
E214D3821CADFD58007FF922 /* Fabric.h in Headers */,
466B58791B17780A00A69EDE /* BNCConfig.h in Headers */,
E2546CDA1C82B164006AD5D2 /* BranchSDK.h in Headers */,
7D4DAC271C8FA908008E37DB /* BranchViewHandler.h in Headers */,
54FF1F8D1BD1D4AE0004CE2E /* BranchUniversalObject.h in Headers */,
46946B9F1B2689A100627BCC /* BranchShortUrlSyncRequest.h in Headers */,
E214D3811CADFD58007FF922 /* FABKitProtocol.h in Headers */,
46946B9E1B2689A100627BCC /* BranchShortUrlRequest.h in Headers */,
46946B9D1B2689A100627BCC /* BranchApplyPromoCodeRequest.h in Headers */,
466B58781B17780A00A69EDE /* BNCServerRequestQueue.h in Headers */,
Expand All @@ -631,6 +638,7 @@
466B58771B17780A00A69EDE /* BNCSystemObserver.h in Headers */,
7D4DAC211C8FA8C0008E37DB /* BranchView.h in Headers */,
46946B881B26899100627BCC /* BranchUserCompletedActionRequest.h in Headers */,
E214D3801CADFD58007FF922 /* FABAttributes.h in Headers */,
466B587A1B17780A00A69EDE /* BNCError.h in Headers */,
46946BA01B2689A100627BCC /* BranchCloseRequest.h in Headers */,
);
Expand Down Expand Up @@ -1052,6 +1060,7 @@
670016931940F51400A9E103 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_ENTITLEMENTS = "Branch-TestBed/Branch-TestBed.entitlements";
Expand All @@ -1064,13 +1073,15 @@
PRODUCT_BUNDLE_IDENTIFIER = "io.branch.sdk.Branch-TestBed";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
USER_HEADER_SEARCH_PATHS = $PROJECT_DIR;
WRAPPER_EXTENSION = app;
};
name = Debug;
};
670016941940F51400A9E103 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_ENTITLEMENTS = "Branch-TestBed/Branch-TestBed.entitlements";
Expand All @@ -1083,6 +1094,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "io.branch.sdk.Branch-TestBed";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
USER_HEADER_SEARCH_PATHS = $PROJECT_DIR;
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
58 changes: 58 additions & 0 deletions Branch.framework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?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>$(PRODUCT_BUNDLE_IDENTIFIER)</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.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>branchtest</string>
</array>
</dict>
</array>
<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>
<key>branch_key</key>
<dict>
<key>live</key>
<string>key_live_jbgnjxvlhSb6PGH23BhO4hiflcp3y8kx</string>
<key>test</key>
<string>key_test_jkptOCZtmtxhOMZ11ynbXecdDCd93cbr</string>
</dict>
</dict>
</plist>
Loading

0 comments on commit 97073c1

Please sign in to comment.