diff options
author | Ryan Wilson <wilsonryan@google.com> | 2017-12-04 17:30:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-04 17:30:57 -0500 |
commit | 7eebb6ec638425460f958a9e61456311e47b03ba (patch) | |
tree | 7b1e8a6c144f06cb8cd0289c4306a613c654aaaa /Firebase | |
parent | ed3e4982f9f0194851509603e5e649e5152ba897 (diff) |
Add log to warn users of iOS 7 deprecation. (#527)
* Add log warning users of iOS 7 deprecation.
* Changed "warning" to "notice".
* Removed DEBUG flag
Diffstat (limited to 'Firebase')
-rw-r--r-- | Firebase/Core/FIRApp.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m index 835a1a4..242fd79 100644 --- a/Firebase/Core/FIRApp.m +++ b/Firebase/Core/FIRApp.m @@ -20,6 +20,7 @@ #import "Private/FIRBundleUtil.h" #import "Private/FIRLogger.h" #import "Private/FIROptionsInternal.h" +#import "third_party/FIRAppEnvironmentUtil.h" NSString *const kFIRServiceAdMob = @"AdMob"; NSString *const kFIRServiceAuth = @"Auth"; @@ -131,6 +132,22 @@ static FIRApp *sDefaultApp; [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."); + } + }); + } } } |