aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase
diff options
context:
space:
mode:
Diffstat (limited to 'Firebase')
-rw-r--r--Firebase/Auth/CHANGELOG.md5
-rw-r--r--Firebase/Auth/Source/FIRAuth.m14
-rw-r--r--Firebase/Auth/Source/FIRAuthAppDelegateProxy.m14
-rw-r--r--Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m15
-rw-r--r--Firebase/Core/CHANGELOG.md8
-rw-r--r--Firebase/Core/FIROptions.m2
-rw-r--r--Firebase/Messaging/CHANGELOG.md4
7 files changed, 56 insertions, 6 deletions
diff --git a/Firebase/Auth/CHANGELOG.md b/Firebase/Auth/CHANGELOG.md
index 5a3fcef..292f8bd 100644
--- a/Firebase/Auth/CHANGELOG.md
+++ b/Firebase/Auth/CHANGELOG.md
@@ -1,9 +1,12 @@
+# v5.0.1
+- Restore 4.x level of support for extensions (#1357).
+
# v5.0.0
- Adds APIs for phone Auth testing to bypass the verification flow (#1192).
- Changes the callback block signature for sign in and create user methods
to provide an AuthDataResult that includes the user and user info (#1123, #1186).
- Removes GoogleToolboxForMac dependency (#1175).
-- Removes misc. deprecated APIs (#1188, #1200)
+- Removes miscellaneous deprecated APIs (#1188, #1200).
# v4.6.1
- Fixes crash which occurred when certain Firebase IDTokens were being parsed (#1076).
diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m
index c83a19a..81008ca 100644
--- a/Firebase/Auth/Source/FIRAuth.m
+++ b/Firebase/Auth/Source/FIRAuth.m
@@ -19,6 +19,7 @@
#import "FIRAuth_Internal.h"
#import <FirebaseCore/FIRAppAssociationRegistration.h>
+#import <FirebaseCore/FIRAppEnvironmentUtil.h>
#import <FirebaseCore/FIRAppInternal.h>
#import <FirebaseCore/FIRLogger.h>
#import <FirebaseCore/FIROptions.h>
@@ -438,7 +439,18 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
_settings = [[FIRAuthSettings alloc] init];
_firebaseAppName = [appName copy];
#if TARGET_OS_IOS
- UIApplication *application = [UIApplication sharedApplication];
+
+ static Class applicationClass = nil;
+ // iOS App extensions should not call [UIApplication sharedApplication], even if UIApplication
+ // responds to it.
+ if (![FIRAppEnvironmentUtil isAppExtension]) {
+ Class cls = NSClassFromString(@"UIApplication");
+ if (cls && [cls respondsToSelector:NSSelectorFromString(@"sharedApplication")]) {
+ applicationClass = cls;
+ }
+ }
+ UIApplication *application = [applicationClass sharedApplication];
+
// Initialize the shared FIRAuthAppDelegateProxy instance in the main thread if not already.
[FIRAuthAppDelegateProxy sharedInstance];
#endif
diff --git a/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m b/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m
index f13e94f..3289b4e 100644
--- a/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m
+++ b/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m
@@ -16,6 +16,8 @@
#import "FIRAuthAppDelegateProxy.h"
+#import <FirebaseCore/FIRAppEnvironmentUtil.h>
+
#import <objc/runtime.h>
NS_ASSUME_NONNULL_BEGIN
@@ -200,8 +202,18 @@ static BOOL isIOS9orLater() {
+ (nullable instancetype)sharedInstance {
static dispatch_once_t onceToken;
static FIRAuthAppDelegateProxy *_Nullable sharedInstance;
+ // iOS App extensions should not call [UIApplication sharedApplication], even if UIApplication
+ // responds to it.
+ static Class applicationClass = nil;
+ if (![FIRAppEnvironmentUtil isAppExtension]) {
+ Class cls = NSClassFromString(@"UIApplication");
+ if (cls && [cls respondsToSelector:NSSelectorFromString(@"sharedApplication")]) {
+ applicationClass = cls;
+ }
+ }
+ UIApplication *application = [applicationClass sharedApplication];
dispatch_once(&onceToken, ^{
- sharedInstance = [[self alloc] initWithApplication:[UIApplication sharedApplication]];
+ sharedInstance = [[self alloc] initWithApplication:application];
});
return sharedInstance;
}
diff --git a/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m b/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m
index a00d0e9..e5aa7f4 100644
--- a/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m
+++ b/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m
@@ -16,6 +16,8 @@
#import "FIRAuthDefaultUIDelegate.h"
+#import <FirebaseCore/FIRAppEnvironmentUtil.h>
+
NS_ASSUME_NONNULL_BEGIN
@interface FIRAuthDefaultUIDelegate ()
@@ -58,8 +60,17 @@ NS_ASSUME_NONNULL_BEGIN
}
+ (id<FIRAuthUIDelegate>)defaultUIDelegate {
- UIViewController *topViewController =
- [UIApplication sharedApplication].keyWindow.rootViewController;
+ // iOS App extensions should not call [UIApplication sharedApplication], even if UIApplication
+ // responds to it.
+ static Class applicationClass = nil;
+ if (![FIRAppEnvironmentUtil isAppExtension]) {
+ Class cls = NSClassFromString(@"UIApplication");
+ if (cls && [cls respondsToSelector:NSSelectorFromString(@"sharedApplication")]) {
+ applicationClass = cls;
+ }
+ }
+ UIApplication *application = [applicationClass sharedApplication];
+ UIViewController *topViewController = application.keyWindow.rootViewController;
while (true){
if (topViewController.presentedViewController) {
topViewController = topViewController.presentedViewController;
diff --git a/Firebase/Core/CHANGELOG.md b/Firebase/Core/CHANGELOG.md
index f4707ea..e1f157a 100644
--- a/Firebase/Core/CHANGELOG.md
+++ b/Firebase/Core/CHANGELOG.md
@@ -1,4 +1,12 @@
# Unreleased
+
+# 2018-05-29 -- v5.0.2 -- M26
+- [changed] Delayed library registration call from `+load` to `+initialize`. (#1305)
+
+# 2018-05-15 -- v5.0.1 -- M25.1
+- [fixed] Eliminated duplicate symbol in CocoaPods `-all_load build` (#1223)
+
+# 2018-05-08 -- v5.0.0 -- M25
- [changed] Removed `UIKit` import from `FIRApp.h`.
- [changed] Removed deprecated methods.
diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m
index 22c9818..ecdd9e9 100644
--- a/Firebase/Core/FIROptions.m
+++ b/Firebase/Core/FIROptions.m
@@ -43,7 +43,7 @@ NSString *const kFIRIsSignInEnabled = @"IS_SIGNIN_ENABLED";
NSString *const kFIRLibraryVersionID =
@"5" // Major version (one or more digits)
@"00" // Minor version (exactly 2 digits)
- @"01" // Build number (exactly 2 digits)
+ @"02" // Build number (exactly 2 digits)
@"000"; // Fixed "000"
// Plist file name.
NSString *const kServiceInfoFileName = @"GoogleService-Info";
diff --git a/Firebase/Messaging/CHANGELOG.md b/Firebase/Messaging/CHANGELOG.md
index 22b5031..a11be06 100644
--- a/Firebase/Messaging/CHANGELOG.md
+++ b/Firebase/Messaging/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 2015-06-12 -- v3.0.2
+- Added a warning message when subscribing to topics with incorrect name formats.
+- Silenced a deprecation warning in FIRMessaging.
+
# 2018-05-29 -- v3.0.1
- Clean up a few deprecation warnings.