aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase
diff options
context:
space:
mode:
authorGravatar Chen Liang <chliang@google.com>2018-01-24 12:26:08 -0800
committerGravatar GitHub <noreply@github.com>2018-01-24 12:26:08 -0800
commitfa81c488551575d65fd681e08ff417f354f54e75 (patch)
tree3544f4504c196bf1244a527596a65f66a9f43d30 /Firebase
parent4125066bb468f130fe5165cb9188c1ab53c99384 (diff)
parent8f0c3254632db38ad1dd040b395aaf8f55042fd9 (diff)
Merge branch 'master' into messaging-copy
Diffstat (limited to 'Firebase')
-rw-r--r--Firebase/Auth/CHANGELOG.md5
-rw-r--r--Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m6
-rw-r--r--Firebase/Auth/Source/FIRAuth.m61
-rw-r--r--Firebase/Auth/Source/FIRAuthAPNSTokenManager.m4
-rw-r--r--Firebase/Auth/Source/FIRAuthErrorUtils.m2
-rw-r--r--Firebase/Auth/Source/FIRAuthNotificationManager.m2
-rw-r--r--Firebase/Auth/Source/FIRUser.m2
-rw-r--r--Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h4
-rw-r--r--Firebase/Auth/Source/Public/FIRAuth.h299
-rw-r--r--Firebase/Auth/Source/Public/FIRAuthDataResult.h4
-rw-r--r--Firebase/Auth/Source/Public/FIRAuthErrors.h44
-rw-r--r--Firebase/Auth/Source/Public/FIREmailAuthProvider.h8
-rw-r--r--Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h2
-rw-r--r--Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h2
-rw-r--r--Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h2
-rw-r--r--Firebase/Auth/Source/Public/FIROAuthProvider.h6
-rw-r--r--Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h57
-rw-r--r--Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h2
-rw-r--r--Firebase/Auth/Source/Public/FIRUser.h190
-rw-r--r--Firebase/Auth/Source/RPCs/FIRCreateAuthURIResponse.m2
-rw-r--r--Firebase/Auth/Source/RPCs/FIRDeleteAccountResponse.m2
-rw-r--r--Firebase/Auth/Source/RPCs/FIRGetOOBConfirmationCodeResponse.m2
-rw-r--r--Firebase/Auth/Source/RPCs/FIRResetPasswordResponse.m2
-rw-r--r--Firebase/Auth/Source/RPCs/FIRSetAccountInfoResponse.m2
-rw-r--r--Firebase/Auth/Source/RPCs/FIRSignUpNewUserResponse.m2
-rw-r--r--Firebase/Auth/Source/RPCs/FIRVerifyAssertionResponse.m2
-rw-r--r--Firebase/Auth/Source/RPCs/FIRVerifyCustomTokenResponse.m2
-rw-r--r--Firebase/Auth/Source/RPCs/FIRVerifyPasswordResponse.m2
-rw-r--r--Firebase/Core/CHANGELOG.md28
-rw-r--r--Firebase/Core/FIRApp.m28
-rw-r--r--Firebase/Core/FIRErrors.m4
-rw-r--r--Firebase/Core/FIRLogger.m16
-rw-r--r--Firebase/Core/FIRNetworkURLSession.m1
-rw-r--r--Firebase/Core/FIROptions.m20
-rw-r--r--Firebase/Core/FIRReachabilityChecker.m4
-rw-r--r--Firebase/Core/FIRVersion.m36
-rw-r--r--Firebase/Core/Private/FIRErrors.h10
-rw-r--r--Firebase/Core/Private/FIRVersion.h23
-rw-r--r--Firebase/Core/third_party/FIRAppEnvironmentUtil.h14
-rw-r--r--Firebase/Core/third_party/FIRAppEnvironmentUtil.m48
-rw-r--r--Firebase/Database/Api/FIRDatabase.m2
-rw-r--r--Firebase/Database/Api/FIRDatabaseConfig.m2
-rw-r--r--Firebase/Database/CHANGELOG.md6
-rw-r--r--Firebase/Database/Core/FPersistentConnection.m4
-rw-r--r--Firebase/Database/Core/FRepo.m6
-rw-r--r--Firebase/Database/Core/FRepoManager.m2
-rw-r--r--Firebase/Database/Core/FSyncTree.m2
-rw-r--r--Firebase/Database/Core/Utilities/FIRRetryHelper.m2
-rw-r--r--Firebase/Database/Core/View/FChildEventRegistration.m2
-rw-r--r--Firebase/Database/Core/View/FValueEventRegistration.m2
-rw-r--r--Firebase/Database/FIRDatabaseReference.m4
-rw-r--r--Firebase/Database/Persistence/FLevelDBStorageEngine.m4
-rw-r--r--Firebase/Database/Persistence/FPersistenceManager.m2
-rw-r--r--Firebase/Database/Persistence/FTrackedQueryManager.m2
-rw-r--r--Firebase/Database/Realtime/FConnection.m2
-rw-r--r--Firebase/Database/Realtime/FWebSocketConnection.m6
-rw-r--r--Firebase/Database/Utilities/FUtilities.m2
-rw-r--r--Firebase/Database/third_party/SocketRocket/FSRWebSocket.m4
-rw-r--r--Firebase/Messaging/FIRMessaging.m10
-rw-r--r--Firebase/Messaging/FIRMessagingClient.m3
-rw-r--r--Firebase/Messaging/FIRMessagingContextManagerService.m5
-rw-r--r--Firebase/Messaging/FIRMessagingLogger.m2
-rw-r--r--Firebase/Messaging/FIRMessagingRmq2PersistentStore.m3
-rw-r--r--Firebase/Messaging/Protos/GtalkCore.pbobjc.h56
-rw-r--r--Firebase/Messaging/Protos/GtalkCore.pbobjc.m122
-rw-r--r--Firebase/Storage/CHANGELOG.md6
-rw-r--r--Firebase/Storage/FIRStorage.m4
-rw-r--r--Firebase/Storage/FIRStorageErrors.m4
-rw-r--r--Firebase/Storage/FIRStorageObservableTask.m2
-rw-r--r--Firebase/Storage/FIRStorageReference.m4
-rw-r--r--Firebase/Storage/FIRStorageTokenAuthorizer.m4
-rw-r--r--Firebase/Storage/FIRStorageUtils.m2
72 files changed, 676 insertions, 559 deletions
diff --git a/Firebase/Auth/CHANGELOG.md b/Firebase/Auth/CHANGELOG.md
index d464cd6..176ae3b 100644
--- a/Firebase/Auth/CHANGELOG.md
+++ b/Firebase/Auth/CHANGELOG.md
@@ -1,3 +1,8 @@
+# v4.4.1
+- Fixes bug where the FIRAuthResult object returned following a Phone Number authentication
+ always contained a nil FIRAdditionalUserInfo object. Now the FIRAdditionalUserInfo object is
+ never nil and its newUser field is populated correctly.
+
# v4.4.0
- Adds new APIs which return an AuthDataResult object after successfully creating an
Email/Password user, signing in anonymously, signing in with Email/Password and signing
diff --git a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m
index 2c917fe..4a0120b 100644
--- a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m
+++ b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m
@@ -18,9 +18,9 @@
#import <GoogleToolboxForMac/GTMNSDictionary+URLArguments.h>
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FIRPhoneAuthCredential_Internal.h"
-#import "FIRApp.h"
+#import <FirebaseCore/FIRApp.h>
#import "FIRAuthAPNSToken.h"
#import "FIRAuthAPNSTokenManager.h"
#import "FIRAuthAppCredential.h"
@@ -32,7 +32,7 @@
#import "FIRAuthErrorUtils.h"
#import "FIRAuthBackend.h"
#import "FirebaseAuthVersion.h"
-#import "FIROptions.h"
+#import <FirebaseCore/FIROptions.h>
#import "FIRGetProjectConfigRequest.h"
#import "FIRGetProjectConfigResponse.h"
#import "FIRSendVerificationCodeRequest.h"
diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m
index 7300fdd..ebca6c8 100644
--- a/Firebase/Auth/Source/FIRAuth.m
+++ b/Firebase/Auth/Source/FIRAuth.m
@@ -18,10 +18,11 @@
#import "FIRAuth_Internal.h"
-#import "FIRAppAssociationRegistration.h"
+#import <FirebaseCore/FIRAppAssociationRegistration.h>
#import <FirebaseCore/FIRAppInternal.h>
-#import "FIROptions.h"
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
+#import <FirebaseCore/FIROptions.h>
+
#import "AuthProviders/EmailPassword/FIREmailPasswordAuthCredential.h"
#import "FIRAdditionalUserInfo_Internal.h"
#import "FIRAuthCredential_Internal.h"
@@ -656,12 +657,29 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
isReauthentication ? FIRAuthOperationTypeReauth : FIRAuthOperationTypeSignUpOrSignIn;
[self signInWithPhoneCredential:phoneCredential
operation:operation
- callback:^(FIRUser *_Nullable user,
+ callback:^(FIRVerifyPhoneNumberResponse *_Nullable response,
NSError *_Nullable error) {
if (callback) {
- FIRAuthDataResult *result = user ?
- [[FIRAuthDataResult alloc] initWithUser:user additionalUserInfo:nil] : nil;
- callback(result, error);
+ if (error) {
+ callback(nil, error);
+ return;
+ }
+
+ [self completeSignInWithAccessToken:response.IDToken
+ accessTokenExpirationDate:response.approximateExpirationDate
+ refreshToken:response.refreshToken
+ anonymous:NO
+ callback:^(FIRUser *_Nullable user, NSError *_Nullable error) {
+ FIRAdditionalUserInfo *additionalUserInfo =
+ [[FIRAdditionalUserInfo alloc] initWithProviderID:FIRPhoneAuthProviderID
+ profile:nil
+ username:nil
+ isNewUser:response.isNewUser];
+ FIRAuthDataResult *result = user ?
+ [[FIRAuthDataResult alloc] initWithUser:user
+ additionalUserInfo:additionalUserInfo] : nil;
+ callback(result, error);
+ }];
}
}];
return;
@@ -1142,14 +1160,14 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
*/
- (void)signInWithPhoneCredential:(FIRPhoneAuthCredential *)credential
operation:(FIRAuthOperationType)operation
- callback:(FIRAuthResultCallback)callback {
+ callback:(FIRVerifyPhoneNumberResponseCallback)callback {
if (credential.temporaryProof.length && credential.phoneNumber.length) {
FIRVerifyPhoneNumberRequest *request =
[[FIRVerifyPhoneNumberRequest alloc] initWithTemporaryProof:credential.temporaryProof
phoneNumber:credential.phoneNumber
operation:operation
requestConfiguration:_requestConfiguration];
- [self phoneNumberSignInWithRequest:request callback:callback];
+ [FIRAuthBackend verifyPhoneNumber:request callback:callback];
return;
}
@@ -1166,32 +1184,9 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
verificationCode:credential.verificationCode
operation:operation
requestConfiguration:_requestConfiguration];
- [self phoneNumberSignInWithRequest:request callback:callback];
+ [FIRAuthBackend verifyPhoneNumber:request callback:callback];
}
-
-/** @fn phoneNumberSignInWithVerificationID:pasverificationCodesword:callback:
- @brief Signs in using a FIRVerifyPhoneNumberRequest object.
- @param request THe FIRVerifyPhoneNumberRequest request object.
- @param callback A block which is invoked when the sign in finishes (or is cancelled.) Invoked
- asynchronously on the global auth work queue in the future.
- */
-- (void)phoneNumberSignInWithRequest:(FIRVerifyPhoneNumberRequest *)request
- callback:(FIRAuthResultCallback)callback {
- [FIRAuthBackend verifyPhoneNumber:request
- callback:^(FIRVerifyPhoneNumberResponse *_Nullable response,
- NSError *_Nullable error) {
- if (error) {
- callback(nil, error);
- return;
- }
- [self completeSignInWithAccessToken:response.IDToken
- accessTokenExpirationDate:response.approximateExpirationDate
- refreshToken:response.refreshToken
- anonymous:NO
- callback:callback];
- }];
-}
#endif
/** @fn internalSignInAndRetrieveDataWithCustomToken:completion:
diff --git a/Firebase/Auth/Source/FIRAuthAPNSTokenManager.m b/Firebase/Auth/Source/FIRAuthAPNSTokenManager.m
index a4e4389..215a391 100644
--- a/Firebase/Auth/Source/FIRAuthAPNSTokenManager.m
+++ b/Firebase/Auth/Source/FIRAuthAPNSTokenManager.m
@@ -16,7 +16,7 @@
#import "FIRAuthAPNSTokenManager.h"
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FIRAuthAPNSToken.h"
#import "FIRAuthGlobalWorkQueue.h"
@@ -73,7 +73,9 @@ static const NSTimeInterval kLegacyRegistrationTimeout = 30;
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#if TARGET_OS_IOS
[_application registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert];
+#endif // TARGET_OS_IOS
#pragma clang diagnostic pop
}
});
diff --git a/Firebase/Auth/Source/FIRAuthErrorUtils.m b/Firebase/Auth/Source/FIRAuthErrorUtils.m
index 544fc5d..3748048 100644
--- a/Firebase/Auth/Source/FIRAuthErrorUtils.m
+++ b/Firebase/Auth/Source/FIRAuthErrorUtils.m
@@ -111,7 +111,7 @@ static NSString *const kFIRAuthErrorMessageTooManyRequests = @"We have blocked a
"this device due to unusual activity. Try again later.";
/** @var kFIRAuthErrorMessageAccountExistsWithDifferentCredential
- @brief Message for @c FIRAuthErrorCodeAccountLinkNeeded error code.
+ @brief Message for @c FIRAuthErrorCodeAccountExistsWithDifferentCredential error code.
*/
static NSString *const kFIRAuthErrorMessageAccountExistsWithDifferentCredential = @"An account "
"already exists with the same email address but different sign-in credentials. Sign in using a "
diff --git a/Firebase/Auth/Source/FIRAuthNotificationManager.m b/Firebase/Auth/Source/FIRAuthNotificationManager.m
index 4536b5e..b1dd34c 100644
--- a/Firebase/Auth/Source/FIRAuthNotificationManager.m
+++ b/Firebase/Auth/Source/FIRAuthNotificationManager.m
@@ -16,7 +16,7 @@
#import "FIRAuthNotificationManager.h"
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FIRAuthAppCredential.h"
#import "FIRAuthAppCredentialManager.h"
#import "FIRAuthGlobalWorkQueue.h"
diff --git a/Firebase/Auth/Source/FIRUser.m b/Firebase/Auth/Source/FIRUser.m
index d0e7e36..7f2316b 100644
--- a/Firebase/Auth/Source/FIRUser.m
+++ b/Firebase/Auth/Source/FIRUser.m
@@ -37,7 +37,7 @@
#import "FIRGetAccountInfoResponse.h"
#import "FIRGetOOBConfirmationCodeRequest.h"
#import "FIRGetOOBConfirmationCodeResponse.h"
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FIRSecureTokenService.h"
#import "FIRSetAccountInfoRequest.h"
#import "FIRSetAccountInfoResponse.h"
diff --git a/Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h b/Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h
index 36dd3aa..4f6947a 100644
--- a/Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h
+++ b/Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h
@@ -27,8 +27,8 @@ NS_SWIFT_NAME(AdditionalUserInfo)
@interface FIRAdditionalUserInfo : NSObject
/** @fn init
- @brief This class should not be initialized manually. @c FIRAdditionalUserInfo can be retrieved
- from from an instance of @c FIRAuthDataResult.
+ @brief This class should not be initialized manually. `FIRAdditionalUserInfo` can be retrieved
+ from from an instance of `FIRAuthDataResult`.
*/
- (instancetype)init NS_UNAVAILABLE;
diff --git a/Firebase/Auth/Source/Public/FIRAuth.h b/Firebase/Auth/Source/Public/FIRAuth.h
index 42b3ac5..f18a3d0 100644
--- a/Firebase/Auth/Source/Public/FIRAuth.h
+++ b/Firebase/Auth/Source/Public/FIRAuth.h
@@ -33,7 +33,7 @@
NS_ASSUME_NONNULL_BEGIN
/** @typedef FIRAuthStateDidChangeListenerHandle
- @brief The type of handle returned by @c FIRAuth.addAuthStateDidChangeListener:.
+ @brief The type of handle returned by `FIRAuth.addAuthStateDidChangeListener:`.
*/
typedef id<NSObject> FIRAuthStateDidChangeListenerHandle
NS_SWIFT_NAME(AuthStateDidChangeListenerHandle);
@@ -48,7 +48,7 @@ typedef void(^FIRAuthStateDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Nulla
NS_SWIFT_NAME(AuthStateDidChangeListenerBlock);
/** @typedef FIRIDTokenDidChangeListenerHandle
- @brief The type of handle returned by @c FIRAuth.addIDTokenDidChangeListener:.
+ @brief The type of handle returned by `FIRAuth.addIDTokenDidChangeListener:`.
*/
typedef id<NSObject> FIRIDTokenDidChangeListenerHandle
NS_SWIFT_NAME(IDTokenDidChangeListenerHandle);
@@ -75,17 +75,17 @@ typedef void (^FIRAuthDataResultCallback)(FIRAuthDataResult *_Nullable authResul
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
/**
- @brief The name of the @c NSNotificationCenter notification which is posted when the auth state
+ @brief The name of the `NSNotificationCenter` notification which is posted when the auth state
changes (for example, a new token has been produced, a user signs in or signs out). The
- object parameter of the notification is the sender @c FIRAuth instance.
+ object parameter of the notification is the sender `FIRAuth` instance.
*/
extern const NSNotificationName FIRAuthStateDidChangeNotification
NS_SWIFT_NAME(AuthStateDidChange);
#else
/**
- @brief The name of the @c NSNotificationCenter notification which is posted when the auth state
+ @brief The name of the `NSNotificationCenter` notification which is posted when the auth state
changes (for example, a new token has been produced, a user signs in or signs out). The
- object parameter of the notification is the sender @c FIRAuth instance.
+ object parameter of the notification is the sender `FIRAuth` instance.
*/
extern NSString *const FIRAuthStateDidChangeNotification
NS_SWIFT_NAME(AuthStateDidChangeNotification);
@@ -154,8 +154,8 @@ typedef void (^FIRApplyActionCodeCallback)(NSError *_Nullable error)
NS_SWIFT_NAME(ApplyActionCodeCallback);
/**
- @brief Keys used to retrieve operation data from a @c FIRActionCodeInfo object by the
- @c dataForKey method.
+ @brief Keys used to retrieve operation data from a `FIRActionCodeInfo` object by the
+ `dataForKey` method.
*/
typedef NS_ENUM(NSInteger, FIRActionDataKey) {
/**
@@ -239,7 +239,7 @@ NS_SWIFT_NAME(Auth)
+ (FIRAuth *)auth NS_SWIFT_NAME(auth());
/** @fn authWithApp:
- @brief Gets the auth object for a @c FIRApp.
+ @brief Gets the auth object for a `FIRApp`.
@param app The FIRApp for which to retrieve the associated FIRAuth instance.
@return The FIRAuth instance associated with the given FIRApp.
@@ -247,7 +247,7 @@ NS_SWIFT_NAME(Auth)
+ (FIRAuth *)authWithApp:(FIRApp *)app NS_SWIFT_NAME(auth(app:));
/** @property app
- @brief Gets the @c FIRApp object that this auth object is connected to.
+ @brief Gets the `FIRApp` object that this auth object is connected to.
*/
@property(nonatomic, weak, readonly, nullable) FIRApp *app;
@@ -256,9 +256,9 @@ NS_SWIFT_NAME(Auth)
*/
@property(nonatomic, strong, readonly, nullable) FIRUser *currentUser;
-/** @proprty languageCode
+/** @property languageCode
@brief The current user language code. This property can be set to the app's current language by
- calling @c useAppLanguage.
+ calling `useAppLanguage`.
@remarks The string used to set this property must be a language code that follows BCP 47.
*/
@@ -269,13 +269,13 @@ NS_SWIFT_NAME(Auth)
@brief The APNs token used for phone number authentication. The type of the token (production
or sandbox) will be attempted to be automatcially detected.
@remarks If swizzling is disabled, the APNs Token must be set for phone number auth to work,
- by either setting this property or by calling @c setAPNSToken:type:
+ by either setting this property or by calling `setAPNSToken:type:`
*/
@property(nonatomic, strong, nullable) NSData *APNSToken;
#endif
/** @fn init
- @brief Please access auth instances using @c FIRAuth.auth and @c FIRAuth.authForApp:.
+ @brief Please access auth instances using `FIRAuth.auth` and `FIRAuth.authForApp:`.
*/
- (instancetype)init NS_UNAVAILABLE;
@@ -289,11 +289,10 @@ NS_SWIFT_NAME(Auth)
main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.</li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)fetchProvidersForEmail:(NSString *)email
completion:(nullable FIRProviderQueryCallback)completion;
@@ -308,21 +307,16 @@ NS_SWIFT_NAME(Auth)
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that email and password
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and password
accounts are not enabled. Enable them in the Auth section of the
Firebase console.
- </li>
- <li>@c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled.
- </li>
- <li>@c FIRAuthErrorCodeWrongPassword - Indicates the user attempted
+ + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+ + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted
sign in with an incorrect password.
- </li>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- </li>
- </ul>
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)signInWithEmail:(NSString *)email
password:(NSString *)password
@@ -338,31 +332,28 @@ NS_SWIFT_NAME(Auth)
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that email and password
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and password
accounts are not enabled. Enable them in the Auth section of the
Firebase console.
- </li>
- <li>@c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled.
- </li>
- <li>@c FIRAuthErrorCodeWrongPassword - Indicates the user attempted
+ + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+ + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted
sign in with an incorrect password.
- </li>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- </li>
- </ul>
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+
+
+
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
@remarks This method will only exist until the next major Firebase release following 4.x.x.
- After the next major release the method @c signInWithEmail:password:completion: will support
- the @c FIRAuthDataResultCallback.
+ After the next major release the method `signInWithEmail:password:completion:` will support
+ the `FIRAuthDataResultCallback`.
*/
- (void)signInAndRetrieveDataWithEmail:(NSString *)email
password:(NSString *)password
completion:(nullable FIRAuthDataResultCallback)completion;
/** @fn signInWithCredential:completion:
- @brief Convenience method for @c signInAndRetrieveDataWithCredential:completion: This method
+ @brief Convenience method for `signInAndRetrieveDataWithCredential:completion:` This method
doesn't return additional identity provider data.
*/
- (void)signInWithCredential:(FIRAuthCredential *)credential
@@ -378,45 +369,35 @@ NS_SWIFT_NAME(Auth)
canceled. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidCredential - Indicates the supplied credential is invalid.
+
+ + `FIRAuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid.
This could happen if it has expired or it is malformed.
- </li>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that accounts
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts
with the identity provider represented by the credential are not enabled.
Enable them in the Auth section of the Firebase console.
- </li>
- <li>@c FIRAuthErrorCodeAccountExistsWithDifferentCredential - Indicates the email asserted
+ + `FIRAuthErrorCodeAccountExistsWithDifferentCredential` - Indicates the email asserted
by the credential (e.g. the email in a Facebook access token) is already in use by an
existing account, that cannot be authenticated with this sign-in method. Call
fetchProvidersForEmail for this user’s email and then prompt them to sign in with any of
the sign-in providers returned. This error will only be thrown if the "One account per
email address" setting is enabled in the Firebase console, under Auth settings.
- </li>
- <li>@c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled.
- </li>
- <li>@c FIRAuthErrorCodeWrongPassword - Indicates the user attempted sign in with an
+ + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+ + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted sign in with an
incorrect password, if credential is of the type EmailPasswordAuthCredential.
- </li>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- </li>
- <li>@c FIRAuthErrorCodeMissingVerificationID - Indicates that the phone auth credential was
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+ + `FIRAuthErrorCodeMissingVerificationID` - Indicates that the phone auth credential was
created with an empty verification ID.
- </li>
- <li>@c FIRAuthErrorCodeMissingVerificationCode - Indicates that the phone auth credential
+ + `FIRAuthErrorCodeMissingVerificationCode` - Indicates that the phone auth credential
was created with an empty verification code.
- </li>
- <li>@c FIRAuthErrorCodeInvalidVerificationCode - Indicates that the phone auth credential
+ + `FIRAuthErrorCodeInvalidVerificationCode` - Indicates that the phone auth credential
was created with an invalid verification Code.
- </li>
- <li>@c FIRAuthErrorCodeInvalidVerificationID - Indicates that the phone auth credential was
+ + `FIRAuthErrorCodeInvalidVerificationID` - Indicates that the phone auth credential was
created with an invalid verification ID.
- </li>
- <li>@c FIRAuthErrorCodeSessionExpired - Indicates that the SMS code has expired.
- </li>
- </ul>
+ + `FIRAuthErrorCodeSessionExpired` - Indicates that the SMS code has expired.
+
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)signInAndRetrieveDataWithCredential:(FIRAuthCredential *)credential
completion:(nullable FIRAuthDataResultCallback)completion;
@@ -430,13 +411,11 @@ NS_SWIFT_NAME(Auth)
If there is any other existing user signed in, that user will be signed out.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that anonymous accounts are
+
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that anonymous accounts are
not enabled. Enable them in the Auth section of the Firebase console.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)signInAnonymouslyWithCompletion:(nullable FIRAuthResultCallback)completion;
@@ -449,16 +428,16 @@ NS_SWIFT_NAME(Auth)
If there is any other existing user signed in, that user will be signed out.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that anonymous accounts are
+
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that anonymous accounts are
not enabled. Enable them in the Auth section of the Firebase console.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+
@remarks This method will only exist until the next major Firebase release following 4.x.x.
- After the next major release the method @c signInAnonymouslyWithCompletion will support the
- @c FIRAuthDataResultCallback.
+ After the next major release the method `signInAnonymouslyWithCompletion` will support the
+ `FIRAuthDataResultCallback`.
*/
- (void)signInAnonymouslyAndRetrieveDataWithCompletion:
(nullable FIRAuthDataResultCallback)completion;
@@ -471,16 +450,15 @@ NS_SWIFT_NAME(Auth)
canceled. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidCustomToken - Indicates a validation error with
+
+ + `FIRAuthErrorCodeInvalidCustomToken` - Indicates a validation error with
the custom token.
- </li>
- <li>@c FIRAuthErrorCodeCustomTokenMismatch - Indicates the service account and the API key
+ + `FIRAuthErrorCodeCustomTokenMismatch` - Indicates the service account and the API key
belong to different projects.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+
+
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)signInWithCustomToken:(NSString *)token
completion:(nullable FIRAuthResultCallback)completion;
@@ -493,19 +471,20 @@ NS_SWIFT_NAME(Auth)
canceled. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidCustomToken - Indicates a validation error with
+
+ + `FIRAuthErrorCodeInvalidCustomToken` - Indicates a validation error with
the custom token.
- </li>
- <li>@c FIRAuthErrorCodeCustomTokenMismatch - Indicates the service account and the API key
+
+ + `FIRAuthErrorCodeCustomTokenMismatch` - Indicates the service account and the API key
belong to different projects.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+
+
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+
@remarks This method will only exist until the next major Firebase release following 4.x.x.
- After the next major release the method @c createUserWithEmail:password:completion: will
- support the @c FIRAuthDataResultCallback.
+ After the next major release the method `createUserWithEmail:password:completion:` will
+ support the `FIRAuthDataResultCallback`.
*/
- (void)signInAndRetrieveDataWithCustomToken:(NSString *)token
completion:(nullable FIRAuthDataResultCallback)completion;
@@ -520,23 +499,18 @@ NS_SWIFT_NAME(Auth)
canceled. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- </li>
- <li>@c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email used to attempt sign up
+
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+ + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email used to attempt sign up
already exists. Call fetchProvidersForEmail to check which sign-in mechanisms the user
used, and prompt the user to sign in with one of those.
- </li>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that email and password accounts
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and password accounts
are not enabled. Enable them in the Auth section of the Firebase console.
- </li>
- <li>@c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is
+ + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo
dictionary object will contain more detailed explanation that can be shown to the user.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)createUserWithEmail:(NSString *)email
password:(NSString *)password
@@ -551,26 +525,22 @@ NS_SWIFT_NAME(Auth)
canceled. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- </li>
- <li>@c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email used to attempt sign up
+
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+ + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email used to attempt sign up
already exists. Call fetchProvidersForEmail to check which sign-in mechanisms the user
used, and prompt the user to sign in with one of those.
- </li>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that email and password accounts
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and password accounts
are not enabled. Enable them in the Auth section of the Firebase console.
- </li>
- <li>@c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is
+ + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo
dictionary object will contain more detailed explanation that can be shown to the user.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+
@remarks This method will only exist until the next major Firebase release following 4.x.x.
- After the next major release the method @c createUserWithEmail:password:completion: will
- support the @c FIRAuthDataResultCallback.
+ After the next major release the method `createUserWithEmail:password:completion:` will
+ support the `FIRAuthDataResultCallback`.
*/
- (void)createUserAndRetrieveDataWithEmail:(NSString *)email
password:(NSString *)password
@@ -585,20 +555,15 @@ NS_SWIFT_NAME(Auth)
asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is
+
+ + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
considered too weak.
- </li>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates the administrator disabled sign
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates the administrator disabled sign
in with the specified identity provider.
- </li>
- <li>@c FIRAuthErrorCodeExpiredActionCode - Indicates the OOB code is expired.
- </li>
- <li>@c FIRAuthErrorCodeInvalidActionCode - Indicates the OOB code is invalid.
- </li>
- </ul>
+ + `FIRAuthErrorCodeExpiredActionCode` - Indicates the OOB code is expired.
+ + `FIRAuthErrorCodeInvalidActionCode` - Indicates the OOB code is invalid.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)confirmPasswordResetWithCode:(NSString *)code
newPassword:(NSString *)newPassword
@@ -644,17 +609,15 @@ NS_SWIFT_NAME(Auth)
asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was
+
+ + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
sent in the request.
- </li>
- <li>@c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in
+ + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
the console for this action.
- </li>
- <li>@c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for
+ + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
sending update email.
- </li>
- </ul>
+
+
*/
- (void)sendPasswordResetWithEmail:(NSString *)email
completion:(nullable FIRSendPasswordResetCallback)completion;
@@ -663,35 +626,29 @@ NS_SWIFT_NAME(Auth)
@brief Initiates a password reset for the given email address and @FIRActionCodeSettings object.
@param email The email address of the user.
- @param actionCodeSettings An @c FIRActionCodeSettings object containing settings related to
+ @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to
handling action codes.
@param completion Optionally; a block which is invoked when the request finishes. Invoked
asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was
+
+ + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
sent in the request.
- </li>
- <li>@c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in
+ + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
the console for this action.
- </li>
- <li>@c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for
+ + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
sending update email.
- </li>
- <li>@c FIRAuthErrorCodeMissingIosBundleID - Indicates that the iOS bundle ID is missing when
- @c handleCodeInApp is set to YES.
- </li>
- <li>@c FIRAuthErrorCodeMissingAndroidPackageName - Indicates that the android package name
- is missing when the @c androidInstallApp flag is set to true.
- </li>
- <li>@c FIRAuthErrorCodeUnauthorizedDomain - Indicates that the domain specified in the
+ + `FIRAuthErrorCodeMissingIosBundleID` - Indicates that the iOS bundle ID is missing when
+ `handleCodeInApp` is set to YES.
+ + `FIRAuthErrorCodeMissingAndroidPackageName` - Indicates that the android package name
+ is missing when the `androidInstallApp` flag is set to true.
+ + `FIRAuthErrorCodeUnauthorizedDomain` - Indicates that the domain specified in the
continue URL is not whitelisted in the Firebase console.
- </li>
- <li>@c FIRAuthErrorCodeInvalidContinueURI - Indicates that the domain specified in the
+ + `FIRAuthErrorCodeInvalidContinueURI` - Indicates that the domain specified in the
continue URI is not valid.
- </li>
- </ul>
+
+
*/
- (void)sendPasswordResetWithEmail:(NSString *)email
actionCodeSettings:(FIRActionCodeSettings *)actionCodeSettings
@@ -705,12 +662,12 @@ NS_SWIFT_NAME(Auth)
@return @YES when the sign out request was successful. @NO otherwise.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeKeychainError - Indicates an error occurred when accessing the
- keychain. The @c NSLocalizedFailureReasonErrorKey field in the @c NSError.userInfo
+
+ + `FIRAuthErrorCodeKeychainError` - Indicates an error occurred when accessing the
+ keychain. The `NSLocalizedFailureReasonErrorKey` field in the `NSError.userInfo`
dictionary will contain more information about the error encountered.
- </li>
- </ul>
+
+
*/
- (BOOL)signOut:(NSError *_Nullable *_Nullable)error;
@@ -728,8 +685,8 @@ NS_SWIFT_NAME(Auth)
@remarks The block is invoked immediately after adding it according to it's standard invocation
semantics, asynchronously on the main thread. Users should pay special attention to
making sure the block does not inadvertently retain objects which should not be retained by
- the long-lived block. The block itself will be retained by @c FIRAuth until it is
- unregistered or until the @c FIRAuth instance is otherwise deallocated.
+ the long-lived block. The block itself will be retained by `FIRAuth` until it is
+ unregistered or until the `FIRAuth` instance is otherwise deallocated.
@return A handle useful for manually unregistering the block as a listener.
*/
@@ -757,8 +714,8 @@ NS_SWIFT_NAME(Auth)
@remarks The block is invoked immediately after adding it according to it's standard invocation
semantics, asynchronously on the main thread. Users should pay special attention to
making sure the block does not inadvertently retain objects which should not be retained by
- the long-lived block. The block itself will be retained by @c FIRAuth until it is
- unregistered or until the @c FIRAuth instance is otherwise deallocated.
+ the long-lived block. The block itself will be retained by `FIRAuth` until it is
+ unregistered or until the `FIRAuth` instance is otherwise deallocated.
@return A handle useful for manually unregistering the block as a listener.
*/
@@ -773,14 +730,14 @@ NS_SWIFT_NAME(Auth)
- (void)removeIDTokenDidChangeListener:(FIRIDTokenDidChangeListenerHandle)listenerHandle;
/** @fn useAppLanguage
- @brief Sets @c languageCode to the app's current language.
+ @brief Sets `languageCode` to the app's current language.
*/
- (void)useAppLanguage;
#if TARGET_OS_IOS
/** @fn canHandleURL:
- @brief Whether the specific URL is handled by @c FIRAuth .
+ @brief Whether the specific URL is handled by `FIRAuth` .
@param URL The URL received by the application delegate from any of the openURL method.
@return Whether or the URL is handled. YES means the URL is for Firebase Auth
so the caller should ignore the URL from further processing, and NO means the
@@ -794,12 +751,12 @@ NS_SWIFT_NAME(Auth)
/** @fn setAPNSToken:type:
@brief Sets the APNs token along with its type.
@remarks If swizzling is disabled, the APNs Token must be set for phone number auth to work,
- by either setting calling this method or by setting the @c APNSToken property.
+ by either setting calling this method or by setting the `APNSToken` property.
*/
- (void)setAPNSToken:(NSData *)token type:(FIRAuthAPNSTokenType)type;
/** @fn canHandleNotification:
- @brief Whether the specific remote notification is handled by @c FIRAuth .
+ @brief Whether the specific remote notification is handled by `FIRAuth` .
@param userInfo A dictionary that contains information related to the
notification in question.
@return Whether or the notification is handled. YES means the notification is for Firebase Auth
diff --git a/Firebase/Auth/Source/Public/FIRAuthDataResult.h b/Firebase/Auth/Source/Public/FIRAuthDataResult.h
index ba16576..bc4fa4a 100644
--- a/Firebase/Auth/Source/Public/FIRAuthDataResult.h
+++ b/Firebase/Auth/Source/Public/FIRAuthDataResult.h
@@ -29,8 +29,8 @@ NS_SWIFT_NAME(AuthDataResult)
@interface FIRAuthDataResult : NSObject
/** @fn init
- @brief This class should not be initialized manually. @c FIRAuthDataResult instance is
- returned as part of @c FIRAuthDataResultCallback .
+ @brief This class should not be initialized manually. `FIRAuthDataResult` instance is
+ returned as part of `FIRAuthDataResultCallback`.
*/
- (instancetype)init NS_UNAVAILABLE;
diff --git a/Firebase/Auth/Source/Public/FIRAuthErrors.h b/Firebase/Auth/Source/Public/FIRAuthErrors.h
index fdfee19..b8e5fb6 100644
--- a/Firebase/Auth/Source/Public/FIRAuthErrors.h
+++ b/Firebase/Auth/Source/Public/FIRAuthErrors.h
@@ -18,21 +18,21 @@
/** @class FIRAuthErrors
@remarks Error Codes common to all API Methods:
- <ul>
- <li>@c FIRAuthErrorCodeNetworkError</li>
- <li>@c FIRAuthErrorCodeUserNotFound</li>
- <li>@c FIRAuthErrorCodeUserTokenExpired</li>
- <li>@c FIRAuthErrorCodeTooManyRequests</li>
- <li>@c FIRAuthErrorCodeInvalidAPIKey</li>
- <li>@c FIRAuthErrorCodeAppNotAuthorized</li>
- <li>@c FIRAuthErrorCodeKeychainError</li>
- <li>@c FIRAuthErrorCodeInternalError</li>
- </ul>
- @remarks Common error codes for @c FIRUser operations:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidUserToken</li>
- <li>@c FIRAuthErrorCodeUserDisabled</li>
- </ul>
+
+ + `FIRAuthErrorCodeNetworkError`
+ + `FIRAuthErrorCodeUserNotFound`
+ + `FIRAuthErrorCodeUserTokenExpired`
+ + `FIRAuthErrorCodeTooManyRequests`
+ + `FIRAuthErrorCodeInvalidAPIKey`
+ + `FIRAuthErrorCodeAppNotAuthorized`
+ + `FIRAuthErrorCodeKeychainError`
+ + `FIRAuthErrorCodeInternalError`
+
+ @remarks Common error codes for `FIRUser` operations:
+
+ + `FIRAuthErrorCodeInvalidUserToken`
+ + `FIRAuthErrorCodeUserDisabled`
+
*/
NS_SWIFT_NAME(AuthErrors)
@interface FIRAuthErrors
@@ -54,8 +54,8 @@ extern NSString *const FIRAuthUpdatedCredentialKey NS_SWIFT_NAME(AuthUpdatedCred
extern NSString *const FIRAuthErrorNameKey NS_SWIFT_NAME(AuthErrorNameKey);
/**
- @brief Errors with the code @c FIRAuthErrorCodeAccountExistsWithDifferentCredential may contain
- an @c NSError.userInfo dictinary object which contains this key. The value associated with
+ @brief Errors with the code `FIRAuthErrorCodeAccountExistsWithDifferentCredential` may contain
+ an `NSError.userInfo` dictinary object which contains this key. The value associated with
this key is an NSString of the email address of the account that already exists.
*/
extern NSString *const FIRAuthErrorUserInfoEmailKey NS_SWIFT_NAME(AuthErrorUserInfoEmailKey);
@@ -127,7 +127,7 @@ typedef NS_ENUM(NSInteger, FIRAuthErrorCode) {
/** Indicates a network error occurred (such as a timeout, interrupted connection, or
unreachable host). These types of errors are often recoverable with a retry. The
- @c NSUnderlyingError field in the @c NSError.userInfo dictionary will contain the error
+ `NSUnderlyingError` field in the `NSError.userInfo` dictionary will contain the error
encountered.
*/
FIRAuthErrorCodeNetworkError = 17020,
@@ -192,7 +192,7 @@ typedef NS_ENUM(NSInteger, FIRAuthErrorCode) {
*/
FIRAuthErrorCodeMissingIosBundleID = 17036,
- /** Indicates that the android package name is missing when the @c androidInstallApp flag is set
+ /** Indicates that the android package name is missing when the `androidInstallApp` flag is set
to true.
*/
FIRAuthErrorCodeMissingAndroidPackageName = 17037,
@@ -212,12 +212,12 @@ typedef NS_ENUM(NSInteger, FIRAuthErrorCode) {
FIRAuthErrorCodeMissingContinueURI = 17040,
/** Indicates that a phone number was not provided in a call to
- @c verifyPhoneNumber:completion:.
+ `verifyPhoneNumber:completion:`.
*/
FIRAuthErrorCodeMissingPhoneNumber = 17041,
/** Indicates that an invalid phone number was provided in a call to
- @c verifyPhoneNumber:completion:.
+ `verifyPhoneNumber:completion:`.
*/
FIRAuthErrorCodeInvalidPhoneNumber = 17042,
@@ -295,7 +295,7 @@ typedef NS_ENUM(NSInteger, FIRAuthErrorCode) {
*/
FIRAuthErrorCodeWebNetworkRequestFailed = 17061,
- /** Indicates that an internal error occured within a SFSafariViewController or UIWebview.
+ /** Indicates that an internal error occurred within a SFSafariViewController or UIWebview.
*/
FIRAuthErrorCodeWebInternalError = 17062,
diff --git a/Firebase/Auth/Source/Public/FIREmailAuthProvider.h b/Firebase/Auth/Source/Public/FIREmailAuthProvider.h
index 030efda..0108d40 100644
--- a/Firebase/Auth/Source/Public/FIREmailAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIREmailAuthProvider.h
@@ -26,24 +26,24 @@ NS_ASSUME_NONNULL_BEGIN
extern NSString *const FIREmailAuthProviderID NS_SWIFT_NAME(EmailAuthProviderID);
/**
- @brief please use @c FIREmailAuthProviderID instead.
+ @brief please use `FIREmailAuthProviderID` instead.
*/
extern NSString *const FIREmailPasswordAuthProviderID __attribute__((deprecated));
/** @class FIREmailAuthProvider
- @brief A concrete implementation of @c FIRAuthProvider for Email & Password Sign In.
+ @brief A concrete implementation of `FIRAuthProvider` for Email & Password Sign In.
*/
NS_SWIFT_NAME(EmailAuthProvider)
@interface FIREmailAuthProvider : NSObject
/** @typedef FIREmailPasswordAuthProvider
- @brief Please use @c FIREmailAuthProvider instead.
+ @brief Please use `FIREmailAuthProvider` instead.
*/
typedef FIREmailAuthProvider FIREmailPasswordAuthProvider __attribute__((deprecated));
/** @fn credentialWithEmail:password:
- @brief Creates an @c FIRAuthCredential for an email & password sign in.
+ @brief Creates an `FIRAuthCredential` for an email & password sign in.
@param email The user's email address.
@param password The user's password.
diff --git a/Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h b/Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h
index dae90dc..f08740f 100644
--- a/Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h
@@ -32,7 +32,7 @@ NS_SWIFT_NAME(FacebookAuthProvider)
@interface FIRFacebookAuthProvider : NSObject
/** @fn credentialWithAccessToken:
- @brief Creates an @c FIRAuthCredential for a Facebook sign in.
+ @brief Creates an `FIRAuthCredential` for a Facebook sign in.
@param accessToken The Access Token from Facebook.
@return A FIRAuthCredential containing the Facebook credentials.
diff --git a/Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h b/Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h
index 0da3142..f0b5dbe 100644
--- a/Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h
@@ -32,7 +32,7 @@ NS_SWIFT_NAME(GitHubAuthProvider)
@interface FIRGitHubAuthProvider : NSObject
/** @fn credentialWithToken:
- @brief Creates an @c FIRAuthCredential for a GitHub sign in.
+ @brief Creates an `FIRAuthCredential` for a GitHub sign in.
@param token The GitHub OAuth access token.
@return A FIRAuthCredential containing the GitHub credential.
diff --git a/Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h b/Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h
index 1386c04..e80d87e 100644
--- a/Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h
@@ -32,7 +32,7 @@ NS_SWIFT_NAME(GoogleAuthProvider)
@interface FIRGoogleAuthProvider : NSObject
/** @fn credentialWithIDToken:accessToken:
- @brief Creates an @c FIRAuthCredential for a Google sign in.
+ @brief Creates an `FIRAuthCredential` for a Google sign in.
@param IDToken The ID Token from Google.
@param accessToken The Access Token from Google.
diff --git a/Firebase/Auth/Source/Public/FIROAuthProvider.h b/Firebase/Auth/Source/Public/FIROAuthProvider.h
index b20d9b6..cc628f8 100644
--- a/Firebase/Auth/Source/Public/FIROAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIROAuthProvider.h
@@ -21,13 +21,13 @@
NS_ASSUME_NONNULL_BEGIN
/** @class FIROAuthProvider
- @brief A concrete implementation of @c FIRAuthProvider for generic OAuth Providers.
+ @brief A concrete implementation of `FIRAuthProvider` for generic OAuth Providers.
*/
NS_SWIFT_NAME(OAuthProvider)
@interface FIROAuthProvider : NSObject
/** @fn credentialWithProviderID:IDToken:accessToken:
- @brief Creates an @c FIRAuthCredential for that OAuth 2 provider identified by providerID, ID
+ @brief Creates an `FIRAuthCredential` for that OAuth 2 provider identified by providerID, ID
token and access token.
@param providerID The provider ID associated with the Auth credential being created.
@@ -42,7 +42,7 @@ NS_SWIFT_NAME(OAuthProvider)
/** @fn credentialWithProviderID:accessToken:
- @brief Creates an @c FIRAuthCredential for that OAuth 2 provider identified by providerID using
+ @brief Creates an `FIRAuthCredential` for that OAuth 2 provider identified by providerID using
an ID token.
@param providerID The provider ID associated with the Auth credential being created.
diff --git a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h
index 2d6d698..34db683 100644
--- a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h
@@ -38,47 +38,44 @@ typedef void (^FIRVerificationResultCallback)(NSString *_Nullable verificationID
NS_SWIFT_NAME(VerificationResultCallback);
/** @class FIRPhoneAuthProvider
- @brief A concrete implementation of @c FIRAuthProvider for phone auth providers.
+ @brief A concrete implementation of `FIRAuthProvider` for phone auth providers.
*/
NS_SWIFT_NAME(PhoneAuthProvider)
@interface FIRPhoneAuthProvider : NSObject
/** @fn provider
- @brief Returns an instance of @c FIRPhoneAuthProvider for the default @c FIRAuth object.
+ @brief Returns an instance of `FIRPhoneAuthProvider` for the default `FIRAuth` object.
*/
+ (instancetype)provider NS_SWIFT_NAME(provider());
/** @fn providerWithAuth:
- @brief Returns an instance of @c FIRPhoneAuthProvider for the provided @c FIRAuth object.
+ @brief Returns an instance of `FIRPhoneAuthProvider` for the provided `FIRAuth` object.
@param auth The auth object to associate with the phone auth provider instance.
*/
+ (instancetype)providerWithAuth:(FIRAuth *)auth NS_SWIFT_NAME(provider(auth:));
/** @fn verifyPhoneNumber:completion:
- @brief Please use @c verifyPhoneNumber:UIDelegate:completion: instead.
+ @brief Please use `verifyPhoneNumber:UIDelegate:completion:` instead.
@param phoneNumber The phone number to be verified.
@param completion The callback to be invoked when the verification flow is finished.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeAppNotVerified - Indicates that Firebase could not retrieve the
- silent push notification and therefore could not verify your app.</li>
- <li>@c FIRAuthErrorCodeInvalidAppCredential - Indicates that The APNs device token provided
+
+ + `FIRAuthErrorCodeAppNotVerified` - Indicates that Firebase could not retrieve the
+ silent push notification and therefore could not verify your app.
+ + `FIRAuthErrorCodeInvalidAppCredential` - Indicates that The APNs device token provided
is either incorrect or does not match the private certificate uploaded to the Firebase
- Console.</li>
- <li>@c FIRAuthErrorCodeQuotaExceeded - Indicates that the phone verification quota for this
- project has been exceeded.</li>
- <li>@c FIRAuthErrorCodeInvalidPhoneNumber - Indicates that the phone number provided is
- invalid.</li>
- <li>@c FIRAuthErrorCodeMissingPhoneNumber - Indicates that a phone number was not provided.
- </li>
- <li>@c FIRAuthErrorCodeMissingAppToken - Indicates that the APNs device token could not be
+ Console.
+ + `FIRAuthErrorCodeQuotaExceeded` - Indicates that the phone verification quota for this
+ project has been exceeded.
+ + `FIRAuthErrorCodeInvalidPhoneNumber` - Indicates that the phone number provided is
+ invalid.
+ + `FIRAuthErrorCodeMissingPhoneNumber` - Indicates that a phone number was not provided.
+ + `FIRAuthErrorCodeMissingAppToken` - Indicates that the APNs device token could not be
obtained. The app may not have set up remote notification correctly, or may fail to
forward the APNs device token to FIRAuth if app delegate swizzling is disabled.
- </li>
- </ul>
*/
- (void)verifyPhoneNumber:(NSString *)phoneNumber
completion:(nullable FIRVerificationResultCallback)completion
@@ -92,23 +89,21 @@ NS_SWIFT_NAME(PhoneAuthProvider)
by this method until the completion block is executed.
@param completion The callback to be invoked when the verification flow is finished.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeCaptchaCheckFailed - Indicates that the reCAPTCHA token obtained by
- the Firebase Auth is invalid or has expired.</li>
- <li>@c FIRAuthErrorCodeQuotaExceeded - Indicates that the phone verification quota for this
- project has been exceeded.</li>
- <li>@c FIRAuthErrorCodeInvalidPhoneNumber - Indicates that the phone number provided is
- invalid.</li>
- <li>@c FIRAuthErrorCodeMissingPhoneNumber - Indicates that a phone number was not provided.
- </li>
- </ul>
+
+ + `FIRAuthErrorCodeCaptchaCheckFailed` - Indicates that the reCAPTCHA token obtained by
+ the Firebase Auth is invalid or has expired.
+ + `FIRAuthErrorCodeQuotaExceeded` - Indicates that the phone verification quota for this
+ project has been exceeded.
+ + `FIRAuthErrorCodeInvalidPhoneNumber` - Indicates that the phone number provided is
+ invalid.
+ + `FIRAuthErrorCodeMissingPhoneNumber` - Indicates that a phone number was not provided.
*/
- (void)verifyPhoneNumber:(NSString *)phoneNumber
UIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate
completion:(nullable FIRVerificationResultCallback)completion;
/** @fn credentialWithVerificationID:verificationCode:
- @brief Creates an @c FIRAuthCredential for the phone number provider identified by the
+ @brief Creates an `FIRAuthCredential` for the phone number provider identified by the
verification ID and verification code.
@param verificationID The verification ID obtained from invoking
@@ -121,8 +116,8 @@ NS_SWIFT_NAME(PhoneAuthProvider)
verificationCode:(NSString *)verificationCode;
/** @fn init
- @brief Please use the @c provider or @c providerWithAuth: methods to obtain an instance of
- @c FIRPhoneAuthProvider.
+ @brief Please use the `provider` or `providerWithAuth:` methods to obtain an instance of
+ `FIRPhoneAuthProvider`.
*/
- (instancetype)init NS_UNAVAILABLE;
diff --git a/Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h b/Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h
index 4200753..2ef32f7 100644
--- a/Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h
@@ -32,7 +32,7 @@ NS_SWIFT_NAME(TwitterAuthProvider)
@interface FIRTwitterAuthProvider : NSObject
/** @fn credentialWithToken:secret:
- @brief Creates an @c FIRAuthCredential for a Twitter sign in.
+ @brief Creates an `FIRAuthCredential` for a Twitter sign in.
@param token The Twitter OAuth token.
@param secret The Twitter OAuth secret.
diff --git a/Firebase/Auth/Source/Public/FIRUser.h b/Firebase/Auth/Source/Public/FIRUser.h
index 7e22329..1bba710 100644
--- a/Firebase/Auth/Source/Public/FIRUser.h
+++ b/Firebase/Auth/Source/Public/FIRUser.h
@@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
@param token Optionally; an access token if the request was successful.
@param error Optionally; the error which occurred - or nil if the request was successful.
- @remarks One of: @c token or @c error will always be non-nil.
+ @remarks One of: `token` or `error` will always be non-nil.
*/
typedef void (^FIRAuthTokenCallback)(NSString *_Nullable token, NSError *_Nullable error)
NS_SWIFT_NAME(AuthTokenCallback);
@@ -91,8 +91,8 @@ NS_SWIFT_NAME(User)
/** @fn init
@brief This class should not be instantiated.
- @remarks To retrieve the current user, use @c FIRAuth.currentUser. To sign a user
- in or out, use the methods on @c FIRAuth.
+ @remarks To retrieve the current user, use `FIRAuth.currentUser`. To sign a user
+ in or out, use the methods on `FIRAuth`.
*/
- (instancetype)init NS_UNAVAILABLE;
@@ -107,29 +107,22 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was
+
+ + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
sent in the request.
- </li>
- <li>@c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in
+ + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
the console for this action.
- </li>
- <li>@c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for
+ + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
sending update email.
- </li>
- <li>@c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email is already in use by another
+ + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email is already in use by another
account.
- </li>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- </li>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating a user’s email is a security
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s email is a security
sensitive operation that requires a recent login from the user. This error indicates
the user has not signed in recently enough. To resolve, reauthenticate the user by
invoking reauthenticateWithCredential:completion: on FIRUser.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)updateEmail:(NSString *)email completion:(nullable FIRUserProfileChangeCallback)completion
NS_SWIFT_NAME(updateEmail(to:completion:));
@@ -142,22 +135,18 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates the administrator disabled
+
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates the administrator disabled
sign in with the specified identity provider.
- </li>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating a user’s password is a security
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s password is a security
sensitive operation that requires a recent login from the user. This error indicates
the user has not signed in recently enough. To resolve, reauthenticate the user by
invoking reauthenticateWithCredential:completion: on FIRUser.
- </li>
- <li>@c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is
+ + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo
dictionary object will contain more detailed explanation that can be shown to the user.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)updatePassword:(NSString *)password
completion:(nullable FIRUserProfileChangeCallback)completion
@@ -175,15 +164,13 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating a user’s phone number is a security
+
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s phone number is a security
sensitive operation that requires a recent login from the user. This error indicates
the user has not signed in recently enough. To resolve, reauthenticate the user by
invoking reauthenticateWithCredential:completion: on FIRUser.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)updatePhoneNumberCredential:(FIRPhoneAuthCredential *)phoneNumberCredential
completion:(nullable FIRUserProfileChangeCallback)completion;
@@ -193,7 +180,7 @@ NS_SWIFT_NAME(User)
@brief Creates an object which may be used to change the user's profile data.
@remarks Set the properties of the returned object, then call
- @c FIRUserProfileChangeRequest.commitChangesWithCallback: to perform the updates atomically.
+ `FIRUserProfileChangeRequest.commitChangesWithCallback:` to perform the updates atomically.
@return An object which may be used to change the user's profile data atomically.
*/
@@ -205,16 +192,16 @@ NS_SWIFT_NAME(User)
@param completion Optionally; the block invoked when the reload has finished. Invoked
asynchronously on the main thread in the future.
- @remarks May fail with a @c FIRAuthErrorCodeRequiresRecentLogin error code. In this case
- you should call @c FIRUser.reauthenticateWithCredential:completion: before re-invoking
- @c FIRUser.updateEmail:completion:.
+ @remarks May fail with a `FIRAuthErrorCodeRequiresRecentLogin` error code. In this case
+ you should call `FIRUser.reauthenticateWithCredential:completion:` before re-invoking
+ `FIRUser.updateEmail:completion:`.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)reloadWithCompletion:(nullable FIRUserProfileChangeCallback)completion;
/** @fn reauthenticateWithCredential:completion:
- @brief Convenience method for @c reauthenticateAndRetrieveDataWithCredential:completion: This
+ @brief Convenience method for `reauthenticateAndRetrieveDataWithCredential:completion:` This
method doesn't return additional identity provider data.
*/
- (void)reauthenticateWithCredential:(FIRAuthCredential *)credential
@@ -234,33 +221,27 @@ NS_SWIFT_NAME(User)
user remains signed in.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidCredential - Indicates the supplied credential is invalid.
+
+ + `FIRAuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid.
This could happen if it has expired or it is malformed.
- </li>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that accounts with the
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts with the
identity provider represented by the credential are not enabled. Enable them in the
Auth section of the Firebase console.
- </li>
- <li>@c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email asserted by the credential
+ + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email asserted by the credential
(e.g. the email in a Facebook access token) is already in use by an existing account,
that cannot be authenticated with this method. Call fetchProvidersForEmail for
this user’s email and then prompt them to sign in with any of the sign-in providers
returned. This error will only be thrown if the "One account per email address"
setting is enabled in the Firebase console, under Auth settings. Please note that the
error code raised in this specific situation may not be the same on Web and Android.
- </li>
- <li>@c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled.
- </li>
- <li>@c FIRAuthErrorCodeWrongPassword - Indicates the user attempted reauthentication with
+ + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+ + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted reauthentication with
an incorrect password, if credential is of the type EmailPasswordAuthCredential.
- </li>
- <li>@c FIRAuthErrorCodeUserMismatch - Indicates that an attempt was made to
+ + `FIRAuthErrorCodeUserMismatch` - Indicates that an attempt was made to
reauthenticate with a user which is not the current user.
- </li>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.</li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)reauthenticateAndRetrieveDataWithCredential:(FIRAuthCredential *) credential
completion:(nullable FIRAuthDataResultCallback) completion;
@@ -271,18 +252,18 @@ NS_SWIFT_NAME(User)
@param completion Optionally; the block invoked when the token is available. Invoked
asynchronously on the main thread in the future.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)getIDTokenWithCompletion:(nullable FIRAuthTokenCallback)completion
NS_SWIFT_NAME(getIDToken(completion:));
/** @fn getTokenWithCompletion:
- @brief Please use @c getIDTokenWithCompletion: instead.
+ @brief Please use `getIDTokenWithCompletion:` instead.
@param completion Optionally; the block invoked when the token is available. Invoked
asynchronously on the main thread in the future.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)getTokenWithCompletion:(nullable FIRAuthTokenCallback)completion
NS_SWIFT_NAME(getToken(completion:)) __attribute__((deprecated));
@@ -296,9 +277,9 @@ NS_SWIFT_NAME(User)
asynchronously on the main thread in the future.
@remarks The authentication token will be refreshed (by making a network request) if it has
- expired, or if @c forceRefresh is YES.
+ expired, or if `forceRefresh` is YES.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)getIDTokenForcingRefresh:(BOOL)forceRefresh
completion:(nullable FIRAuthTokenCallback)completion;
@@ -312,16 +293,16 @@ NS_SWIFT_NAME(User)
asynchronously on the main thread in the future.
@remarks The authentication token will be refreshed (by making a network request) if it has
- expired, or if @c forceRefresh is YES.
+ expired, or if `forceRefresh` is YES.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)getTokenForcingRefresh:(BOOL)forceRefresh
completion:(nullable FIRAuthTokenCallback)completion
__attribute__((deprecated));
/** @fn linkWithCredential:completion:
- @brief Convenience method for @c linkAndRetrieveDataWithCredential:completion: This method
+ @brief Convenience method for `linkAndRetrieveDataWithCredential:completion:` This method
doesn't return additional identity provider data.
*/
- (void)linkWithCredential:(FIRAuthCredential *)credential
@@ -336,24 +317,20 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeProviderAlreadyLinked - Indicates an attempt to link a provider of a
+
+ + `FIRAuthErrorCodeProviderAlreadyLinked` - Indicates an attempt to link a provider of a
type already linked to this account.
- </li>
- <li>@c FIRAuthErrorCodeCredentialAlreadyInUse - Indicates an attempt to link with a
+ + `FIRAuthErrorCodeCredentialAlreadyInUse` - Indicates an attempt to link with a
credential
that has already been linked with a different Firebase account.
- </li>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that accounts with the identity
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts with the identity
provider represented by the credential are not enabled. Enable them in the Auth section
of the Firebase console.
- </li>
- </ul>
@remarks This method may also return error codes associated with updateEmail:completion: and
updatePassword:completion: on FIRUser.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)linkAndRetrieveDataWithCredential:(FIRAuthCredential *) credential
completion:(nullable FIRAuthDataResultCallback) completion;
@@ -366,18 +343,15 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeNoSuchProvider - Indicates an attempt to unlink a provider
+
+ + `FIRAuthErrorCodeNoSuchProvider` - Indicates an attempt to unlink a provider
that is not linked to the account.
- </li>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating email is a security sensitive
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive
operation that requires a recent login from the user. This error indicates the user
has not signed in recently enough. To resolve, reauthenticate the user by invoking
reauthenticateWithCredential:completion: on FIRUser.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)unlinkFromProvider:(NSString *)provider
completion:(nullable FIRAuthResultCallback)completion;
@@ -389,54 +363,42 @@ NS_SWIFT_NAME(User)
is complete, or fails. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was
+
+ + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
sent in the request.
- </li>
- <li>@c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in
+ + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
the console for this action.
- </li>
- <li>@c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for
+ + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
sending update email.
- </li>
- <li>@c FIRAuthErrorCodeUserNotFound - Indicates the user account was not found.</li>
- </ul>
+ + `FIRAuthErrorCodeUserNotFound` - Indicates the user account was not found.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)sendEmailVerificationWithCompletion:(nullable FIRSendEmailVerificationCallback)completion;
/** @fn sendEmailVerificationWithActionCodeSettings:completion:
@brief Initiates email verification for the user.
- @param actionCodeSettings An @c FIRActionCodeSettings object containing settings related to
+ @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to
handling action codes.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was
+
+ + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
sent in the request.
- </li>
- <li>@c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in
+ + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
the console for this action.
- </li>
- <li>@c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for
+ + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
sending update email.
- </li>
- <li>@c FIRAuthErrorCodeUserNotFound - Indicates the user account was not found.</li>
- <li>@c FIRAuthErrorCodeMissingIosBundleID - Indicates that the iOS bundle ID is missing when
+ + `FIRAuthErrorCodeUserNotFound` - Indicates the user account was not found.
+ + `FIRAuthErrorCodeMissingIosBundleID` - Indicates that the iOS bundle ID is missing when
a iOS App Store ID is provided.
- </li>
- <li>@c FIRAuthErrorCodeMissingAndroidPackageName - Indicates that the android package name
- is missing when the @c androidInstallApp flag is set to true.
- </li>
- <li>@c FIRAuthErrorCodeUnauthorizedDomain - Indicates that the domain specified in the
+ + `FIRAuthErrorCodeMissingAndroidPackageName` - Indicates that the android package name
+ is missing when the `androidInstallApp` flag is set to true.
+ + `FIRAuthErrorCodeUnauthorizedDomain` - Indicates that the domain specified in the
continue URL is not whitelisted in the Firebase console.
- </li>
- <li>@c FIRAuthErrorCodeInvalidContinueURI - Indicates that the domain specified in the
+ + `FIRAuthErrorCodeInvalidContinueURI` - Indicates that the domain specified in the
continue URI is not valid.
- </li>
- </ul>
*/
- (void)sendEmailVerificationWithActionCodeSettings:(FIRActionCodeSettings *)actionCodeSettings
completion:(nullable FIRSendEmailVerificationCallback)
@@ -449,15 +411,13 @@ NS_SWIFT_NAME(User)
complete, or fails. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating email is a security sensitive
+
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive
operation that requires a recent login from the user. This error indicates the user
has not signed in recently enough. To resolve, reauthenticate the user by invoking
reauthenticateWithCredential:completion: on FIRUser.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)deleteWithCompletion:(nullable FIRUserProfileChangeCallback)completion;
@@ -473,21 +433,21 @@ NS_SWIFT_NAME(UserProfileChangeRequest)
@interface FIRUserProfileChangeRequest : NSObject
/** @fn init
- @brief Please use @c FIRUser.profileChangeRequest
+ @brief Please use `FIRUser.profileChangeRequest`
*/
- (instancetype)init NS_UNAVAILABLE;
/** @property displayName
@brief The user's display name.
@remarks It is an error to set this property after calling
- @c FIRUserProfileChangeRequest.commitChangesWithCallback:
+ `FIRUserProfileChangeRequest.commitChangesWithCallback:`
*/
@property(nonatomic, copy, nullable) NSString *displayName;
/** @property photoURL
@brief The user's photo URL.
@remarks It is an error to set this property after calling
- @c FIRUserProfileChangeRequest.commitChangesWithCallback:
+ `FIRUserProfileChangeRequest.commitChangesWithCallback:`
*/
@property(nonatomic, copy, nullable) NSURL *photoURL;
diff --git a/Firebase/Auth/Source/RPCs/FIRCreateAuthURIResponse.m b/Firebase/Auth/Source/RPCs/FIRCreateAuthURIResponse.m
index c6b9d03..12ef97c 100644
--- a/Firebase/Auth/Source/RPCs/FIRCreateAuthURIResponse.m
+++ b/Firebase/Auth/Source/RPCs/FIRCreateAuthURIResponse.m
@@ -16,8 +16,6 @@
#import "FIRCreateAuthURIResponse.h"
-#import "FIRAuthErrorUtils.h"
-
@implementation FIRCreateAuthURIResponse
- (BOOL)setWithDictionary:(NSDictionary *)dictionary
diff --git a/Firebase/Auth/Source/RPCs/FIRDeleteAccountResponse.m b/Firebase/Auth/Source/RPCs/FIRDeleteAccountResponse.m
index 671a41f..ae98175 100644
--- a/Firebase/Auth/Source/RPCs/FIRDeleteAccountResponse.m
+++ b/Firebase/Auth/Source/RPCs/FIRDeleteAccountResponse.m
@@ -16,8 +16,6 @@
#import "FIRDeleteAccountResponse.h"
-#import "FIRAuthErrorUtils.h"
-
@implementation FIRDeleteAccountResponse
- (BOOL)setWithDictionary:(NSDictionary *)dictionary
diff --git a/Firebase/Auth/Source/RPCs/FIRGetOOBConfirmationCodeResponse.m b/Firebase/Auth/Source/RPCs/FIRGetOOBConfirmationCodeResponse.m
index bd028f1..0b6c416 100644
--- a/Firebase/Auth/Source/RPCs/FIRGetOOBConfirmationCodeResponse.m
+++ b/Firebase/Auth/Source/RPCs/FIRGetOOBConfirmationCodeResponse.m
@@ -16,8 +16,6 @@
#import "FIRGetOOBConfirmationCodeResponse.h"
-#import "FIRAuthErrorUtils.h"
-
NS_ASSUME_NONNULL_BEGIN
/** @var kOOBCodeKey
diff --git a/Firebase/Auth/Source/RPCs/FIRResetPasswordResponse.m b/Firebase/Auth/Source/RPCs/FIRResetPasswordResponse.m
index 9a1556b..6092cfe 100644
--- a/Firebase/Auth/Source/RPCs/FIRResetPasswordResponse.m
+++ b/Firebase/Auth/Source/RPCs/FIRResetPasswordResponse.m
@@ -16,8 +16,6 @@
#import "FIRResetPasswordResponse.h"
-#import "FIRAuthErrorUtils.h"
-
@implementation FIRResetPasswordResponse
- (BOOL)setWithDictionary:(NSDictionary *)dictionary
diff --git a/Firebase/Auth/Source/RPCs/FIRSetAccountInfoResponse.m b/Firebase/Auth/Source/RPCs/FIRSetAccountInfoResponse.m
index 6e228eb..ff9c7a6 100644
--- a/Firebase/Auth/Source/RPCs/FIRSetAccountInfoResponse.m
+++ b/Firebase/Auth/Source/RPCs/FIRSetAccountInfoResponse.m
@@ -16,8 +16,6 @@
#import "FIRSetAccountInfoResponse.h"
-#import "FIRAuthErrorUtils.h"
-
@implementation FIRSetAccountInfoResponseProviderUserInfo
- (instancetype)initWithDictionary:(NSDictionary *)dictionary {
diff --git a/Firebase/Auth/Source/RPCs/FIRSignUpNewUserResponse.m b/Firebase/Auth/Source/RPCs/FIRSignUpNewUserResponse.m
index 7e58c5d..2071e07 100644
--- a/Firebase/Auth/Source/RPCs/FIRSignUpNewUserResponse.m
+++ b/Firebase/Auth/Source/RPCs/FIRSignUpNewUserResponse.m
@@ -16,8 +16,6 @@
#import "FIRSignUpNewUserResponse.h"
-#import "FIRAuthErrorUtils.h"
-
@implementation FIRSignUpNewUserResponse
- (BOOL)setWithDictionary:(NSDictionary *)dictionary
diff --git a/Firebase/Auth/Source/RPCs/FIRVerifyAssertionResponse.m b/Firebase/Auth/Source/RPCs/FIRVerifyAssertionResponse.m
index 8c970c8..5ee39fa 100644
--- a/Firebase/Auth/Source/RPCs/FIRVerifyAssertionResponse.m
+++ b/Firebase/Auth/Source/RPCs/FIRVerifyAssertionResponse.m
@@ -16,8 +16,6 @@
#import "FIRVerifyAssertionResponse.h"
-#import "FIRAuthErrorUtils.h"
-
@implementation FIRVerifyAssertionResponse
- (BOOL)setWithDictionary:(NSDictionary *)dictionary
diff --git a/Firebase/Auth/Source/RPCs/FIRVerifyCustomTokenResponse.m b/Firebase/Auth/Source/RPCs/FIRVerifyCustomTokenResponse.m
index 8a87141..b6c3818 100644
--- a/Firebase/Auth/Source/RPCs/FIRVerifyCustomTokenResponse.m
+++ b/Firebase/Auth/Source/RPCs/FIRVerifyCustomTokenResponse.m
@@ -16,8 +16,6 @@
#import "FIRVerifyCustomTokenResponse.h"
-#import "FIRAuthErrorUtils.h"
-
@implementation FIRVerifyCustomTokenResponse
- (BOOL)setWithDictionary:(NSDictionary *)dictionary
diff --git a/Firebase/Auth/Source/RPCs/FIRVerifyPasswordResponse.m b/Firebase/Auth/Source/RPCs/FIRVerifyPasswordResponse.m
index d2c4a7c..71b4edd 100644
--- a/Firebase/Auth/Source/RPCs/FIRVerifyPasswordResponse.m
+++ b/Firebase/Auth/Source/RPCs/FIRVerifyPasswordResponse.m
@@ -16,8 +16,6 @@
#import "FIRVerifyPasswordResponse.h"
-#import "FIRAuthErrorUtils.h"
-
@implementation FIRVerifyPasswordResponse
- (BOOL)setWithDictionary:(NSDictionary *)dictionary
diff --git a/Firebase/Core/CHANGELOG.md b/Firebase/Core/CHANGELOG.md
new file mode 100644
index 0000000..7051167
--- /dev/null
+++ b/Firebase/Core/CHANGELOG.md
@@ -0,0 +1,28 @@
+# v4.0.14 -- M21.1
+- [changed] Removed AppKit dependency for community macOS build.
+
+# 2017-11-30 -- v4.0.12 -- M20.2
+- [fixed] Removed `FIR_SWIFT_NAME` macro, replaced with proper `NS_SWIFT_NAME`.
+
+# 2017-11-14 -- v4.0.11 -- M20.1
+- [feature] Added `-FIRLoggerForceSTDERR` launch argument flag to force STDERR
+ output for all Firebase logging
+
+# 2017-08-25 -- v4.0.6 -- M18.1
+- [changed] Removed unused method
+
+# 2017-08-09 -- v4.0.5 -- M18.0
+- [changed] Log an error for an incorrectly configured bundle ID instead of an info
+ message.
+
+# 2017-07-12 -- v4.0.4 -- M17.4
+- [changed] Switched to using the https://cocoapods.org/pods/nanopb pod instead of
+ linking nanopb in (preventing linker conflicts).
+
+# 2017-06-06 -- v4.0.1 -- M17.1
+- [fixed] Improved diagnostic messages for Swift
+
+# 2017-05-17 -- v4.0.0 -- M17
+- [changed] Update FIROptions to have a simpler constructor and mutable properties
+- [feature] Swift naming update, FIR prefix dropped
+- [changed] Internal cleanup for open source release
diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m
index 835a1a4..22c9369 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,23 @@ 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.");
+ }
+ });
+ }
}
}
@@ -350,7 +368,9 @@ static FIRApp *sDefaultApp;
NSLocalizedRecoverySuggestionErrorKey :
@"Check formatting and location of GoogleService-Info.plist."
};
- return FIRCreateError(kFirebaseCoreErrorDomain, FIRErrorCodeInvalidPlistFile, errorDict);
+ return [NSError errorWithDomain:kFirebaseCoreErrorDomain
+ code:FIRErrorCodeInvalidPlistFile
+ userInfo:errorDict];
}
+ (NSError *)errorForSubspecConfigurationFailureWithDomain:(NSString *)domain
@@ -361,7 +381,7 @@ static FIRApp *sDefaultApp;
[NSString stringWithFormat:@"Configuration failed for service %@.", service];
NSDictionary *errorDict =
@{NSLocalizedDescriptionKey : description, NSLocalizedFailureReasonErrorKey : reason};
- return FIRCreateError(domain, code, errorDict);
+ return [NSError errorWithDomain:domain code:code userInfo:errorDict];
}
+ (NSError *)errorForInvalidAppID {
@@ -371,7 +391,9 @@ static FIRApp *sDefaultApp;
@"Check formatting and location of GoogleService-Info.plist or GoogleAppID set in the "
@"customized options."
};
- return FIRCreateError(kFirebaseCoreErrorDomain, FIRErrorCodeInvalidAppID, errorDict);
+ return [NSError errorWithDomain:kFirebaseCoreErrorDomain
+ code:FIRErrorCodeInvalidAppID
+ userInfo:errorDict];
}
+ (BOOL)isDefaultAppConfigured {
diff --git a/Firebase/Core/FIRErrors.m b/Firebase/Core/FIRErrors.m
index 3c7e39a..6d6d52d 100644
--- a/Firebase/Core/FIRErrors.m
+++ b/Firebase/Core/FIRErrors.m
@@ -27,7 +27,3 @@ NSString *const kFirebaseDurableDeepLinkErrorDomain = @"com.firebase.durabledeep
NSString *const kFirebaseInstanceIDErrorDomain = @"com.firebase.instanceid";
NSString *const kFirebasePerfErrorDomain = @"com.firebase.perf";
NSString *const kFirebaseStorageErrorDomain = @"com.firebase.storage";
-
-NSError *FIRCreateError(NSString *domain, enum FIRErrorCode code, NSDictionary *userInfo) {
- return [NSError errorWithDomain:domain code:code userInfo:userInfo];
-}
diff --git a/Firebase/Core/FIRLogger.m b/Firebase/Core/FIRLogger.m
index ba22bde..01231a7 100644
--- a/Firebase/Core/FIRLogger.m
+++ b/Firebase/Core/FIRLogger.m
@@ -15,6 +15,7 @@
#import "Private/FIRLogger.h"
#import "FIRLoggerLevel.h"
+#import "Private/FIRVersion.h"
#import "third_party/FIRAppEnvironmentUtil.h"
#include <asl.h>
@@ -164,13 +165,13 @@ void FIRSetLoggerLevel(FIRLoggerLevel loggerLevel) {
return;
}
FIRLoggerInitializeASL();
- dispatch_async(sFIRClientQueue, ^{
- // We should not raise the logger level if we are running from App Store.
- if (loggerLevel >= FIRLoggerLevelNotice && [FIRAppEnvironmentUtil isFromAppStore]) {
- return;
- }
+ // We should not raise the logger level if we are running from App Store.
+ if (loggerLevel >= FIRLoggerLevelNotice && [FIRAppEnvironmentUtil isFromAppStore]) {
+ return;
+ }
- sFIRLoggerMaximumLevel = loggerLevel;
+ sFIRLoggerMaximumLevel = loggerLevel;
+ dispatch_async(sFIRClientQueue, ^{
asl_set_filter(sFIRLoggerClient, ASL_FILTER_MASK_UPTO(loggerLevel));
});
}
@@ -229,7 +230,8 @@ void FIRLogBasic(FIRLoggerLevel level,
NSCAssert(numberOfMatches == 1, @"Incorrect message code format.");
#endif
NSString *logMsg = [[NSString alloc] initWithFormat:message arguments:args_ptr];
- logMsg = [NSString stringWithFormat:@"%@[%@] %@", service, messageCode, logMsg];
+ logMsg = [NSString
+ stringWithFormat:@"%s - %@[%@] %@", FirebaseVersionString, service, messageCode, logMsg];
dispatch_async(sFIRClientQueue, ^{
asl_log(sFIRLoggerClient, NULL, level, "%s", logMsg.UTF8String);
});
diff --git a/Firebase/Core/FIRNetworkURLSession.m b/Firebase/Core/FIRNetworkURLSession.m
index d9c6f3a..c3da674 100644
--- a/Firebase/Core/FIRNetworkURLSession.m
+++ b/Firebase/Core/FIRNetworkURLSession.m
@@ -428,6 +428,7 @@
- (NSURLSessionConfiguration *)backgroundSessionConfigWithSessionID:(NSString *)sessionID {
#if (TARGET_OS_OSX && defined(MAC_OS_X_VERSION_10_10) && \
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10) || \
+ TARGET_OS_TV || \
(TARGET_OS_IOS && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
// iOS 8/10.10 builds require the new backgroundSessionConfiguration method name.
diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m
index 841c70b..fc92a55 100644
--- a/Firebase/Core/FIROptions.m
+++ b/Firebase/Core/FIROptions.m
@@ -42,7 +42,7 @@ NSString *const kFIRIsSignInEnabled = @"IS_SIGNIN_ENABLED";
NSString *const kFIRLibraryVersionID =
@"4" // Major version (one or more digits)
@"00" // Minor version (exactly 2 digits)
- @"12" // Build number (exactly 2 digits)
+ @"14" // Build number (exactly 2 digits)
@"000"; // Fixed "000"
// Plist file name.
NSString *const kServiceInfoFileName = @"GoogleService-Info";
@@ -62,12 +62,19 @@ NSString *const kFIRExceptionBadModification =
@property(nonatomic, readwrite) NSMutableDictionary *optionsDictionary;
/**
- * Combination of analytics options from both the main plist and the GoogleService-Info.plist.
+ * Calls `analyticsOptionsDictionaryWithInfoDictionary:` using [NSBundle mainBundle].infoDictionary.
+ * It combines analytics options from both the infoDictionary and the GoogleService-Info.plist.
* Values which are present in the main plist override values from the GoogleService-Info.plist.
*/
@property(nonatomic, readonly) NSDictionary *analyticsOptionsDictionary;
/**
+ * Combination of analytics options from both the infoDictionary and the GoogleService-Info.plist.
+ * Values which are present in the infoDictionary override values from the GoogleService-Info.plist.
+ */
+- (NSDictionary *)analyticsOptionsDictionaryWithInfoDictionary:(NSDictionary *)infoDictionary;
+
+/**
* Throw exception if editing is locked when attempting to modify an option.
*/
- (void)checkEditingLocked;
@@ -346,16 +353,15 @@ static NSDictionary *sDefaultOptionsDictionary = nil;
#pragma mark - Internal instance methods
-- (NSDictionary *)analyticsOptionsDictionary {
+- (NSDictionary *)analyticsOptionsDictionaryWithInfoDictionary:(NSDictionary *)infoDictionary {
dispatch_once(&_createAnalyticsOptionsDictionaryOnce, ^{
NSMutableDictionary *tempAnalyticsOptions = [[NSMutableDictionary alloc] init];
- NSDictionary *mainInfoDictionary = [NSBundle mainBundle].infoDictionary;
NSArray *measurementKeys = @[
kFIRIsMeasurementEnabled, kFIRIsAnalyticsCollectionEnabled,
kFIRIsAnalyticsCollectionDeactivated
];
for (NSString *key in measurementKeys) {
- id value = mainInfoDictionary[key] ?: self.optionsDictionary[key] ?: nil;
+ id value = infoDictionary[key] ?: self.optionsDictionary[key] ?: nil;
if (!value) {
continue;
}
@@ -366,6 +372,10 @@ static NSDictionary *sDefaultOptionsDictionary = nil;
return _analyticsOptionsDictionary;
}
+- (NSDictionary *)analyticsOptionsDictionary {
+ return [self analyticsOptionsDictionaryWithInfoDictionary:[NSBundle mainBundle].infoDictionary];
+}
+
/**
* Whether or not Measurement was enabled. Measurement is enabled unless explicitly disabled in
* GoogleService-Info.plist. This uses the old plist flag IS_MEASUREMENT_ENABLED, which should still
diff --git a/Firebase/Core/FIRReachabilityChecker.m b/Firebase/Core/FIRReachabilityChecker.m
index 733dffe..cac87ff 100644
--- a/Firebase/Core/FIRReachabilityChecker.m
+++ b/Firebase/Core/FIRReachabilityChecker.m
@@ -177,7 +177,7 @@ static NSString *const kFIRReachabilityDisconnectedStatus = @"Disconnected";
// Reachable flag is set. Check further flags.
if (!(flags & kSCNetworkReachabilityFlagsConnectionRequired)) {
// Connection required flag is not set, so we have connectivity.
-#if TARGET_OS_IOS
+#if TARGET_OS_IOS || TARGET_OS_TV
status = (flags & kSCNetworkReachabilityFlagsIsWWAN) ? kFIRReachabilityViaCellular
: kFIRReachabilityViaWifi;
#elif TARGET_OS_OSX
@@ -188,7 +188,7 @@ static NSString *const kFIRReachabilityDisconnectedStatus = @"Disconnected";
!(flags & kSCNetworkReachabilityFlagsInterventionRequired)) {
// If the connection on demand or connection on traffic flag is set, and user intervention
// is not required, we have connectivity.
-#if TARGET_OS_IOS
+#if TARGET_OS_IOS || TARGET_OS_TV
status = (flags & kSCNetworkReachabilityFlagsIsWWAN) ? kFIRReachabilityViaCellular
: kFIRReachabilityViaWifi;
#elif TARGET_OS_OSX
diff --git a/Firebase/Core/FIRVersion.m b/Firebase/Core/FIRVersion.m
new file mode 100644
index 0000000..00a6741
--- /dev/null
+++ b/Firebase/Core/FIRVersion.m
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef Firebase_VERSION
+#error "Firebase_VERSION is not defined: add -DFirebase_VERSION=... to the build invocation"
+#endif
+
+#ifndef FIRCore_VERSION
+#error "FIRCore_VERSION is not defined: add -DFIRCore_VERSION=... to the build invocation"
+#endif
+
+// The following two macros supply the incantation so that the C
+// preprocessor does not try to parse the version as a floating
+// point number. See
+// https://www.guyrutenberg.com/2008/12/20/expanding-macros-into-string-constants-in-c/
+#define STR(x) STR_EXPAND(x)
+#define STR_EXPAND(x) #x
+
+const unsigned char *const FirebaseVersionString =
+ (const unsigned char *const)STR(Firebase_VERSION);
+
+const unsigned char *const FirebaseCoreVersionString =
+ (const unsigned char *const)STR(FIRCore_VERSION);
diff --git a/Firebase/Core/Private/FIRErrors.h b/Firebase/Core/Private/FIRErrors.h
index 9a03575..cf69252 100644
--- a/Firebase/Core/Private/FIRErrors.h
+++ b/Firebase/Core/Private/FIRErrors.h
@@ -31,13 +31,3 @@ extern NSString *const kFirebaseDurableDeepLinkErrorDomain;
extern NSString *const kFirebaseInstanceIDErrorDomain;
extern NSString *const kFirebasePerfErrorDomain;
extern NSString *const kFirebaseStorageErrorDomain;
-
-/**
- * Factory for a NSError in the Firebase error domain.
- *
- * @param domain Domain of Firebase error.
- * @param code Error code that NSError should have.
- * @param userInfo User info that NSError should have.
- * @return An NSError in the Firebase domain.
- */
-extern NSError *FIRCreateError(NSString *domain, FIRErrorCode code, NSDictionary *userInfo);
diff --git a/Firebase/Core/Private/FIRVersion.h b/Firebase/Core/Private/FIRVersion.h
new file mode 100644
index 0000000..f18f61f
--- /dev/null
+++ b/Firebase/Core/Private/FIRVersion.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+/** The version of the Firebase SDK. */
+FOUNDATION_EXPORT const unsigned char *const FirebaseVersionString;
+
+/** The version of the FirebaseCore Component. */
+FOUNDATION_EXPORT const unsigned char *const FirebaseCoreVersionString;
diff --git a/Firebase/Core/third_party/FIRAppEnvironmentUtil.h b/Firebase/Core/third_party/FIRAppEnvironmentUtil.h
index 7ae9827..09ee504 100644
--- a/Firebase/Core/third_party/FIRAppEnvironmentUtil.h
+++ b/Firebase/Core/third_party/FIRAppEnvironmentUtil.h
@@ -16,12 +16,6 @@
#import <Foundation/Foundation.h>
-#if TARGET_OS_IOS
-#import <UIKit/UIKit.h>
-#elif TARGET_OS_OSX
-#import <AppKit/AppKit.h>
-#endif
-
@interface FIRAppEnvironmentUtil : NSObject
/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator,
@@ -46,12 +40,4 @@
/// Indicates whether it is running inside an extension or an app.
+ (BOOL)isAppExtension;
-#if TARGET_OS_IOS
-/// Returns the [UIApplication sharedApplication] if it is running on an app, not an extension.
-+ (UIApplication *)sharedApplication;
-#elif TARGET_OS_OSX
-/// Returns the [NSApplication sharedApplication].
-+ (NSApplication *)sharedApplication;
-#endif
-
@end
diff --git a/Firebase/Core/third_party/FIRAppEnvironmentUtil.m b/Firebase/Core/third_party/FIRAppEnvironmentUtil.m
index 3a08cfa..90e66f0 100644
--- a/Firebase/Core/third_party/FIRAppEnvironmentUtil.m
+++ b/Firebase/Core/third_party/FIRAppEnvironmentUtil.m
@@ -13,6 +13,9 @@
// limitations under the License.
#import <Foundation/Foundation.h>
+#if TARGET_OS_IOS || TARGET_OS_TV
+#import <UIKit/UIKit.h>
+#endif
#import "FIRAppEnvironmentUtil.h"
@@ -36,6 +39,12 @@ struct encryption_info_command {
@implementation FIRAppEnvironmentUtil
+/// A key for the Info.plist to enable or disable checking if the App Store is running in a sandbox.
+/// This will affect your data integrity when using Firebase Analytics, as it will disable some
+/// necessary checks.
+static NSString *const kFIRAppStoreReceiptURLCheckEnabledKey =
+ @"FirebaseAppStoreReceiptURLCheckEnabled";
+
/// The file name of the sandbox receipt. This is available on iOS >= 8.0
static NSString *const kFIRAIdentitySandboxReceiptFileName = @"sandboxReceipt";
@@ -152,13 +161,23 @@ static BOOL isAppEncrypted() {
}
+ (BOOL)isAppStoreReceiptSandbox {
+ // Since checking the App Store's receipt URL can be memory intensive, check the option in the
+ // Info.plist if developers opted out of this check.
+ id enableSandboxCheck =
+ [[NSBundle mainBundle] objectForInfoDictionaryKey:kFIRAppStoreReceiptURLCheckEnabledKey];
+ if (enableSandboxCheck &&
+ [enableSandboxCheck isKindOfClass:[NSNumber class]] &&
+ ![enableSandboxCheck boolValue]) {
+ return NO;
+ }
+
NSURL *appStoreReceiptURL = [NSBundle mainBundle].appStoreReceiptURL;
NSString *appStoreReceiptFileName = appStoreReceiptURL.lastPathComponent;
return [appStoreReceiptFileName isEqualToString:kFIRAIdentitySandboxReceiptFileName];
}
+ (BOOL)hasEmbeddedMobileProvision {
- #if TARGET_OS_IOS
+ #if TARGET_OS_IOS || TARGET_OS_TV
return [[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"].length > 0;
#elif TARGET_OS_OSX
return NO;
@@ -166,7 +185,7 @@ static BOOL isAppEncrypted() {
}
+ (BOOL)isSimulator {
- #if TARGET_OS_IOS
+ #if TARGET_OS_IOS || TARGET_OS_TV
NSString *platform = [FIRAppEnvironmentUtil deviceModel];
return [platform isEqual:@"x86_64"] || [platform isEqual:@"i386"];
#elif TARGET_OS_OSX
@@ -188,7 +207,7 @@ static BOOL isAppEncrypted() {
}
+ (NSString *)systemVersion {
- #if TARGET_OS_IOS
+ #if TARGET_OS_IOS || TARGET_OS_TV
return [UIDevice currentDevice].systemVersion;
#elif TARGET_OS_OSX
return [NSProcessInfo processInfo].operatingSystemVersionString;
@@ -196,7 +215,7 @@ static BOOL isAppEncrypted() {
}
+ (BOOL)isAppExtension {
- #if TARGET_OS_IOS
+ #if TARGET_OS_IOS || TARGET_OS_TV
// Documented by <a href="https://goo.gl/RRB2Up">Apple</a>
BOOL appExtension = [[[NSBundle mainBundle] bundlePath] hasSuffix:@".appex"];
return appExtension;
@@ -205,29 +224,10 @@ static BOOL isAppEncrypted() {
#endif
}
-#if TARGET_OS_IOS
-+ (UIApplication *)sharedApplication {
- if ([FIRAppEnvironmentUtil isAppExtension]) {
- return nil;
- }
- id sharedApplication = nil;
- Class uiApplicationClass = NSClassFromString(@"UIApplication");
- if (uiApplicationClass &&
- [uiApplicationClass respondsToSelector:(NSSelectorFromString(@"sharedApplication"))]) {
- sharedApplication = [uiApplicationClass sharedApplication];
- }
- return sharedApplication;
-}
-#elif TARGET_OS_OSX
-+ (NSApplication *)sharedApplication {
- return [NSApplication sharedApplication];
-}
-#endif
-
#pragma mark - Helper methods
+ (BOOL)hasSCInfoFolder {
- #if TARGET_OS_IOS
+ #if TARGET_OS_IOS || TARGET_OS_TV
NSString *bundlePath = [NSBundle mainBundle].bundlePath;
NSString *scInfoPath = [bundlePath stringByAppendingPathComponent:@"SC_Info"];
return [[NSFileManager defaultManager] fileExistsAtPath:scInfoPath];
diff --git a/Firebase/Database/Api/FIRDatabase.m b/Firebase/Database/Api/FIRDatabase.m
index 80190f7..b01d669 100644
--- a/Firebase/Database/Api/FIRDatabase.m
+++ b/Firebase/Database/Api/FIRDatabase.m
@@ -28,7 +28,7 @@
#import "FRepoInfo.h"
#import "FIRDatabaseConfig.h"
#import "FIRDatabaseReference_Private.h"
-#import "FIROptions.h"
+#import <FirebaseCore/FIROptions.h>
@interface FIRDatabase ()
@property (nonatomic, strong) FRepoInfo *repoInfo;
diff --git a/Firebase/Database/Api/FIRDatabaseConfig.m b/Firebase/Database/Api/FIRDatabaseConfig.m
index f4639f9..3341c7e 100644
--- a/Firebase/Database/Api/FIRDatabaseConfig.m
+++ b/Firebase/Database/Api/FIRDatabaseConfig.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRApp.h"
+#import <FirebaseCore/FIRApp.h>
#import "FIRDatabaseConfig.h"
#import "FIRDatabaseConfig_Private.h"
#import "FIRNoopAuthTokenProvider.h"
diff --git a/Firebase/Database/CHANGELOG.md b/Firebase/Database/CHANGELOG.md
index 867def1..6867cce 100644
--- a/Firebase/Database/CHANGELOG.md
+++ b/Firebase/Database/CHANGELOG.md
@@ -1,3 +1,9 @@
+# v4.1.4
+- [added] Firebase Database is now community-supported on tvOS.
+
+# v4.1.3
+- [changed] Internal cleanup in the firebase-ios-sdk repository. Functionality of the RTDB SDK is not affected.
+
# v4.1.2
- [fixed] Addresses race condition that can occur during the initialization of empty snapshots.
diff --git a/Firebase/Database/Core/FPersistentConnection.m b/Firebase/Database/Core/FPersistentConnection.m
index 643f9b4..870727c 100644
--- a/Firebase/Database/Core/FPersistentConnection.m
+++ b/Firebase/Database/Core/FPersistentConnection.m
@@ -15,7 +15,7 @@
*/
#import <Foundation/Foundation.h>
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <netinet/in.h>
#import <dlfcn.h>
@@ -925,7 +925,7 @@ static void reachabilityCallback(SCNetworkReachabilityRef ref, SCNetworkReachabi
- (void) sendConnectStats {
NSMutableDictionary *stats = [NSMutableDictionary dictionary];
- #if TARGET_OS_IOS
+ #if TARGET_OS_IOS || TARGET_OS_TV
if (self.config.persistenceEnabled) {
stats[@"persistence.ios.enabled"] = @1;
}
diff --git a/Firebase/Database/Core/FRepo.m b/Firebase/Database/Core/FRepo.m
index 8062933..1c4b956 100644
--- a/Firebase/Database/Core/FRepo.m
+++ b/Firebase/Database/Core/FRepo.m
@@ -16,7 +16,7 @@
#import <Foundation/Foundation.h>
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import <dlfcn.h>
#import "FRepo.h"
#import "FSnapshotUtilities.h"
@@ -53,7 +53,7 @@
#import "FValueEventRegistration.h"
#import "FEmptyNode.h"
-#if TARGET_OS_IOS
+#if TARGET_OS_IOS || TARGET_OS_TV
#import <UIKit/UIKit.h>
#endif
@@ -546,7 +546,7 @@
return;
// Targetted compilation is ONLY for testing. UIKit is weak-linked in actual release build.
- #if TARGET_OS_IOS
+ #if TARGET_OS_IOS || TARGET_OS_TV
// The idea is to wait until any outstanding sets get written to disk. Since the sets might still be in our
// dispatch queue, we wait for the dispatch queue to catch up and for persistence to catch up.
// This may be undesirable though. The dispatch queue might just be processing a bunch of incoming data or
diff --git a/Firebase/Database/Core/FRepoManager.m b/Firebase/Database/Core/FRepoManager.m
index c5194d5..31c3efc 100644
--- a/Firebase/Database/Core/FRepoManager.m
+++ b/Firebase/Database/Core/FRepoManager.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FRepoManager.h"
#import "FRepo.h"
#import "FIRDatabaseQuery_Private.h"
diff --git a/Firebase/Database/Core/FSyncTree.m b/Firebase/Database/Core/FSyncTree.m
index 1bbc606..688a43b 100644
--- a/Firebase/Database/Core/FSyncTree.m
+++ b/Firebase/Database/Core/FSyncTree.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FSyncTree.h"
#import "FListenProvider.h"
#import "FWriteTree.h"
diff --git a/Firebase/Database/Core/Utilities/FIRRetryHelper.m b/Firebase/Database/Core/Utilities/FIRRetryHelper.m
index bcd9060..fca02f5 100644
--- a/Firebase/Database/Core/Utilities/FIRRetryHelper.m
+++ b/Firebase/Database/Core/Utilities/FIRRetryHelper.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FIRRetryHelper.h"
#import "FUtilities.h"
diff --git a/Firebase/Database/Core/View/FChildEventRegistration.m b/Firebase/Database/Core/View/FChildEventRegistration.m
index 9d44ef5..a98ea47 100644
--- a/Firebase/Database/Core/View/FChildEventRegistration.m
+++ b/Firebase/Database/Core/View/FChildEventRegistration.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FChildEventRegistration.h"
#import "FIRDatabaseQuery_Private.h"
#import "FQueryParams.h"
diff --git a/Firebase/Database/Core/View/FValueEventRegistration.m b/Firebase/Database/Core/View/FValueEventRegistration.m
index f6baa52..6a98629 100644
--- a/Firebase/Database/Core/View/FValueEventRegistration.m
+++ b/Firebase/Database/Core/View/FValueEventRegistration.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FValueEventRegistration.h"
#import "FIRDatabaseQuery_Private.h"
#import "FQueryParams.h"
diff --git a/Firebase/Database/FIRDatabaseReference.m b/Firebase/Database/FIRDatabaseReference.m
index 4f27493..e99b6d9 100644
--- a/Firebase/Database/FIRDatabaseReference.m
+++ b/Firebase/Database/FIRDatabaseReference.m
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-#import "FIRApp.h"
+#import <FirebaseCore/FIRApp.h>
#import "FIRDatabaseReference.h"
-#import "FIROptions.h"
+#import <FirebaseCore/FIROptions.h>
#import "FUtilities.h"
#import "FNextPushId.h"
#import "FIRDatabaseQuery_Private.h"
diff --git a/Firebase/Database/Persistence/FLevelDBStorageEngine.m b/Firebase/Database/Persistence/FLevelDBStorageEngine.m
index 3a63319..7de9ebf 100644
--- a/Firebase/Database/Persistence/FLevelDBStorageEngine.m
+++ b/Firebase/Database/Persistence/FLevelDBStorageEngine.m
@@ -18,7 +18,7 @@
#import "FLevelDBStorageEngine.h"
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "APLevelDB.h"
#import "FSnapshotUtilities.h"
#import "FWriteRecord.h"
@@ -211,7 +211,7 @@ static NSString* trackedQueryKeysKey(NSUInteger trackedQueryId, NSString *key) {
}
+ (NSString *) firebaseDir {
- #if TARGET_OS_IOS
+ #if TARGET_OS_IOS || TARGET_OS_TV
NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [dirPaths objectAtIndex:0];
return [documentsDir stringByAppendingPathComponent:@"firebase"];
diff --git a/Firebase/Database/Persistence/FPersistenceManager.m b/Firebase/Database/Persistence/FPersistenceManager.m
index 0ae75b3..b488f3e 100644
--- a/Firebase/Database/Persistence/FPersistenceManager.m
+++ b/Firebase/Database/Persistence/FPersistenceManager.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FPersistenceManager.h"
#import "FLevelDBStorageEngine.h"
#import "FCacheNode.h"
diff --git a/Firebase/Database/Persistence/FTrackedQueryManager.m b/Firebase/Database/Persistence/FTrackedQueryManager.m
index 9673fb7..9176f25 100644
--- a/Firebase/Database/Persistence/FTrackedQueryManager.m
+++ b/Firebase/Database/Persistence/FTrackedQueryManager.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FTrackedQueryManager.h"
#import "FImmutableTree.h"
#import "FLevelDBStorageEngine.h"
diff --git a/Firebase/Database/Realtime/FConnection.m b/Firebase/Database/Realtime/FConnection.m
index 50756e6..08014f6 100644
--- a/Firebase/Database/Realtime/FConnection.m
+++ b/Firebase/Database/Realtime/FConnection.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FConnection.h"
#import "FConstants.h"
diff --git a/Firebase/Database/Realtime/FWebSocketConnection.m b/Firebase/Database/Realtime/FWebSocketConnection.m
index fe90344..49d6bd8 100644
--- a/Firebase/Database/Realtime/FWebSocketConnection.m
+++ b/Firebase/Database/Realtime/FWebSocketConnection.m
@@ -18,14 +18,14 @@
#import <Foundation/Foundation.h>
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FWebSocketConnection.h"
#import "FConstants.h"
#import "FIRDatabaseReference.h"
#import "FStringUtilities.h"
#import "FIRDatabase_Private.h"
-#if TARGET_OS_IOS
+#if TARGET_OS_IOS || TARGET_OS_TV
#import <UIKit/UIKit.h>
#endif
@@ -85,7 +85,7 @@
BOOL hasUiDeviceClass = NO;
// Targetted compilation is ONLY for testing. UIKit is weak-linked in actual release build.
- #if TARGET_OS_IOS
+ #if TARGET_OS_IOS || TARGET_OS_TV
Class uiDeviceClass = NSClassFromString(@"UIDevice");
if (uiDeviceClass) {
systemVersion = [uiDeviceClass currentDevice].systemVersion;
diff --git a/Firebase/Database/Utilities/FUtilities.m b/Firebase/Database/Utilities/FUtilities.m
index befe874..d0a9a43 100644
--- a/Firebase/Database/Utilities/FUtilities.m
+++ b/Firebase/Database/Utilities/FUtilities.m
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
#import "FUtilities.h"
#import "FStringUtilities.h"
#import "FConstants.h"
diff --git a/Firebase/Database/third_party/SocketRocket/FSRWebSocket.m b/Firebase/Database/third_party/SocketRocket/FSRWebSocket.m
index a2c857b..c80dbb0 100644
--- a/Firebase/Database/third_party/SocketRocket/FSRWebSocket.m
+++ b/Firebase/Database/third_party/SocketRocket/FSRWebSocket.m
@@ -18,7 +18,7 @@
#import "FSRWebSocket.h"
-#if TARGET_OS_IOS
+#if TARGET_OS_IOS || TARGET_OS_TV
#define HAS_ICU
#endif
@@ -28,7 +28,7 @@
#import <unicode/utf8.h>
#endif
-#if TARGET_OS_IOS
+#if TARGET_OS_IOS || TARGET_OS_TV
#import <Endian.h>
#elif TARGET_OS_OSX
#import <CoreServices/CoreServices.h>
diff --git a/Firebase/Messaging/FIRMessaging.m b/Firebase/Messaging/FIRMessaging.m
index 5e46a80..11cacb3 100644
--- a/Firebase/Messaging/FIRMessaging.m
+++ b/Firebase/Messaging/FIRMessaging.m
@@ -36,7 +36,9 @@
#import "FIRMessagingSyncMessageManager.h"
#import "FIRMessagingUtilities.h"
#import "FIRMessagingVersionUtilities.h"
-#import "FIRReachabilityChecker.h"
+
+#import <FirebaseCore/FIRReachabilityChecker.h>
+
#import "NSError+FIRMessaging.h"
static NSString *const kFIRMessagingMessageViaAPNSRootKey = @"aps";
@@ -412,7 +414,10 @@ static NSString *const kFIRMessagingPlistAutoInitEnabled =
}];
} else if ([appDelegate respondsToSelector:openURLWithOptionsSelector]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
[appDelegate application:application openURL:url options:@{}];
+#pragma clang diagnostic pop
// Similarly, |application:openURL:sourceApplication:annotation:| will also always be called, due
// to the default swizzling done by FIRAAppDelegateProxy in Firebase Analytics
@@ -763,7 +768,10 @@ static NSString *const kFIRMessagingPlistAutoInitEnabled =
- (void)receiver:(FIRMessagingReceiver *)receiver
receivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
if ([self.delegate respondsToSelector:@selector(messaging:didReceiveMessage:)]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
[self.delegate messaging:self didReceiveMessage:remoteMessage];
+#pragma pop
} else if ([self.delegate respondsToSelector:@selector(applicationReceivedRemoteMessage:)]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
diff --git a/Firebase/Messaging/FIRMessagingClient.m b/Firebase/Messaging/FIRMessagingClient.m
index 13e1775..51a62b7 100644
--- a/Firebase/Messaging/FIRMessagingClient.m
+++ b/Firebase/Messaging/FIRMessagingClient.m
@@ -16,6 +16,8 @@
#import "FIRMessagingClient.h"
+#import <FirebaseCore/FIRReachabilityChecker.h>
+
#import "FIRMessagingConnection.h"
#import "FIRMessagingConstants.h"
#import "FIRMessagingDataMessageManager.h"
@@ -25,7 +27,6 @@
#import "FIRMessagingRmqManager.h"
#import "FIRMessagingTopicsCommon.h"
#import "FIRMessagingUtilities.h"
-#import "FIRReachabilityChecker.h"
#import "NSError+FIRMessaging.h"
static const NSTimeInterval kConnectTimeoutInterval = 40.0;
diff --git a/Firebase/Messaging/FIRMessagingContextManagerService.m b/Firebase/Messaging/FIRMessagingContextManagerService.m
index 1c9f653..65f64ad 100644
--- a/Firebase/Messaging/FIRMessagingContextManagerService.m
+++ b/Firebase/Messaging/FIRMessagingContextManagerService.m
@@ -143,8 +143,11 @@ typedef NS_ENUM(NSUInteger, FIRMessagingContextManagerMessageType) {
}
if ([apsDictionary[kFIRMessagingContextManagerTitleKey] length]) {
// |alertTitle| is iOS 8.2+, so check if we can set it
- if ([notification respondsToSelector:@selector(setAlertTitle:)]) {
+ if ([notification respondsToSelector:@selector(setAlertTitle:)]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
notification.alertTitle = apsDictionary[kFIRMessagingContextManagerTitleKey];
+#pragma pop
}
}
diff --git a/Firebase/Messaging/FIRMessagingLogger.m b/Firebase/Messaging/FIRMessagingLogger.m
index ee4e771..62eb8da 100644
--- a/Firebase/Messaging/FIRMessagingLogger.m
+++ b/Firebase/Messaging/FIRMessagingLogger.m
@@ -16,7 +16,7 @@
#import "FIRMessagingLogger.h"
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
@implementation FIRMessagingLogger
diff --git a/Firebase/Messaging/FIRMessagingRmq2PersistentStore.m b/Firebase/Messaging/FIRMessagingRmq2PersistentStore.m
index 189f366..f58bd52 100644
--- a/Firebase/Messaging/FIRMessagingRmq2PersistentStore.m
+++ b/Firebase/Messaging/FIRMessagingRmq2PersistentStore.m
@@ -104,7 +104,10 @@ typedef void(^FCMOutgoingRmqMessagesTableHandler)(int64_t rmqId, int8_t tag, NSD
// Utility to create an NSString from a sqlite3 result code
NSString * _Nonnull FIRMessagingStringFromSQLiteResult(int result) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
const char *errorStr = sqlite3_errstr(result);
+#pragma pop
NSString *errorString = [NSString stringWithFormat:@"%d - %s", result, errorStr];
return errorString;
}
diff --git a/Firebase/Messaging/Protos/GtalkCore.pbobjc.h b/Firebase/Messaging/Protos/GtalkCore.pbobjc.h
index d4c8c8c..46d2d9c 100644
--- a/Firebase/Messaging/Protos/GtalkCore.pbobjc.h
+++ b/Firebase/Messaging/Protos/GtalkCore.pbobjc.h
@@ -197,6 +197,9 @@ typedef GPB_ENUM(GtalkClientEvent_Type) {
GtalkClientEvent_Type_DiscardedEvents = 1,
GtalkClientEvent_Type_FailedConnection = 2,
GtalkClientEvent_Type_SuccessfulConnection = 3,
+ GtalkClientEvent_Type_McsReconnectRequest = 4,
+ GtalkClientEvent_Type_FailedSocketCreationMcsReconnect = 5,
+ GtalkClientEvent_Type_McsReconnectLimited = 6,
};
GPBEnumDescriptor *GtalkClientEvent_Type_EnumDescriptor(void);
@@ -207,6 +210,22 @@ GPBEnumDescriptor *GtalkClientEvent_Type_EnumDescriptor(void);
**/
BOOL GtalkClientEvent_Type_IsValidValue(int32_t value);
+#pragma mark - Enum GtalkClientEvent_McsReconnectAction
+
+typedef GPB_ENUM(GtalkClientEvent_McsReconnectAction) {
+ GtalkClientEvent_McsReconnectAction_None = 0,
+ GtalkClientEvent_McsReconnectAction_NotConnected = 1,
+ GtalkClientEvent_McsReconnectAction_TooSoon = 2,
+};
+
+GPBEnumDescriptor *GtalkClientEvent_McsReconnectAction_EnumDescriptor(void);
+
+/**
+ * Checks to see if the given value is defined by the enum or was not known at
+ * the time this source was generated.
+ **/
+BOOL GtalkClientEvent_McsReconnectAction_IsValidValue(int32_t value);
+
#pragma mark - GtalkGtalkCoreRoot
/**
@@ -247,9 +266,9 @@ typedef GPB_ENUM(GtalkHeartbeatPing_FieldNumber) {
@property(nonatomic, readwrite) BOOL hasStatus;
-@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower;
+@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower DEPRECATED_ATTRIBUTE;
/** Test to see if @c cellTower has been set. */
-@property(nonatomic, readwrite) BOOL hasCellTower;
+@property(nonatomic, readwrite) BOOL hasCellTower DEPRECATED_ATTRIBUTE;
@property(nonatomic, readwrite) int32_t intervalMs;
@@ -282,9 +301,9 @@ typedef GPB_ENUM(GtalkHeartbeatAck_FieldNumber) {
@property(nonatomic, readwrite) BOOL hasStatus;
-@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower;
+@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower DEPRECATED_ATTRIBUTE;
/** Test to see if @c cellTower has been set. */
-@property(nonatomic, readwrite) BOOL hasCellTower;
+@property(nonatomic, readwrite) BOOL hasCellTower DEPRECATED_ATTRIBUTE;
@property(nonatomic, readwrite) int32_t intervalMs;
@@ -406,7 +425,6 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
GtalkLoginRequest_FieldNumber_DeviceId = 6,
GtalkLoginRequest_FieldNumber_LastRmqId = 7,
GtalkLoginRequest_FieldNumber_SettingArray = 8,
- GtalkLoginRequest_FieldNumber_Compress = 9,
GtalkLoginRequest_FieldNumber_ReceivedPersistentIdArray = 10,
GtalkLoginRequest_FieldNumber_IncludeStreamIds = 11,
GtalkLoginRequest_FieldNumber_HeartbeatStat = 13,
@@ -420,6 +438,8 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
GtalkLoginRequest_FieldNumber_GcmStartTimeMs = 21,
GtalkLoginRequest_FieldNumber_ClientEventArray = 22,
GtalkLoginRequest_FieldNumber_OnFallback = 23,
+ GtalkLoginRequest_FieldNumber_NoPendingUpstream = 24,
+ GtalkLoginRequest_FieldNumber_ReconnectRequestId = 25,
};
@interface GtalkLoginRequest : GPBMessage
@@ -464,10 +484,6 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
@property(nonatomic, readonly) NSUInteger settingArray_Count;
-@property(nonatomic, readwrite) int32_t compress;
-
-@property(nonatomic, readwrite) BOOL hasCompress;
-
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *receivedPersistentIdArray;
/** The number of items in @c receivedPersistentIdArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger receivedPersistentIdArray_Count;
@@ -507,9 +523,9 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
@property(nonatomic, readwrite) BOOL hasTokenVersionInfo;
-@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower;
+@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower DEPRECATED_ATTRIBUTE;
/** Test to see if @c cellTower has been set. */
-@property(nonatomic, readwrite) BOOL hasCellTower;
+@property(nonatomic, readwrite) BOOL hasCellTower DEPRECATED_ATTRIBUTE;
@property(nonatomic, readwrite) uint64_t gcmStartTimeMs;
@@ -524,6 +540,14 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
@property(nonatomic, readwrite) BOOL onFallback;
@property(nonatomic, readwrite) BOOL hasOnFallback;
+
+@property(nonatomic, readwrite) BOOL noPendingUpstream;
+
+@property(nonatomic, readwrite) BOOL hasNoPendingUpstream;
+
+@property(nonatomic, readwrite) int32_t reconnectRequestId;
+
+@property(nonatomic, readwrite) BOOL hasReconnectRequestId;
@end
#pragma mark - GtalkLoginResponse
@@ -1242,9 +1266,9 @@ typedef GPB_ENUM(GtalkDataMessageStanza_FieldNumber) {
@property(nonatomic, readwrite) BOOL hasFlags;
-@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower;
+@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower DEPRECATED_ATTRIBUTE;
/** Test to see if @c cellTower has been set. */
-@property(nonatomic, readwrite) BOOL hasCellTower;
+@property(nonatomic, readwrite) BOOL hasCellTower DEPRECATED_ATTRIBUTE;
@property(nonatomic, readwrite) int32_t priority;
@@ -1273,6 +1297,7 @@ typedef GPB_ENUM(GtalkCellTower_FieldNumber) {
GtalkCellTower_FieldNumber_KnownCongestionStatus = 2,
};
+DEPRECATED_ATTRIBUTE
@interface GtalkCellTower : GPBMessage
@@ -1297,6 +1322,7 @@ typedef GPB_ENUM(GtalkClientEvent_FieldNumber) {
GtalkClientEvent_FieldNumber_TimeConnectionEndedMs = 203,
GtalkClientEvent_FieldNumber_ErrorCode = 204,
GtalkClientEvent_FieldNumber_TimeConnectionEstablishedMs = 300,
+ GtalkClientEvent_FieldNumber_McsReconnectAction = 400,
};
@interface GtalkClientEvent : GPBMessage
@@ -1333,6 +1359,10 @@ typedef GPB_ENUM(GtalkClientEvent_FieldNumber) {
@property(nonatomic, readwrite) uint64_t timeConnectionEstablishedMs;
@property(nonatomic, readwrite) BOOL hasTimeConnectionEstablishedMs;
+
+@property(nonatomic, readwrite) GtalkClientEvent_McsReconnectAction mcsReconnectAction;
+
+@property(nonatomic, readwrite) BOOL hasMcsReconnectAction;
@end
NS_ASSUME_NONNULL_END
diff --git a/Firebase/Messaging/Protos/GtalkCore.pbobjc.m b/Firebase/Messaging/Protos/GtalkCore.pbobjc.m
index f4efe22..06c9134 100644
--- a/Firebase/Messaging/Protos/GtalkCore.pbobjc.m
+++ b/Firebase/Messaging/Protos/GtalkCore.pbobjc.m
@@ -503,7 +503,6 @@ typedef struct GtalkHeartbeatConfig__storage_ {
@dynamic hasDeviceId, deviceId;
@dynamic hasLastRmqId, lastRmqId;
@dynamic settingArray, settingArray_Count;
-@dynamic hasCompress, compress;
@dynamic receivedPersistentIdArray, receivedPersistentIdArray_Count;
@dynamic hasIncludeStreamIds, includeStreamIds;
@dynamic hasHeartbeatStat, heartbeatStat;
@@ -517,12 +516,14 @@ typedef struct GtalkHeartbeatConfig__storage_ {
@dynamic hasGcmStartTimeMs, gcmStartTimeMs;
@dynamic clientEventArray, clientEventArray_Count;
@dynamic hasOnFallback, onFallback;
+@dynamic hasNoPendingUpstream, noPendingUpstream;
+@dynamic hasReconnectRequestId, reconnectRequestId;
typedef struct GtalkLoginRequest__storage_ {
uint32_t _has_storage_[1];
- int32_t compress;
GtalkLoginRequest_AuthService authService;
int32_t networkType;
+ int32_t reconnectRequestId;
NSString *id_p;
NSString *domain;
NSString *user;
@@ -620,15 +621,6 @@ typedef struct GtalkLoginRequest__storage_ {
.dataType = GPBDataTypeMessage,
},
{
- .name = "compress",
- .dataTypeSpecific.className = NULL,
- .number = GtalkLoginRequest_FieldNumber_Compress,
- .hasIndex = 7,
- .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, compress),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeInt32,
- },
- {
.name = "receivedPersistentIdArray",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_ReceivedPersistentIdArray,
@@ -641,8 +633,8 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "includeStreamIds",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_IncludeStreamIds,
- .hasIndex = 8,
- .offset = 9, // Stored in _has_storage_ to save space.
+ .hasIndex = 7,
+ .offset = 8, // Stored in _has_storage_ to save space.
.flags = GPBFieldOptional,
.dataType = GPBDataTypeBool,
},
@@ -650,7 +642,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "heartbeatStat",
.dataTypeSpecific.className = GPBStringifySymbol(GtalkHeartbeatStat),
.number = GtalkLoginRequest_FieldNumber_HeartbeatStat,
- .hasIndex = 10,
+ .hasIndex = 9,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, heartbeatStat),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeMessage,
@@ -659,8 +651,8 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "useRmq2",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_UseRmq2,
- .hasIndex = 11,
- .offset = 12, // Stored in _has_storage_ to save space.
+ .hasIndex = 10,
+ .offset = 11, // Stored in _has_storage_ to save space.
.flags = GPBFieldOptional,
.dataType = GPBDataTypeBool,
},
@@ -668,7 +660,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "accountId",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_AccountId,
- .hasIndex = 13,
+ .hasIndex = 12,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, accountId),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt64,
@@ -677,7 +669,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "authService",
.dataTypeSpecific.enumDescFunc = GtalkLoginRequest_AuthService_EnumDescriptor,
.number = GtalkLoginRequest_FieldNumber_AuthService,
- .hasIndex = 14,
+ .hasIndex = 13,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, authService),
.flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
.dataType = GPBDataTypeEnum,
@@ -686,7 +678,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "networkType",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_NetworkType,
- .hasIndex = 15,
+ .hasIndex = 14,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, networkType),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt32,
@@ -695,7 +687,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "status",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_Status,
- .hasIndex = 16,
+ .hasIndex = 15,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, status),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt64,
@@ -704,7 +696,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "tokenVersionInfo",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_TokenVersionInfo,
- .hasIndex = 17,
+ .hasIndex = 16,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, tokenVersionInfo),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
@@ -713,7 +705,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "cellTower",
.dataTypeSpecific.className = GPBStringifySymbol(GtalkCellTower),
.number = GtalkLoginRequest_FieldNumber_CellTower,
- .hasIndex = 18,
+ .hasIndex = 17,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, cellTower),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeMessage,
@@ -722,7 +714,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "gcmStartTimeMs",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_GcmStartTimeMs,
- .hasIndex = 19,
+ .hasIndex = 18,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, gcmStartTimeMs),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeUInt64,
@@ -740,11 +732,29 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "onFallback",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_OnFallback,
- .hasIndex = 20,
- .offset = 21, // Stored in _has_storage_ to save space.
+ .hasIndex = 19,
+ .offset = 20, // Stored in _has_storage_ to save space.
.flags = GPBFieldOptional,
.dataType = GPBDataTypeBool,
},
+ {
+ .name = "noPendingUpstream",
+ .dataTypeSpecific.className = NULL,
+ .number = GtalkLoginRequest_FieldNumber_NoPendingUpstream,
+ .hasIndex = 21,
+ .offset = 22, // Stored in _has_storage_ to save space.
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBool,
+ },
+ {
+ .name = "reconnectRequestId",
+ .dataTypeSpecific.className = NULL,
+ .number = GtalkLoginRequest_FieldNumber_ReconnectRequestId,
+ .hasIndex = 23,
+ .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, reconnectRequestId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
};
GPBDescriptor *localDescriptor =
[GPBDescriptor allocDescriptorForClass:[GtalkLoginRequest class]
@@ -2730,6 +2740,9 @@ typedef struct GtalkTalkMetadata__storage_ {
#pragma mark - GtalkCellTower
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-implementations"
+
@implementation GtalkCellTower
@dynamic hasId_p, id_p;
@@ -2782,6 +2795,8 @@ typedef struct GtalkCellTower__storage_ {
@end
+#pragma clang diagnostic pop
+
#pragma mark - GtalkClientEvent
@implementation GtalkClientEvent
@@ -2794,6 +2809,7 @@ typedef struct GtalkCellTower__storage_ {
@dynamic hasTimeConnectionEndedMs, timeConnectionEndedMs;
@dynamic hasErrorCode, errorCode;
@dynamic hasTimeConnectionEstablishedMs, timeConnectionEstablishedMs;
+@dynamic hasMcsReconnectAction, mcsReconnectAction;
typedef struct GtalkClientEvent__storage_ {
uint32_t _has_storage_[1];
@@ -2802,6 +2818,7 @@ typedef struct GtalkClientEvent__storage_ {
int32_t networkType;
int32_t networkPort;
int32_t errorCode;
+ GtalkClientEvent_McsReconnectAction mcsReconnectAction;
uint64_t timeConnectionStartedMs;
uint64_t timeConnectionEndedMs;
uint64_t timeConnectionEstablishedMs;
@@ -2885,6 +2902,15 @@ typedef struct GtalkClientEvent__storage_ {
.flags = GPBFieldOptional,
.dataType = GPBDataTypeUInt64,
},
+ {
+ .name = "mcsReconnectAction",
+ .dataTypeSpecific.enumDescFunc = GtalkClientEvent_McsReconnectAction_EnumDescriptor,
+ .number = GtalkClientEvent_FieldNumber_McsReconnectAction,
+ .hasIndex = 8,
+ .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, mcsReconnectAction),
+ .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
+ .dataType = GPBDataTypeEnum,
+ },
};
GPBDescriptor *localDescriptor =
[GPBDescriptor allocDescriptorForClass:[GtalkClientEvent class]
@@ -2909,12 +2935,17 @@ GPBEnumDescriptor *GtalkClientEvent_Type_EnumDescriptor(void) {
if (!descriptor) {
static const char *valueNames =
"Unknown\000DiscardedEvents\000FailedConnection"
- "\000SuccessfulConnection\000";
+ "\000SuccessfulConnection\000McsReconnectReques"
+ "t\000FailedSocketCreationMcsReconnect\000McsRe"
+ "connectLimited\000";
static const int32_t values[] = {
GtalkClientEvent_Type_Unknown,
GtalkClientEvent_Type_DiscardedEvents,
GtalkClientEvent_Type_FailedConnection,
GtalkClientEvent_Type_SuccessfulConnection,
+ GtalkClientEvent_Type_McsReconnectRequest,
+ GtalkClientEvent_Type_FailedSocketCreationMcsReconnect,
+ GtalkClientEvent_Type_McsReconnectLimited,
};
GPBEnumDescriptor *worker =
[GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkClientEvent_Type)
@@ -2935,6 +2966,45 @@ BOOL GtalkClientEvent_Type_IsValidValue(int32_t value__) {
case GtalkClientEvent_Type_DiscardedEvents:
case GtalkClientEvent_Type_FailedConnection:
case GtalkClientEvent_Type_SuccessfulConnection:
+ case GtalkClientEvent_Type_McsReconnectRequest:
+ case GtalkClientEvent_Type_FailedSocketCreationMcsReconnect:
+ case GtalkClientEvent_Type_McsReconnectLimited:
+ return YES;
+ default:
+ return NO;
+ }
+}
+
+#pragma mark - Enum GtalkClientEvent_McsReconnectAction
+
+GPBEnumDescriptor *GtalkClientEvent_McsReconnectAction_EnumDescriptor(void) {
+ static GPBEnumDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static const char *valueNames =
+ "None\000NotConnected\000TooSoon\000";
+ static const int32_t values[] = {
+ GtalkClientEvent_McsReconnectAction_None,
+ GtalkClientEvent_McsReconnectAction_NotConnected,
+ GtalkClientEvent_McsReconnectAction_TooSoon,
+ };
+ GPBEnumDescriptor *worker =
+ [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkClientEvent_McsReconnectAction)
+ valueNames:valueNames
+ values:values
+ count:(uint32_t)(sizeof(values) / sizeof(int32_t))
+ enumVerifier:GtalkClientEvent_McsReconnectAction_IsValidValue];
+ if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
+ [worker release];
+ }
+ }
+ return descriptor;
+}
+
+BOOL GtalkClientEvent_McsReconnectAction_IsValidValue(int32_t value__) {
+ switch (value__) {
+ case GtalkClientEvent_McsReconnectAction_None:
+ case GtalkClientEvent_McsReconnectAction_NotConnected:
+ case GtalkClientEvent_McsReconnectAction_TooSoon:
return YES;
default:
return NO;
diff --git a/Firebase/Storage/CHANGELOG.md b/Firebase/Storage/CHANGELOG.md
index 00fc3b7..1077b9f 100644
--- a/Firebase/Storage/CHANGELOG.md
+++ b/Firebase/Storage/CHANGELOG.md
@@ -1,3 +1,9 @@
+# v2.1.2
+- [added] Firebase Storage is now community-supported on tvOS.
+
+# v2.1.1
+- [changed] Internal cleanup in the firebase-ios-sdk repository. Functionality of the Storage SDK is not affected.
+
# v2.1.0
- [added] Added 'md5Hash' to FIRStorageMetadata.
diff --git a/Firebase/Storage/FIRStorage.m b/Firebase/Storage/FIRStorage.m
index 21657bc..c09a1df 100644
--- a/Firebase/Storage/FIRStorage.m
+++ b/Firebase/Storage/FIRStorage.m
@@ -22,8 +22,8 @@
#import "FIRStorageUtils.h"
#import "FIRStorage_Private.h"
-#import "FIRApp.h"
-#import "FIROptions.h"
+#import <FirebaseCore/FIRApp.h>
+#import <FirebaseCore/FIROptions.h>
#import <GTMSessionFetcher/GTMSessionFetcher.h>
#import <GTMSessionFetcher/GTMSessionFetcherLogging.h>
diff --git a/Firebase/Storage/FIRStorageErrors.m b/Firebase/Storage/FIRStorageErrors.m
index 92c0536..ecfae02 100644
--- a/Firebase/Storage/FIRStorageErrors.m
+++ b/Firebase/Storage/FIRStorageErrors.m
@@ -63,7 +63,7 @@
NSString *totalString = total ? @(total).stringValue : @"unknown";
NSString *sizeString = total ? @(size).stringValue : @"unknown";
NSString *const kSizeExceededErrorFormat =
- @"Attempeted to download object with size of %@ bytes, "
+ @"Attempted to download object with size of %@ bytes, "
@"which exceeds the maximum size of %@ bytes. "
@"Consider raising the maximum download size, or using "
@"[FIRStorageReference writeToFile:]";
@@ -104,7 +104,7 @@
break;
case FIRStorageErrorCodeUnknown:
- /* Fall through to default case for unknown errors */
+ /* Fall through to default case for unknown errors */
default:
errorMessage = @"An unknown error occurred, please check the server response.";
diff --git a/Firebase/Storage/FIRStorageObservableTask.m b/Firebase/Storage/FIRStorageObservableTask.m
index 58455f6..7d7c61f 100644
--- a/Firebase/Storage/FIRStorageObservableTask.m
+++ b/Firebase/Storage/FIRStorageObservableTask.m
@@ -102,7 +102,7 @@
break;
case FIRStorageTaskStatusUnknown:
- // Fall through to exception case if an unknown status is passed
+ // Fall through to exception case if an unknown status is passed
default:
[NSException raise:NSInternalInconsistencyException
diff --git a/Firebase/Storage/FIRStorageReference.m b/Firebase/Storage/FIRStorageReference.m
index 2a4e0c2..7bc1934 100644
--- a/Firebase/Storage/FIRStorageReference.m
+++ b/Firebase/Storage/FIRStorageReference.m
@@ -28,8 +28,8 @@
#import "FIRStorageUtils.h"
#import "FIRStorage_Private.h"
-#import "FIRApp.h"
-#import "FIROptions.h"
+#import <FirebaseCore/FIRApp.h>
+#import <FirebaseCore/FIROptions.h>
#import <GTMSessionFetcher/GTMSessionFetcher.h>
#import "GTMSessionFetcherService.h"
diff --git a/Firebase/Storage/FIRStorageTokenAuthorizer.m b/Firebase/Storage/FIRStorageTokenAuthorizer.m
index 8ac53f0..14400af 100644
--- a/Firebase/Storage/FIRStorageTokenAuthorizer.m
+++ b/Firebase/Storage/FIRStorageTokenAuthorizer.m
@@ -22,8 +22,8 @@
#import "FirebaseStorage.h"
-#import "FIRApp.h"
-#import "FIROptions.h"
+#import <FirebaseCore/FIRApp.h>
+#import <FirebaseCore/FIROptions.h>
@implementation FIRStorageTokenAuthorizer {
@private
diff --git a/Firebase/Storage/FIRStorageUtils.m b/Firebase/Storage/FIRStorageUtils.m
index 216b4b6..bc517ff 100644
--- a/Firebase/Storage/FIRStorageUtils.m
+++ b/Firebase/Storage/FIRStorageUtils.m
@@ -14,7 +14,7 @@
#import <Foundation/Foundation.h>
-#if TARGET_OS_IOS
+#if TARGET_OS_IOS || TARGET_OS_TV
#import <MobileCoreServices/MobileCoreServices.h>
#elif TARGET_OS_OSX
#import <CoreServices/CoreServices.h>