aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Auth
diff options
context:
space:
mode:
authorGravatar Ivan <gonzalezivan@google.com>2017-10-23 11:39:10 -0700
committerGravatar Ivan <gonzalezivan@google.com>2017-10-23 11:39:10 -0700
commit4cf46e4123b91a29b1bd8749e3717aa33243bc66 (patch)
tree0f6deb62b8aa09a29bf9b3c9b0d034e30ff7491b /Firebase/Auth
parent9f6f9693345607198750d99892a21e2fdb77fc79 (diff)
parent642d304e2334568e3b1c45bfc1036a784aad8158 (diff)
Merge branch 'master' of https://github.com/firebase/firebase-ios-sdk into fix-reason-parameter
Diffstat (limited to 'Firebase/Auth')
-rw-r--r--Firebase/Auth/CHANGELOG.md3
-rw-r--r--Firebase/Auth/FirebaseAuth.podspec2
-rw-r--r--Firebase/Auth/Source/FIRAuthAppDelegateProxy.m18
-rw-r--r--Firebase/Auth/Source/FIRAuthURLPresenter.m7
4 files changed, 28 insertions, 2 deletions
diff --git a/Firebase/Auth/CHANGELOG.md b/Firebase/Auth/CHANGELOG.md
index 74a2730..93ea24d 100644
--- a/Firebase/Auth/CHANGELOG.md
+++ b/Firebase/Auth/CHANGELOG.md
@@ -1,3 +1,6 @@
+# v4.3.1
+- Internal clean up.
+
# v4.3.0
- Provides account creation and last sign-in dates as metadata to the user
object.
diff --git a/Firebase/Auth/FirebaseAuth.podspec b/Firebase/Auth/FirebaseAuth.podspec
index 148ff90..a51d625 100644
--- a/Firebase/Auth/FirebaseAuth.podspec
+++ b/Firebase/Auth/FirebaseAuth.podspec
@@ -4,7 +4,7 @@
Pod::Spec.new do |s|
s.name = 'FirebaseAuth'
- s.version = '4.3.0'
+ s.version = '4.3.1'
s.summary = 'Firebase Open Source Libraries for iOS.'
s.description = <<-DESC
diff --git a/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m b/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m
index 8899407..f13e94f 100644
--- a/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m
+++ b/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m
@@ -40,6 +40,22 @@ static id noop(id object, SEL cmd, ...) {
}
#endif
+/** @fn isIOS9orLater
+ @brief Checks whether the iOS version is 9 or later.
+ @returns Whether the iOS version is 9 or later.
+ */
+static BOOL isIOS9orLater() {
+#if defined(__IPHONE_11_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0)
+ if (@available(iOS 9.0, *)) {
+ return YES;
+ }
+ return NO;
+#else
+ // UIApplicationOpenURLOptionsAnnotationKey is only available on iOS 9+.
+ return &UIApplicationOpenURLOptionsAnnotationKey != NULL;
+#endif
+}
+
@implementation FIRAuthAppDelegateProxy {
/** @var _appDelegate
@brief The application delegate whose method is being swizzled.
@@ -119,7 +135,7 @@ static id noop(id object, SEL cmd, ...) {
SEL openURLOptionsSelector = @selector(application:openURL:options:);
SEL openURLAnnotationSelector = @selector(application:openURL:sourceApplication:annotation:);
SEL handleOpenURLSelector = @selector(application:handleOpenURL:);
- if (&UIApplicationOpenURLOptionsAnnotationKey && // the constant is only available on iOS 9+
+ if (isIOS9orLater() &&
([_appDelegate respondsToSelector:openURLOptionsSelector] ||
(![_appDelegate respondsToSelector:openURLAnnotationSelector] &&
![_appDelegate respondsToSelector:handleOpenURLSelector]))) {
diff --git a/Firebase/Auth/Source/FIRAuthURLPresenter.m b/Firebase/Auth/Source/FIRAuthURLPresenter.m
index 919aee1..5526a85 100644
--- a/Firebase/Auth/Source/FIRAuthURLPresenter.m
+++ b/Firebase/Auth/Source/FIRAuthURLPresenter.m
@@ -30,6 +30,11 @@ NS_ASSUME_NONNULL_BEGIN
FIRAuthWebViewControllerDelegate>
@end
+// Disable unguarded availability warnings because SFSafariViewController is been used throughout
+// the code, including as an iVar, which cannot be simply excluded by @available check.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
+
@implementation FIRAuthURLPresenter {
/** @var _isPresenting
@brief Whether or not some web-based content is being presented.
@@ -176,6 +181,8 @@ NS_ASSUME_NONNULL_BEGIN
}
}
+#pragma clang diagnostic pop // ignored "-Wunguarded-availability"
+
@end
NS_ASSUME_NONNULL_END