diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2015-11-09 17:08:00 -0800 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-11-09 17:35:43 -0800 |
commit | f5a058640884714ae3ff1e1ed9eb75b0ffdb22b3 (patch) | |
tree | e12ea3faefb08f3eaeb3082d129d2e92ff87a801 /platform/ios/vendor/Fabric | |
parent | 83ea5be413d7d2f605062d6e392e7e9b2ddb83fe (diff) | |
download | qtlocation-mapboxgl-f5a058640884714ae3ff1e1ed9eb75b0ffdb22b3.tar.gz |
move from Fabric framework to bare headers per Twitter recommendation
Rolls back part of #2742
Diffstat (limited to 'platform/ios/vendor/Fabric')
l--------- | platform/ios/vendor/Fabric | 1 | ||||
-rw-r--r-- | platform/ios/vendor/Fabric/FABAttributes.h | 49 | ||||
-rw-r--r-- | platform/ios/vendor/Fabric/FABKitProtocol.h | 46 | ||||
-rw-r--r-- | platform/ios/vendor/Fabric/Fabric+FABKits.h | 25 | ||||
-rw-r--r-- | platform/ios/vendor/Fabric/Fabric.h | 54 |
5 files changed, 174 insertions, 1 deletions
diff --git a/platform/ios/vendor/Fabric b/platform/ios/vendor/Fabric deleted file mode 120000 index e10e5326dd..0000000000 --- a/platform/ios/vendor/Fabric +++ /dev/null @@ -1 +0,0 @@ -Fabric.framework/Headers
\ No newline at end of file diff --git a/platform/ios/vendor/Fabric/FABAttributes.h b/platform/ios/vendor/Fabric/FABAttributes.h new file mode 100644 index 0000000000..c3c6238503 --- /dev/null +++ b/platform/ios/vendor/Fabric/FABAttributes.h @@ -0,0 +1,49 @@ +// +// FABAttributes.h +// Fabric +// +// Created by Priyanka Joshi on 3/3/15. +// Copyright (c) 2015 Twitter. All rights reserved. +// + +#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 diff --git a/platform/ios/vendor/Fabric/FABKitProtocol.h b/platform/ios/vendor/Fabric/FABKitProtocol.h new file mode 100644 index 0000000000..53e0656de0 --- /dev/null +++ b/platform/ios/vendor/Fabric/FABKitProtocol.h @@ -0,0 +1,46 @@ +// +// FABKitProtocol.h +// +// Copyright (c) 2015 Twitter. All rights reserved. +// + +#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 diff --git a/platform/ios/vendor/Fabric/Fabric+FABKits.h b/platform/ios/vendor/Fabric/Fabric+FABKits.h new file mode 100644 index 0000000000..05e9630210 --- /dev/null +++ b/platform/ios/vendor/Fabric/Fabric+FABKits.h @@ -0,0 +1,25 @@ +// +// Fabric+FABKits.h +// +// Copyright (c) 2015 Twitter. All rights reserved. +// + +#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 diff --git a/platform/ios/vendor/Fabric/Fabric.h b/platform/ios/vendor/Fabric/Fabric.h new file mode 100644 index 0000000000..8673be4827 --- /dev/null +++ b/platform/ios/vendor/Fabric/Fabric.h @@ -0,0 +1,54 @@ +// +// Fabric.h +// +// Copyright (c) 2015 Twitter. All rights reserved. +// + +#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 + |