diff options
Diffstat (limited to 'Firebase')
-rw-r--r-- | Firebase/Core/CHANGELOG.md | 2 | ||||
-rw-r--r-- | Firebase/Core/FIRApp.m | 24 | ||||
-rw-r--r-- | Firebase/Core/FIRConfiguration.m | 6 | ||||
-rw-r--r-- | Firebase/Core/FIROptions.m | 39 | ||||
-rw-r--r-- | Firebase/Core/Public/FIRApp.h | 13 | ||||
-rw-r--r-- | Firebase/Core/Public/FIRConfiguration.h | 28 | ||||
-rw-r--r-- | Firebase/Core/Public/FIROptions.h | 19 | ||||
-rw-r--r-- | Firebase/Core/third_party/FIRAppEnvironmentUtil.m | 7 |
8 files changed, 2 insertions, 136 deletions
diff --git a/Firebase/Core/CHANGELOG.md b/Firebase/Core/CHANGELOG.md index 4289cae..f4707ea 100644 --- a/Firebase/Core/CHANGELOG.md +++ b/Firebase/Core/CHANGELOG.md @@ -1,4 +1,6 @@ # Unreleased +- [changed] Removed `UIKit` import from `FIRApp.h`. +- [changed] Removed deprecated methods. # 2018-03-06 -- v4.0.16 -- M22 - [changed] Addresses CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF warnings that surface in newer versions of Xcode and CocoaPods. diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m index c2ce28e..c43db6e 100644 --- a/Firebase/Core/FIRApp.m +++ b/Firebase/Core/FIRApp.m @@ -133,23 +133,6 @@ static NSMutableDictionary *sLibraryVersions; [FIRApp sendNotificationsToSDKs:sDefaultApp]; sDefaultApp.alreadySentConfigureNotification = YES; } - - if (![FIRAppEnvironmentUtil isFromAppStore]) { - // Support for iOS 7 has been deprecated, but will continue to function for the time being. - // Log a notice for developers who are still targeting iOS 7 as the minimum OS version - // supported. - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ - NSDictionary<NSString *, id> *info = [[NSBundle mainBundle] infoDictionary]; - - NSString *minVersion = info[@"MinimumOSVersion"]; - if ([minVersion hasPrefix:@"7."]) { - FIRLogNotice(kFIRLoggerCore, @"I-COR000026", - @"Support for iOS 7 is deprecated and will " - @"stop working in the future. Please upgrade your app to target iOS 8 or " - @"above."); - } - }); - } } } @@ -315,13 +298,6 @@ static NSMutableDictionary *sLibraryVersions; return NO; } - if (NSClassFromString(@"FIRAppIndexing") != nil) { - FIRLogDebug(kFIRLoggerCore, @"I-COR000024", - @"Firebase App Indexing on iOS is deprecated. " - @"You don't need to take any action at this time. Learn more about Firebase App " - @"Indexing at https://firebase.google.com/docs/app-indexing/."); - } - // Initialize the Analytics once there is a valid options under default app. Analytics should // always initialize first by itself before the other SDKs. if ([self.name isEqualToString:kFIRDefaultAppName]) { diff --git a/Firebase/Core/FIRConfiguration.m b/Firebase/Core/FIRConfiguration.m index 02617ef..cd64862 100644 --- a/Firebase/Core/FIRConfiguration.m +++ b/Firebase/Core/FIRConfiguration.m @@ -35,12 +35,6 @@ extern void FIRSetLoggerLevel(FIRLoggerLevel loggerLevel); return self; } -// This is deprecated, use setLoggerLevel instead. -- (void)setLogLevel:(FIRLogLevel)logLevel { - NSAssert(logLevel <= kFIRLogLevelMax, @"Invalid log level, %ld", (long)logLevel); - _logLevel = logLevel; -} - - (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel { NSAssert(loggerLevel <= FIRLoggerLevelMax && loggerLevel >= FIRLoggerLevelMin, @"Invalid logger level, %ld", (long)loggerLevel); diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m index b53fa52..56a56ff 100644 --- a/Firebase/Core/FIROptions.m +++ b/Firebase/Core/FIROptions.m @@ -194,45 +194,6 @@ static NSDictionary *sDefaultOptionsDictionary = nil; #pragma mark - Public instance methods -- (instancetype)initWithGoogleAppID:(NSString *)googleAppID - bundleID:(NSString *)bundleID - GCMSenderID:(NSString *)GCMSenderID - APIKey:(NSString *)APIKey - clientID:(NSString *)clientID - trackingID:(NSString *)trackingID - androidClientID:(NSString *)androidClientID - databaseURL:(NSString *)databaseURL - storageBucket:(NSString *)storageBucket - deepLinkURLScheme:(NSString *)deepLinkURLScheme { - self = [super init]; - if (self) { - if (!googleAppID) { - [NSException raise:kFirebaseCoreErrorDomain format:@"Please specify a valid Google App ID."]; - } else if (!GCMSenderID) { - [NSException raise:kFirebaseCoreErrorDomain format:@"Please specify a valid GCM Sender ID."]; - } - - // `bundleID` is a required property, default to the main `bundleIdentifier` if it's `nil`. - if (!bundleID) { - bundleID = [[NSBundle mainBundle] bundleIdentifier]; - } - - NSMutableDictionary *mutableOptionsDict = [NSMutableDictionary dictionary]; - [mutableOptionsDict setValue:googleAppID forKey:kFIRGoogleAppID]; - [mutableOptionsDict setValue:bundleID forKey:kFIRBundleID]; - [mutableOptionsDict setValue:GCMSenderID forKey:kFIRGCMSenderID]; - [mutableOptionsDict setValue:APIKey forKey:kFIRAPIKey]; - [mutableOptionsDict setValue:clientID forKey:kFIRClientID]; - [mutableOptionsDict setValue:trackingID forKey:kFIRTrackingID]; - [mutableOptionsDict setValue:androidClientID forKey:kFIRAndroidClientID]; - [mutableOptionsDict setValue:databaseURL forKey:kFIRDatabaseURL]; - [mutableOptionsDict setValue:storageBucket forKey:kFIRStorageBucket]; - self.optionsDictionary = mutableOptionsDict; - self.deepLinkURLScheme = deepLinkURLScheme; - } - return self; -} - - (instancetype)initWithContentsOfFile:(NSString *)plistPath { self = [super init]; if (self) { diff --git a/Firebase/Core/Public/FIRApp.h b/Firebase/Core/Public/FIRApp.h index 9610455..fb18b75 100644 --- a/Firebase/Core/Public/FIRApp.h +++ b/Firebase/Core/Public/FIRApp.h @@ -16,11 +16,6 @@ #import <Foundation/Foundation.h> -#if TARGET_OS_IOS -// TODO: Remove UIKit import on next breaking change release -#import <UIKit/UIKit.h> -#endif - @class FIROptions; NS_ASSUME_NONNULL_BEGIN @@ -90,19 +85,11 @@ NS_SWIFT_NAME(FirebaseApp) */ + (nullable FIRApp *)appNamed:(NSString *)name NS_SWIFT_NAME(app(name:)); -#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 /** * Returns the set of all extant FIRApp instances, or nil if there are no FIRApp instances. This * method is thread safe. */ @property(class, readonly, nullable) NSDictionary<NSString *, FIRApp *> *allApps; -#else -/** - * Returns the set of all extant FIRApp instances, or nil if there are no FIRApp instances. This - * method is thread safe. - */ -+ (nullable NSDictionary<NSString *, FIRApp *> *)allApps NS_SWIFT_NAME(allApps()); -#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 /** * Cleans up the current FIRApp, freeing associated data and returning its name to the pool for diff --git a/Firebase/Core/Public/FIRConfiguration.h b/Firebase/Core/Public/FIRConfiguration.h index 05bd261..95bba5e 100644 --- a/Firebase/Core/Public/FIRConfiguration.h +++ b/Firebase/Core/Public/FIRConfiguration.h @@ -19,25 +19,6 @@ #import "FIRAnalyticsConfiguration.h" #import "FIRLoggerLevel.h" -/** - * The log levels used by FIRConfiguration. - */ -typedef NS_ENUM(NSInteger, FIRLogLevel) { - /** Error */ - kFIRLogLevelError __deprecated = 0, - /** Warning */ - kFIRLogLevelWarning __deprecated, - /** Info */ - kFIRLogLevelInfo __deprecated, - /** Debug */ - kFIRLogLevelDebug __deprecated, - /** Assert */ - kFIRLogLevelAssert __deprecated, - /** Max */ - kFIRLogLevelMax __deprecated = kFIRLogLevelAssert -} DEPRECATED_MSG_ATTRIBUTE( - "Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details."); - NS_ASSUME_NONNULL_BEGIN /** @@ -47,21 +28,12 @@ NS_ASSUME_NONNULL_BEGIN NS_SWIFT_NAME(FirebaseConfiguration) @interface FIRConfiguration : NSObject -#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 /** Returns the shared configuration object. */ @property(class, nonatomic, readonly) FIRConfiguration *sharedInstance NS_SWIFT_NAME(shared); -#else -/** Returns the shared configuration object. */ -+ (FIRConfiguration *)sharedInstance NS_SWIFT_NAME(shared()); -#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 /** The configuration class for Firebase Analytics. */ @property(nonatomic, readwrite) FIRAnalyticsConfiguration *analyticsConfiguration; -/** Global log level. Defaults to kFIRLogLevelError. */ -@property(nonatomic, readwrite, assign) FIRLogLevel logLevel DEPRECATED_MSG_ATTRIBUTE( - "Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details."); - /** * Sets the logging level for internal Firebase logging. Firebase will only log messages * that are logged at or below loggerLevel. The messages are logged both to the Xcode diff --git a/Firebase/Core/Public/FIROptions.h b/Firebase/Core/Public/FIROptions.h index b4e3b3b..87a01dd 100644 --- a/Firebase/Core/Public/FIROptions.h +++ b/Firebase/Core/Public/FIROptions.h @@ -91,25 +91,6 @@ NS_SWIFT_NAME(FirebaseOptions) @property(nonatomic, copy, nullable) NSString *storageBucket; /** - * Initializes a customized instance of FIROptions with keys. googleAppID, bundleID and GCMSenderID - * are required. Other keys may required for configuring specific services. - */ -- (instancetype)initWithGoogleAppID:(NSString *)googleAppID - bundleID:(NSString *)bundleID - GCMSenderID:(NSString *)GCMSenderID - APIKey:(NSString *)APIKey - clientID:(NSString *)clientID - trackingID:(NSString *)trackingID - androidClientID:(NSString *)androidClientID - databaseURL:(NSString *)databaseURL - storageBucket:(NSString *)storageBucket - deepLinkURLScheme:(NSString *)deepLinkURLScheme - DEPRECATED_MSG_ATTRIBUTE( - "Use `-[[FIROptions alloc] initWithGoogleAppID:GCMSenderID:]` " - "(`FirebaseOptions(googleAppID:gcmSenderID:)` in Swift)` and property " - "setters instead."); - -/** * Initializes a customized instance of FIROptions from the file at the given plist file path. This * will read the file synchronously from disk. * For example, diff --git a/Firebase/Core/third_party/FIRAppEnvironmentUtil.m b/Firebase/Core/third_party/FIRAppEnvironmentUtil.m index 90e66f0..faee38b 100644 --- a/Firebase/Core/third_party/FIRAppEnvironmentUtil.m +++ b/Firebase/Core/third_party/FIRAppEnvironmentUtil.m @@ -13,9 +13,6 @@ // limitations under the License. #import <Foundation/Foundation.h> -#if TARGET_OS_IOS || TARGET_OS_TV -#import <UIKit/UIKit.h> -#endif #import "FIRAppEnvironmentUtil.h" @@ -207,11 +204,7 @@ static BOOL isAppEncrypted() { } + (NSString *)systemVersion { - #if TARGET_OS_IOS || TARGET_OS_TV - return [UIDevice currentDevice].systemVersion; - #elif TARGET_OS_OSX return [NSProcessInfo processInfo].operatingSystemVersionString; - #endif } + (BOOL)isAppExtension { |