5 // Copyright (C) 2015 Twitter, Inc.
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
20 #import <Foundation/Foundation.h>
21 #import "FABAttributes.h"
23 NS_ASSUME_NONNULL_BEGIN
26 #if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000
27 #error "Fabric's minimum iOS version is 6.0"
30 #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
31 #error "Fabric's minimum OS X version is 10.7"
36 * Fabric Base. Coordinates configuration and starts all provided kits.
38 @interface Fabric : NSObject
41 * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use.
43 * For example, in Objective-C:
45 * `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];`
49 * `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])`
51 * Only the first call to this method is honored. Subsequent calls are no-ops.
53 * @param kitClasses An array of kit Class objects
55 * @return Returns the shared Fabric instance. In most cases this can be ignored.
57 + (instancetype)with:(NSArray *)kitClasses;
60 * Returns the Fabric singleton object.
62 + (instancetype)sharedSDK;
65 * This BOOL enables or disables debug logging, such as kit version information. The default value is NO.
67 @property (nonatomic, assign) BOOL debug;
70 * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
72 - (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");
75 * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
77 + (instancetype)new FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");