-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cae2194
commit 97073c1
Showing
15 changed files
with
331 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.