From 7eebb6ec638425460f958a9e61456311e47b03ba Mon Sep 17 00:00:00 2001 From: Ryan Wilson Date: Mon, 4 Dec 2017 17:30:57 -0500 Subject: 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 --- Firebase/Core/FIRApp.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Firebase/Core/FIRApp.m') 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 *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."); + } + }); + } } } -- cgit v1.2.3