aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Firebase/Auth/Source/Public/FIRActionCodeSettings.h4
-rw-r--r--Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h4
-rw-r--r--Firebase/Auth/Source/Public/FIRAuth.h41
-rw-r--r--Firebase/Auth/Source/Public/FIRAuthAPNSTokenType.h4
-rw-r--r--Firebase/Auth/Source/Public/FIRAuthCredential.h4
-rw-r--r--Firebase/Auth/Source/Public/FIRAuthDataResult.h4
-rw-r--r--Firebase/Auth/Source/Public/FIRAuthErrors.h14
-rw-r--r--Firebase/Auth/Source/Public/FIRAuthSwiftNameSupport.h29
-rw-r--r--Firebase/Auth/Source/Public/FIRAuthUIDelegate.h6
-rw-r--r--Firebase/Auth/Source/Public/FIREmailAuthProvider.h6
-rw-r--r--Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h6
-rw-r--r--Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h6
-rw-r--r--Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h6
-rw-r--r--Firebase/Auth/Source/Public/FIROAuthProvider.h4
-rw-r--r--Firebase/Auth/Source/Public/FIRPhoneAuthCredential.h3
-rw-r--r--Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h12
-rw-r--r--Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h6
-rw-r--r--Firebase/Auth/Source/Public/FIRUser.h21
-rw-r--r--Firebase/Auth/Source/Public/FIRUserInfo.h4
-rw-r--r--Firebase/Auth/Source/Public/FIRUserMetadata.h4
-rw-r--r--Firebase/Auth/Source/Public/FirebaseAuth.h1
-rw-r--r--Firebase/Core/Public/FIRAnalyticsConfiguration.h6
-rw-r--r--Firebase/Core/Public/FIRApp.h16
-rw-r--r--Firebase/Core/Public/FIRConfiguration.h7
-rw-r--r--Firebase/Core/Public/FIRCoreSwiftNameSupport.h29
-rw-r--r--Firebase/Core/Public/FIRLoggerLevel.h4
-rw-r--r--Firebase/Core/Public/FIROptions.h12
-rw-r--r--Firebase/Database/Public/FIRDataEventType.h3
-rw-r--r--Firebase/Database/Public/FIRDataSnapshot.h3
-rw-r--r--Firebase/Database/Public/FIRDatabase.h9
-rw-r--r--Firebase/Database/Public/FIRDatabaseQuery.h5
-rw-r--r--Firebase/Database/Public/FIRDatabaseReference.h3
-rw-r--r--Firebase/Database/Public/FIRDatabaseSwiftNameSupport.h29
-rw-r--r--Firebase/Database/Public/FIRMutableData.h3
-rw-r--r--Firebase/Database/Public/FIRServerValue.h4
-rw-r--r--Firebase/Database/Public/FIRTransactionResult.h3
-rw-r--r--Firebase/Messaging/Public/FIRMessaging.h75
-rw-r--r--Firebase/Storage/Public/FIRStorage.h11
-rw-r--r--Firebase/Storage/Public/FIRStorageConstants.h22
-rw-r--r--Firebase/Storage/Public/FIRStorageDownloadTask.h3
-rw-r--r--Firebase/Storage/Public/FIRStorageMetadata.h4
-rw-r--r--Firebase/Storage/Public/FIRStorageObservableTask.h3
-rw-r--r--Firebase/Storage/Public/FIRStorageReference.h21
-rw-r--r--Firebase/Storage/Public/FIRStorageSwiftNameSupport.h29
-rw-r--r--Firebase/Storage/Public/FIRStorageTask.h5
-rw-r--r--Firebase/Storage/Public/FIRStorageTaskSnapshot.h3
-rw-r--r--Firebase/Storage/Public/FIRStorageUploadTask.h3
-rw-r--r--Firestore/Source/API/FIRFirestore+Internal.h3
-rw-r--r--Firestore/Source/Public/FIRCollectionReference.h13
-rw-r--r--Firestore/Source/Public/FIRDocumentChange.h6
-rw-r--r--Firestore/Source/Public/FIRDocumentReference.h19
-rw-r--r--Firestore/Source/Public/FIRDocumentSnapshot.h4
-rw-r--r--Firestore/Source/Public/FIRFieldPath.h6
-rw-r--r--Firestore/Source/Public/FIRFieldValue.h8
-rw-r--r--Firestore/Source/Public/FIRFirestore.h12
-rw-r--r--Firestore/Source/Public/FIRFirestoreErrors.h6
-rw-r--r--Firestore/Source/Public/FIRFirestoreSettings.h4
-rw-r--r--Firestore/Source/Public/FIRFirestoreSwiftNameSupport.h29
-rw-r--r--Firestore/Source/Public/FIRGeoPoint.h4
-rw-r--r--Firestore/Source/Public/FIRListenerRegistration.h4
-rw-r--r--Firestore/Source/Public/FIRQuery.h61
-rw-r--r--Firestore/Source/Public/FIRQuerySnapshot.h4
-rw-r--r--Firestore/Source/Public/FIRSetOptions.h4
-rw-r--r--Firestore/Source/Public/FIRSnapshotMetadata.h4
-rw-r--r--Firestore/Source/Public/FIRTransaction.h14
-rw-r--r--Firestore/Source/Public/FIRWriteBatch.h12
66 files changed, 234 insertions, 487 deletions
diff --git a/Firebase/Auth/Source/Public/FIRActionCodeSettings.h b/Firebase/Auth/Source/Public/FIRActionCodeSettings.h
index d0a54e4..6eb4c89 100644
--- a/Firebase/Auth/Source/Public/FIRActionCodeSettings.h
+++ b/Firebase/Auth/Source/Public/FIRActionCodeSettings.h
@@ -16,14 +16,12 @@
#import <Foundation/Foundation.h>
- #import "FIRAuthSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/** @class FIRActionCodeSettings
@brief Used to set and retrieve settings related to handling action codes.
*/
- FIR_SWIFT_NAME(ActionCodeSettings)
+ NS_SWIFT_NAME(ActionCodeSettings)
@interface FIRActionCodeSettings : NSObject
/** @property URL
diff --git a/Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h b/Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h
index 44c3646..36dd3aa 100644
--- a/Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h
+++ b/Firebase/Auth/Source/Public/FIRAdditionalUserInfo.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
@class FIRVerifyAssertionResponse;
NS_ASSUME_NONNULL_BEGIN
@@ -25,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
/** @class FIRAdditionalUserInfo
@brief Represents additional user data returned from an identity provider.
*/
-FIR_SWIFT_NAME(AdditionalUserInfo)
+NS_SWIFT_NAME(AdditionalUserInfo)
@interface FIRAdditionalUserInfo : NSObject
/** @fn init
diff --git a/Firebase/Auth/Source/Public/FIRAuth.h b/Firebase/Auth/Source/Public/FIRAuth.h
index 2935916..42b3ac5 100644
--- a/Firebase/Auth/Source/Public/FIRAuth.h
+++ b/Firebase/Auth/Source/Public/FIRAuth.h
@@ -17,7 +17,6 @@
#import <Foundation/Foundation.h>
#import "FIRAuthErrors.h"
-#import "FIRAuthSwiftNameSupport.h"
#if TARGET_OS_IOS
#import "FIRAuthAPNSTokenType.h"
@@ -37,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
@brief The type of handle returned by @c FIRAuth.addAuthStateDidChangeListener:.
*/
typedef id<NSObject> FIRAuthStateDidChangeListenerHandle
- FIR_SWIFT_NAME(AuthStateDidChangeListenerHandle);
+ NS_SWIFT_NAME(AuthStateDidChangeListenerHandle);
/** @typedef FIRAuthStateDidChangeListenerBlock
@brief The type of block which can be registered as a listener for auth state did change events.
@@ -46,13 +45,13 @@ typedef id<NSObject> FIRAuthStateDidChangeListenerHandle
@param user Optionally; the current signed in user, if any.
*/
typedef void(^FIRAuthStateDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Nullable user)
- FIR_SWIFT_NAME(AuthStateDidChangeListenerBlock);
+ NS_SWIFT_NAME(AuthStateDidChangeListenerBlock);
/** @typedef FIRIDTokenDidChangeListenerHandle
@brief The type of handle returned by @c FIRAuth.addIDTokenDidChangeListener:.
*/
typedef id<NSObject> FIRIDTokenDidChangeListenerHandle
- FIR_SWIFT_NAME(IDTokenDidChangeListenerHandle);
+ NS_SWIFT_NAME(IDTokenDidChangeListenerHandle);
/** @typedef FIRIDTokenDidChangeListenerBlock
@brief The type of block which can be registered as a listener for ID token did change events.
@@ -61,7 +60,7 @@ typedef id<NSObject> FIRIDTokenDidChangeListenerHandle
@param user Optionally; the current signed in user, if any.
*/
typedef void(^FIRIDTokenDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Nullable user)
- FIR_SWIFT_NAME(IDTokenDidChangeListenerBlock);
+ NS_SWIFT_NAME(IDTokenDidChangeListenerBlock);
/** @typedef FIRAuthDataResultCallback
@brief The type of block invoked when sign-in related events complete.
@@ -72,7 +71,7 @@ typedef void(^FIRIDTokenDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Nullabl
*/
typedef void (^FIRAuthDataResultCallback)(FIRAuthDataResult *_Nullable authResult,
NSError *_Nullable error)
- FIR_SWIFT_NAME(AuthDataResultCallback);
+ NS_SWIFT_NAME(AuthDataResultCallback);
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
/**
@@ -81,7 +80,7 @@ typedef void (^FIRAuthDataResultCallback)(FIRAuthDataResult *_Nullable authResul
object parameter of the notification is the sender @c FIRAuth instance.
*/
extern const NSNotificationName FIRAuthStateDidChangeNotification
- FIR_SWIFT_NAME(AuthStateDidChange);
+ NS_SWIFT_NAME(AuthStateDidChange);
#else
/**
@brief The name of the @c NSNotificationCenter notification which is posted when the auth state
@@ -89,7 +88,7 @@ extern const NSNotificationName FIRAuthStateDidChangeNotification
object parameter of the notification is the sender @c FIRAuth instance.
*/
extern NSString *const FIRAuthStateDidChangeNotification
- FIR_SWIFT_NAME(AuthStateDidChangeNotification);
+ NS_SWIFT_NAME(AuthStateDidChangeNotification);
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
/** @typedef FIRAuthResultCallback
@@ -100,7 +99,7 @@ extern NSString *const FIRAuthStateDidChangeNotification
problem. Set to nil otherwise.
*/
typedef void (^FIRAuthResultCallback)(FIRUser *_Nullable user, NSError *_Nullable error)
- FIR_SWIFT_NAME(AuthResultCallback);
+ NS_SWIFT_NAME(AuthResultCallback);
/** @typedef FIRProviderQueryCallback
@brief The type of block invoked when a list of identity providers for a given email address is
@@ -113,7 +112,7 @@ typedef void (^FIRAuthResultCallback)(FIRUser *_Nullable user, NSError *_Nullabl
*/
typedef void (^FIRProviderQueryCallback)(NSArray<NSString *> *_Nullable providers,
NSError *_Nullable error)
- FIR_SWIFT_NAME(ProviderQueryCallback);
+ NS_SWIFT_NAME(ProviderQueryCallback);
/** @typedef FIRSendPasswordResetCallback
@brief The type of block invoked when sending a password reset email.
@@ -122,7 +121,7 @@ typedef void (^FIRProviderQueryCallback)(NSArray<NSString *> *_Nullable provider
problem. Set to nil otherwise.
*/
typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error)
- FIR_SWIFT_NAME(SendPasswordResetCallback);
+ NS_SWIFT_NAME(SendPasswordResetCallback);
/** @typedef FIRConfirmPasswordResetCallback
@brief The type of block invoked when performing a password reset.
@@ -131,7 +130,7 @@ typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error)
problem. Set to nil otherwise.
*/
typedef void (^FIRConfirmPasswordResetCallback)(NSError *_Nullable error)
- FIR_SWIFT_NAME(ConfirmPasswordResetCallback);
+ NS_SWIFT_NAME(ConfirmPasswordResetCallback);
/** @typedef FIRVerifyPasswordResetCodeCallback
@brief The type of block invoked when verifying that an out of band code should be used to
@@ -143,7 +142,7 @@ typedef void (^FIRConfirmPasswordResetCallback)(NSError *_Nullable error)
*/
typedef void (^FIRVerifyPasswordResetCodeCallback)(NSString *_Nullable email,
NSError *_Nullable error)
- FIR_SWIFT_NAME(VerifyPasswordResetCodeCallback);
+ NS_SWIFT_NAME(VerifyPasswordResetCodeCallback);
/** @typedef FIRApplyActionCodeCallback
@brief The type of block invoked when applying an action code.
@@ -152,7 +151,7 @@ typedef void (^FIRVerifyPasswordResetCodeCallback)(NSString *_Nullable email,
problem. Set to nil otherwise.
*/
typedef void (^FIRApplyActionCodeCallback)(NSError *_Nullable error)
- FIR_SWIFT_NAME(ApplyActionCodeCallback);
+ NS_SWIFT_NAME(ApplyActionCodeCallback);
/**
@brief Keys used to retrieve operation data from a @c FIRActionCodeInfo object by the
@@ -167,12 +166,12 @@ typedef NS_ENUM(NSInteger, FIRActionDataKey) {
/** For FIRActionCodeOperationRecoverEmail, the current email address for the account. */
FIRActionCodeFromEmailKey = 1
-} FIR_SWIFT_NAME(ActionDataKey);
+} NS_SWIFT_NAME(ActionDataKey);
/** @class FIRActionCodeInfo
@brief Manages information regarding action codes.
*/
-FIR_SWIFT_NAME(ActionCodeInfo)
+NS_SWIFT_NAME(ActionCodeInfo)
@interface FIRActionCodeInfo : NSObject
/**
@@ -191,7 +190,7 @@ typedef NS_ENUM(NSInteger, FIRActionCodeOperation) {
/** Action code for recover email operation. */
FIRActionCodeOperationRecoverEmail = 3,
-} FIR_SWIFT_NAME(ActionCodeOperation);
+} NS_SWIFT_NAME(ActionCodeOperation);
/**
@brief The operation being performed.
@@ -223,13 +222,13 @@ typedef NS_ENUM(NSInteger, FIRActionCodeOperation) {
*/
typedef void (^FIRCheckActionCodeCallBack)(FIRActionCodeInfo *_Nullable info,
NSError *_Nullable error)
- FIR_SWIFT_NAME(CheckActionCodeCallback);
+ NS_SWIFT_NAME(CheckActionCodeCallback);
/** @class FIRAuth
@brief Manages authentication for Firebase apps.
@remarks This class is thread-safe.
*/
-FIR_SWIFT_NAME(Auth)
+NS_SWIFT_NAME(Auth)
@interface FIRAuth : NSObject
/** @fn auth
@@ -237,7 +236,7 @@ FIR_SWIFT_NAME(Auth)
@remarks The default Firebase app must have already been configured or an exception will be
raised.
*/
-+ (FIRAuth *)auth FIR_SWIFT_NAME(auth());
++ (FIRAuth *)auth NS_SWIFT_NAME(auth());
/** @fn authWithApp:
@brief Gets the auth object for a @c FIRApp.
@@ -245,7 +244,7 @@ FIR_SWIFT_NAME(Auth)
@param app The FIRApp for which to retrieve the associated FIRAuth instance.
@return The FIRAuth instance associated with the given FIRApp.
*/
-+ (FIRAuth *)authWithApp:(FIRApp *)app FIR_SWIFT_NAME(auth(app:));
++ (FIRAuth *)authWithApp:(FIRApp *)app NS_SWIFT_NAME(auth(app:));
/** @property app
@brief Gets the @c FIRApp object that this auth object is connected to.
diff --git a/Firebase/Auth/Source/Public/FIRAuthAPNSTokenType.h b/Firebase/Auth/Source/Public/FIRAuthAPNSTokenType.h
index 87df574..4f3c9f6 100644
--- a/Firebase/Auth/Source/Public/FIRAuthAPNSTokenType.h
+++ b/Firebase/Auth/Source/Public/FIRAuthAPNSTokenType.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/**
@@ -37,6 +35,6 @@ typedef NS_ENUM(NSInteger, FIRAuthAPNSTokenType) {
/** Production token type.
*/
FIRAuthAPNSTokenTypeProd,
-} FIR_SWIFT_NAME(AuthAPNSTokenType);
+} NS_SWIFT_NAME(AuthAPNSTokenType);
NS_ASSUME_NONNULL_END
diff --git a/Firebase/Auth/Source/Public/FIRAuthCredential.h b/Firebase/Auth/Source/Public/FIRAuthCredential.h
index ce28854..106d844 100644
--- a/Firebase/Auth/Source/Public/FIRAuthCredential.h
+++ b/Firebase/Auth/Source/Public/FIRAuthCredential.h
@@ -16,14 +16,12 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/** @class FIRAuthCredential
@brief Represents a credential.
*/
-FIR_SWIFT_NAME(AuthCredential)
+NS_SWIFT_NAME(AuthCredential)
@interface FIRAuthCredential : NSObject
/** @property provider
diff --git a/Firebase/Auth/Source/Public/FIRAuthDataResult.h b/Firebase/Auth/Source/Public/FIRAuthDataResult.h
index b7f3ee0..ba16576 100644
--- a/Firebase/Auth/Source/Public/FIRAuthDataResult.h
+++ b/Firebase/Auth/Source/Public/FIRAuthDataResult.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
@class FIRAdditionalUserInfo;
@class FIRUser;
@@ -27,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
@brief Helper object that contains the result of a successful sign-in, link and reauthenticate
action. It contains references to a FIRUser instance and a FIRAdditionalUserInfo instance.
*/
-FIR_SWIFT_NAME(AuthDataResult)
+NS_SWIFT_NAME(AuthDataResult)
@interface FIRAuthDataResult : NSObject
/** @fn init
diff --git a/Firebase/Auth/Source/Public/FIRAuthErrors.h b/Firebase/Auth/Source/Public/FIRAuthErrors.h
index 1691228..fdfee19 100644
--- a/Firebase/Auth/Source/Public/FIRAuthErrors.h
+++ b/Firebase/Auth/Source/Public/FIRAuthErrors.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
/** @class FIRAuthErrors
@remarks Error Codes common to all API Methods:
<ul>
@@ -36,31 +34,31 @@
<li>@c FIRAuthErrorCodeUserDisabled</li>
</ul>
*/
-FIR_SWIFT_NAME(AuthErrors)
+NS_SWIFT_NAME(AuthErrors)
@interface FIRAuthErrors
/**
@brief The Firebase Auth error domain.
*/
-extern NSString *const FIRAuthErrorDomain FIR_SWIFT_NAME(AuthErrorDomain);
+extern NSString *const FIRAuthErrorDomain NS_SWIFT_NAME(AuthErrorDomain);
/**
@brief The key used to read the updated credential from the userinfo dictionary of the NSError
object returned in the case that the credential being linked in already in use.
*/
-extern NSString *const FIRAuthUpdatedCredentialKey FIR_SWIFT_NAME(AuthUpdatedCredentialKey);
+extern NSString *const FIRAuthUpdatedCredentialKey NS_SWIFT_NAME(AuthUpdatedCredentialKey);
/**
@brief The name of the key for the "error_name" string in the NSError userinfo dictionary.
*/
-extern NSString *const FIRAuthErrorNameKey FIR_SWIFT_NAME(AuthErrorNameKey);
+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
this key is an NSString of the email address of the account that already exists.
*/
-extern NSString *const FIRAuthErrorUserInfoEmailKey FIR_SWIFT_NAME(AuthErrorUserInfoEmailKey);
+extern NSString *const FIRAuthErrorUserInfoEmailKey NS_SWIFT_NAME(AuthErrorUserInfoEmailKey);
/**
@brief Error codes used by Firebase Auth.
@@ -308,6 +306,6 @@ typedef NS_ENUM(NSInteger, FIRAuthErrorCode) {
/** Indicates an internal error occurred.
*/
FIRAuthErrorCodeInternalError = 17999,
-} FIR_SWIFT_NAME(AuthErrorCode);
+} NS_SWIFT_NAME(AuthErrorCode);
@end
diff --git a/Firebase/Auth/Source/Public/FIRAuthSwiftNameSupport.h b/Firebase/Auth/Source/Public/FIRAuthSwiftNameSupport.h
deleted file mode 100644
index 55e1bcc..0000000
--- a/Firebase/Auth/Source/Public/FIRAuthSwiftNameSupport.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 FIR_SWIFT_NAME
-
-#import <Foundation/Foundation.h>
-
-// NS_SWIFT_NAME can only translate factory methods before the iOS 9.3 SDK.
-// Wrap it in our own macro if it's a non-compatible SDK.
-#ifdef __IPHONE_9_3
-#define FIR_SWIFT_NAME(X) NS_SWIFT_NAME(X)
-#else
-#define FIR_SWIFT_NAME(X) // Intentionally blank.
-#endif // #ifdef __IPHONE_9_3
-
-#endif // FIR_SWIFT_NAME
diff --git a/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h b/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h
index 5fc5dc5..9b32968 100644
--- a/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h
+++ b/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h
@@ -17,14 +17,12 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
-#import "FIRAuthSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/** @protocol FIRAuthUIDelegate
@brief A protocol to handle user interface interactions for Firebase Auth.
*/
-FIR_SWIFT_NAME(AuthUIDelegate)
+NS_SWIFT_NAME(AuthUIDelegate)
@protocol FIRAuthUIDelegate <NSObject>
/** @fn presentViewController:animated:completion:
@@ -47,7 +45,7 @@ FIR_SWIFT_NAME(AuthUIDelegate)
value and takes no parameters.
*/
- (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^ _Nullable)(void))completion
- FIR_SWIFT_NAME(dismiss(animated:completion:));
+ NS_SWIFT_NAME(dismiss(animated:completion:));
@end
diff --git a/Firebase/Auth/Source/Public/FIREmailAuthProvider.h b/Firebase/Auth/Source/Public/FIREmailAuthProvider.h
index 4fb5ea0..030efda 100644
--- a/Firebase/Auth/Source/Public/FIREmailAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIREmailAuthProvider.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
@class FIRAuthCredential;
NS_ASSUME_NONNULL_BEGIN
@@ -25,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
@brief A string constant identifying the email & password identity provider.
*/
-extern NSString *const FIREmailAuthProviderID FIR_SWIFT_NAME(EmailAuthProviderID);
+extern NSString *const FIREmailAuthProviderID NS_SWIFT_NAME(EmailAuthProviderID);
/**
@brief please use @c FIREmailAuthProviderID instead.
@@ -35,7 +33,7 @@ extern NSString *const FIREmailPasswordAuthProviderID __attribute__((deprecated)
/** @class FIREmailAuthProvider
@brief A concrete implementation of @c FIRAuthProvider for Email & Password Sign In.
*/
-FIR_SWIFT_NAME(EmailAuthProvider)
+NS_SWIFT_NAME(EmailAuthProvider)
@interface FIREmailAuthProvider : NSObject
/** @typedef FIREmailPasswordAuthProvider
diff --git a/Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h b/Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h
index 2307b08..dae90dc 100644
--- a/Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRFacebookAuthProvider.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
@class FIRAuthCredential;
NS_ASSUME_NONNULL_BEGIN
@@ -25,12 +23,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
@brief A string constant identifying the Facebook identity provider.
*/
-extern NSString *const FIRFacebookAuthProviderID FIR_SWIFT_NAME(FacebookAuthProviderID);
+extern NSString *const FIRFacebookAuthProviderID NS_SWIFT_NAME(FacebookAuthProviderID);
/** @class FIRFacebookAuthProvider
@brief Utility class for constructing Facebook credentials.
*/
-FIR_SWIFT_NAME(FacebookAuthProvider)
+NS_SWIFT_NAME(FacebookAuthProvider)
@interface FIRFacebookAuthProvider : NSObject
/** @fn credentialWithAccessToken:
diff --git a/Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h b/Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h
index ab5c0ef..0da3142 100644
--- a/Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRGitHubAuthProvider.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
@class FIRAuthCredential;
NS_ASSUME_NONNULL_BEGIN
@@ -25,12 +23,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
@brief A string constant identifying the GitHub identity provider.
*/
-extern NSString *const FIRGitHubAuthProviderID FIR_SWIFT_NAME(GitHubAuthProviderID);
+extern NSString *const FIRGitHubAuthProviderID NS_SWIFT_NAME(GitHubAuthProviderID);
/** @class FIRGitHubAuthProvider
@brief Utility class for constructing GitHub credentials.
*/
-FIR_SWIFT_NAME(GitHubAuthProvider)
+NS_SWIFT_NAME(GitHubAuthProvider)
@interface FIRGitHubAuthProvider : NSObject
/** @fn credentialWithToken:
diff --git a/Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h b/Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h
index 92f0db2..1386c04 100644
--- a/Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRGoogleAuthProvider.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
@class FIRAuthCredential;
NS_ASSUME_NONNULL_BEGIN
@@ -25,12 +23,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
@brief A string constant identifying the Google identity provider.
*/
-extern NSString *const FIRGoogleAuthProviderID FIR_SWIFT_NAME(GoogleAuthProviderID);
+extern NSString *const FIRGoogleAuthProviderID NS_SWIFT_NAME(GoogleAuthProviderID);
/** @class FIRGoogleAuthProvider
@brief Utility class for constructing Google Sign In credentials.
*/
-FIR_SWIFT_NAME(GoogleAuthProvider)
+NS_SWIFT_NAME(GoogleAuthProvider)
@interface FIRGoogleAuthProvider : NSObject
/** @fn credentialWithIDToken:accessToken:
diff --git a/Firebase/Auth/Source/Public/FIROAuthProvider.h b/Firebase/Auth/Source/Public/FIROAuthProvider.h
index e059b22..b20d9b6 100644
--- a/Firebase/Auth/Source/Public/FIROAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIROAuthProvider.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
@class FIRAuthCredential;
NS_ASSUME_NONNULL_BEGIN
@@ -25,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
/** @class FIROAuthProvider
@brief A concrete implementation of @c FIRAuthProvider for generic OAuth Providers.
*/
-FIR_SWIFT_NAME(OAuthProvider)
+NS_SWIFT_NAME(OAuthProvider)
@interface FIROAuthProvider : NSObject
/** @fn credentialWithProviderID:IDToken:accessToken:
diff --git a/Firebase/Auth/Source/Public/FIRPhoneAuthCredential.h b/Firebase/Auth/Source/Public/FIRPhoneAuthCredential.h
index d951564..26dfca8 100644
--- a/Firebase/Auth/Source/Public/FIRPhoneAuthCredential.h
+++ b/Firebase/Auth/Source/Public/FIRPhoneAuthCredential.h
@@ -17,14 +17,13 @@
#import <Foundation/Foundation.h>
#import "FIRAuthCredential.h"
-#import "FIRAuthSwiftNameSupport.h"
NS_ASSUME_NONNULL_BEGIN
/** @class FIRPhoneAuthCredential
@brief Implementation of FIRAuthCredential for Phone Auth credentials.
*/
-FIR_SWIFT_NAME(PhoneAuthCredential)
+NS_SWIFT_NAME(PhoneAuthCredential)
@interface FIRPhoneAuthCredential : FIRAuthCredential
/** @fn init
diff --git a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h
index 90cfebd..2d6d698 100644
--- a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
@class FIRAuth;
@class FIRPhoneAuthCredential;
@protocol FIRAuthUIDelegate;
@@ -27,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
/** @var FIRPhoneAuthProviderID
@brief A string constant identifying the phone identity provider.
*/
-extern NSString *const FIRPhoneAuthProviderID FIR_SWIFT_NAME(PhoneAuthProviderID);
+extern NSString *const FIRPhoneAuthProviderID NS_SWIFT_NAME(PhoneAuthProviderID);
/** @typedef FIRVerificationResultCallback
@brief The type of block invoked when a request to send a verification code has finished.
@@ -37,25 +35,25 @@ extern NSString *const FIRPhoneAuthProviderID FIR_SWIFT_NAME(PhoneAuthProviderID
*/
typedef void (^FIRVerificationResultCallback)(NSString *_Nullable verificationID,
NSError *_Nullable error)
- FIR_SWIFT_NAME(VerificationResultCallback);
+ NS_SWIFT_NAME(VerificationResultCallback);
/** @class FIRPhoneAuthProvider
@brief A concrete implementation of @c FIRAuthProvider for phone auth providers.
*/
-FIR_SWIFT_NAME(PhoneAuthProvider)
+NS_SWIFT_NAME(PhoneAuthProvider)
@interface FIRPhoneAuthProvider : NSObject
/** @fn provider
@brief Returns an instance of @c FIRPhoneAuthProvider for the default @c FIRAuth object.
*/
-+ (instancetype)provider FIR_SWIFT_NAME(provider());
++ (instancetype)provider NS_SWIFT_NAME(provider());
/** @fn providerWithAuth:
@brief Returns an instance of @c FIRPhoneAuthProvider for the provided @c FIRAuth object.
@param auth The auth object to associate with the phone auth provider instance.
*/
-+ (instancetype)providerWithAuth:(FIRAuth *)auth FIR_SWIFT_NAME(provider(auth:));
++ (instancetype)providerWithAuth:(FIRAuth *)auth NS_SWIFT_NAME(provider(auth:));
/** @fn verifyPhoneNumber:completion:
@brief Please use @c verifyPhoneNumber:UIDelegate:completion: instead.
diff --git a/Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h b/Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h
index d8f647d..4200753 100644
--- a/Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h
+++ b/Firebase/Auth/Source/Public/FIRTwitterAuthProvider.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
@class FIRAuthCredential;
NS_ASSUME_NONNULL_BEGIN
@@ -25,12 +23,12 @@ NS_ASSUME_NONNULL_BEGIN
/**
@brief A string constant identifying the Twitter identity provider.
*/
-extern NSString *const FIRTwitterAuthProviderID FIR_SWIFT_NAME(TwitterAuthProviderID);
+extern NSString *const FIRTwitterAuthProviderID NS_SWIFT_NAME(TwitterAuthProviderID);
/** @class FIRTwitterAuthProvider
@brief Utility class for constructing Twitter credentials.
*/
-FIR_SWIFT_NAME(TwitterAuthProvider)
+NS_SWIFT_NAME(TwitterAuthProvider)
@interface FIRTwitterAuthProvider : NSObject
/** @fn credentialWithToken:secret:
diff --git a/Firebase/Auth/Source/Public/FIRUser.h b/Firebase/Auth/Source/Public/FIRUser.h
index f0a5619..7e22329 100644
--- a/Firebase/Auth/Source/Public/FIRUser.h
+++ b/Firebase/Auth/Source/Public/FIRUser.h
@@ -18,7 +18,6 @@
#import "FIRAuth.h"
#import "FIRAuthDataResult.h"
-#import "FIRAuthSwiftNameSupport.h"
#import "FIRUserInfo.h"
@class FIRPhoneAuthCredential;
@@ -38,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
@remarks One of: @c token or @c error will always be non-nil.
*/
typedef void (^FIRAuthTokenCallback)(NSString *_Nullable token, NSError *_Nullable error)
- FIR_SWIFT_NAME(AuthTokenCallback);
+ NS_SWIFT_NAME(AuthTokenCallback);
/** @typedef FIRUserProfileChangeCallback
@brief The type of block called when a user profile change has finished.
@@ -46,7 +45,7 @@ typedef void (^FIRAuthTokenCallback)(NSString *_Nullable token, NSError *_Nullab
@param error Optionally; the error which occurred - or nil if the request was successful.
*/
typedef void (^FIRUserProfileChangeCallback)(NSError *_Nullable error)
- FIR_SWIFT_NAME(UserProfileChangeCallback);
+ NS_SWIFT_NAME(UserProfileChangeCallback);
/** @typedef FIRSendEmailVerificationCallback
@brief The type of block called when a request to send an email verification has finished.
@@ -54,13 +53,13 @@ typedef void (^FIRUserProfileChangeCallback)(NSError *_Nullable error)
@param error Optionally; the error which occurred - or nil if the request was successful.
*/
typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error)
- FIR_SWIFT_NAME(SendEmailVerificationCallback);
+ NS_SWIFT_NAME(SendEmailVerificationCallback);
/** @class FIRUser
@brief Represents a user.
@remarks This class is thread-safe.
*/
-FIR_SWIFT_NAME(User)
+NS_SWIFT_NAME(User)
@interface FIRUser : NSObject <FIRUserInfo>
/** @property anonymous
@@ -133,7 +132,7 @@ FIR_SWIFT_NAME(User)
@remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
*/
- (void)updateEmail:(NSString *)email completion:(nullable FIRUserProfileChangeCallback)completion
- FIR_SWIFT_NAME(updateEmail(to:completion:));
+ NS_SWIFT_NAME(updateEmail(to:completion:));
/** @fn updatePassword:completion:
@brief Updates the password for the user. On success, the cached user profile data is updated.
@@ -162,7 +161,7 @@ FIR_SWIFT_NAME(User)
*/
- (void)updatePassword:(NSString *)password
completion:(nullable FIRUserProfileChangeCallback)completion
- FIR_SWIFT_NAME(updatePassword(to:completion:));
+ NS_SWIFT_NAME(updatePassword(to:completion:));
#if TARGET_OS_IOS
/** @fn updatePhoneNumberCredential:completion:
@@ -198,7 +197,7 @@ FIR_SWIFT_NAME(User)
@return An object which may be used to change the user's profile data atomically.
*/
-- (FIRUserProfileChangeRequest *)profileChangeRequest FIR_SWIFT_NAME(createProfileChangeRequest());
+- (FIRUserProfileChangeRequest *)profileChangeRequest NS_SWIFT_NAME(createProfileChangeRequest());
/** @fn reloadWithCompletion:
@brief Reloads the user's profile data from the server.
@@ -275,7 +274,7 @@ FIR_SWIFT_NAME(User)
@remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)getIDTokenWithCompletion:(nullable FIRAuthTokenCallback)completion
- FIR_SWIFT_NAME(getIDToken(completion:));
+ NS_SWIFT_NAME(getIDToken(completion:));
/** @fn getTokenWithCompletion:
@brief Please use @c getIDTokenWithCompletion: instead.
@@ -286,7 +285,7 @@ FIR_SWIFT_NAME(User)
@remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
*/
- (void)getTokenWithCompletion:(nullable FIRAuthTokenCallback)completion
- FIR_SWIFT_NAME(getToken(completion:)) __attribute__((deprecated));
+ NS_SWIFT_NAME(getToken(completion:)) __attribute__((deprecated));
/** @fn getIDTokenForcingRefresh:completion:
@brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired.
@@ -470,7 +469,7 @@ FIR_SWIFT_NAME(User)
@remarks Properties are marked as being part of a profile update when they are set. Setting a
property value to nil is not the same as leaving the property unassigned.
*/
-FIR_SWIFT_NAME(UserProfileChangeRequest)
+NS_SWIFT_NAME(UserProfileChangeRequest)
@interface FIRUserProfileChangeRequest : NSObject
/** @fn init
diff --git a/Firebase/Auth/Source/Public/FIRUserInfo.h b/Firebase/Auth/Source/Public/FIRUserInfo.h
index 03f2038..04eca49 100644
--- a/Firebase/Auth/Source/Public/FIRUserInfo.h
+++ b/Firebase/Auth/Source/Public/FIRUserInfo.h
@@ -16,14 +16,12 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/**
@brief Represents user data returned from an identity provider.
*/
-FIR_SWIFT_NAME(UserInfo)
+NS_SWIFT_NAME(UserInfo)
@protocol FIRUserInfo <NSObject>
/** @property providerID
diff --git a/Firebase/Auth/Source/Public/FIRUserMetadata.h b/Firebase/Auth/Source/Public/FIRUserMetadata.h
index 1b72ee1..2533171 100644
--- a/Firebase/Auth/Source/Public/FIRUserMetadata.h
+++ b/Firebase/Auth/Source/Public/FIRUserMetadata.h
@@ -16,14 +16,12 @@
#import <Foundation/Foundation.h>
-#import "FIRAuthSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/** @class FIRUserMetdata
@brief A data class representing the metadata corresponding to a Firebase user.
*/
-FIR_SWIFT_NAME(UserMetadata)
+NS_SWIFT_NAME(UserMetadata)
@interface FIRUserMetadata : NSObject
/** @property lastSignInDate
diff --git a/Firebase/Auth/Source/Public/FirebaseAuth.h b/Firebase/Auth/Source/Public/FirebaseAuth.h
index 0cc5905..409ac73 100644
--- a/Firebase/Auth/Source/Public/FirebaseAuth.h
+++ b/Firebase/Auth/Source/Public/FirebaseAuth.h
@@ -22,7 +22,6 @@
#import "FIRAuthCredential.h"
#import "FIRAuthDataResult.h"
#import "FIRAuthErrors.h"
-#import "FIRAuthSwiftNameSupport.h"
#import "FirebaseAuthVersion.h"
#import "FIREmailAuthProvider.h"
#import "FIRFacebookAuthProvider.h"
diff --git a/Firebase/Core/Public/FIRAnalyticsConfiguration.h b/Firebase/Core/Public/FIRAnalyticsConfiguration.h
index f42eaf5..ca1d32c 100644
--- a/Firebase/Core/Public/FIRAnalyticsConfiguration.h
+++ b/Firebase/Core/Public/FIRAnalyticsConfiguration.h
@@ -16,20 +16,18 @@
#import <Foundation/Foundation.h>
-#import "FIRCoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/**
* This class provides configuration fields for Firebase Analytics.
*/
-FIR_SWIFT_NAME(AnalyticsConfiguration)
+NS_SWIFT_NAME(AnalyticsConfiguration)
@interface FIRAnalyticsConfiguration : NSObject
/**
* Returns the shared instance of FIRAnalyticsConfiguration.
*/
-+ (FIRAnalyticsConfiguration *)sharedInstance FIR_SWIFT_NAME(shared());
++ (FIRAnalyticsConfiguration *)sharedInstance NS_SWIFT_NAME(shared());
/**
* Sets the minimum engagement time in seconds required to start a new session. The default value
diff --git a/Firebase/Core/Public/FIRApp.h b/Firebase/Core/Public/FIRApp.h
index dbec0ac..e0d852b 100644
--- a/Firebase/Core/Public/FIRApp.h
+++ b/Firebase/Core/Public/FIRApp.h
@@ -21,14 +21,12 @@
#import <UIKit/UIKit.h>
#endif
-#import "FIRCoreSwiftNameSupport.h"
-
@class FIROptions;
NS_ASSUME_NONNULL_BEGIN
/** A block that takes a BOOL and has no return value. */
-typedef void (^FIRAppVoidBoolCallback)(BOOL success) FIR_SWIFT_NAME(FirebaseAppVoidBoolCallback);
+typedef void (^FIRAppVoidBoolCallback)(BOOL success) NS_SWIFT_NAME(FirebaseAppVoidBoolCallback);
/**
* The entry point of Firebase SDKs.
@@ -48,7 +46,7 @@ typedef void (^FIRAppVoidBoolCallback)(BOOL success) FIR_SWIFT_NAME(FirebaseAppV
* It is also possible to change the default logging level in code by calling setLoggerLevel: on
* the FIRConfiguration interface.
*/
-FIR_SWIFT_NAME(FirebaseApp)
+NS_SWIFT_NAME(FirebaseApp)
@interface FIRApp : NSObject
/**
@@ -65,7 +63,7 @@ FIR_SWIFT_NAME(FirebaseApp)
*
* @param options The Firebase application options used to configure the service.
*/
-+ (void)configureWithOptions:(FIROptions *)options FIR_SWIFT_NAME(configure(options:));
++ (void)configureWithOptions:(FIROptions *)options NS_SWIFT_NAME(configure(options:));
/**
* Configures a Firebase app with the given name and options. Raises an exception if any
@@ -77,19 +75,19 @@ FIR_SWIFT_NAME(FirebaseApp)
*/
// clang-format off
+ (void)configureWithName:(NSString *)name
- options:(FIROptions *)options FIR_SWIFT_NAME(configure(name:options:));
+ options:(FIROptions *)options NS_SWIFT_NAME(configure(name:options:));
// clang-format on
/**
* Returns the default app, or nil if the default app does not exist.
*/
-+ (nullable FIRApp *)defaultApp FIR_SWIFT_NAME(app());
++ (nullable FIRApp *)defaultApp NS_SWIFT_NAME(app());
/**
* Returns a previously created FIRApp instance with the given name, or nil if no such app exists.
* This method is thread safe.
*/
-+ (nullable FIRApp *)appNamed:(NSString *)name FIR_SWIFT_NAME(app(name:));
++ (nullable FIRApp *)appNamed:(NSString *)name NS_SWIFT_NAME(app(name:));
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
/**
@@ -102,7 +100,7 @@ FIR_SWIFT_NAME(FirebaseApp)
* Returns the set of all extant FIRApp instances, or nil if there are no FIRApp instances. This
* method is thread safe.
*/
-+ (nullable NSDictionary<NSString *, FIRApp *> *)allApps FIR_SWIFT_NAME(allApps());
++ (nullable NSDictionary<NSString *, FIRApp *> *)allApps NS_SWIFT_NAME(allApps());
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
/**
diff --git a/Firebase/Core/Public/FIRConfiguration.h b/Firebase/Core/Public/FIRConfiguration.h
index e2c85e5..05bd261 100644
--- a/Firebase/Core/Public/FIRConfiguration.h
+++ b/Firebase/Core/Public/FIRConfiguration.h
@@ -17,7 +17,6 @@
#import <Foundation/Foundation.h>
#import "FIRAnalyticsConfiguration.h"
-#import "FIRCoreSwiftNameSupport.h"
#import "FIRLoggerLevel.h"
/**
@@ -45,15 +44,15 @@ NS_ASSUME_NONNULL_BEGIN
* This interface provides global level properties that the developer can tweak, and the singleton
* of the Firebase Analytics configuration class.
*/
-FIR_SWIFT_NAME(FirebaseConfiguration)
+NS_SWIFT_NAME(FirebaseConfiguration)
@interface FIRConfiguration : NSObject
#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
/** Returns the shared configuration object. */
-@property(class, nonatomic, readonly) FIRConfiguration *sharedInstance FIR_SWIFT_NAME(shared);
+@property(class, nonatomic, readonly) FIRConfiguration *sharedInstance NS_SWIFT_NAME(shared);
#else
/** Returns the shared configuration object. */
-+ (FIRConfiguration *)sharedInstance FIR_SWIFT_NAME(shared());
++ (FIRConfiguration *)sharedInstance NS_SWIFT_NAME(shared());
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
/** The configuration class for Firebase Analytics. */
diff --git a/Firebase/Core/Public/FIRCoreSwiftNameSupport.h b/Firebase/Core/Public/FIRCoreSwiftNameSupport.h
deleted file mode 100644
index 216c047..0000000
--- a/Firebase/Core/Public/FIRCoreSwiftNameSupport.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 FIR_SWIFT_NAME
-
-#import <Foundation/Foundation.h>
-
-// NS_SWIFT_NAME can only translate factory methods before the iOS 9.3 SDK.
-// Wrap it in our own macro if it's a non-compatible SDK.
-#ifdef __IPHONE_9_3
-#define FIR_SWIFT_NAME(X) NS_SWIFT_NAME(X)
-#else
-#define FIR_SWIFT_NAME(X) // Intentionally blank.
-#endif // #ifdef __IPHONE_9_3
-
-#endif // FIR_SWIFT_NAME
diff --git a/Firebase/Core/Public/FIRLoggerLevel.h b/Firebase/Core/Public/FIRLoggerLevel.h
index 70e99ee..8b6579f 100644
--- a/Firebase/Core/Public/FIRLoggerLevel.h
+++ b/Firebase/Core/Public/FIRLoggerLevel.h
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-#import "FIRCoreSwiftNameSupport.h"
-
/**
* The log levels used by internal logging.
*/
@@ -34,4 +32,4 @@ typedef NS_ENUM(NSInteger, FIRLoggerLevel) {
FIRLoggerLevelMin = FIRLoggerLevelError,
/** Maximum log level. */
FIRLoggerLevelMax = FIRLoggerLevelDebug
-} FIR_SWIFT_NAME(FirebaseLoggerLevel);
+} NS_SWIFT_NAME(FirebaseLoggerLevel);
diff --git a/Firebase/Core/Public/FIROptions.h b/Firebase/Core/Public/FIROptions.h
index e1d114a..eba0657 100644
--- a/Firebase/Core/Public/FIROptions.h
+++ b/Firebase/Core/Public/FIROptions.h
@@ -16,26 +16,24 @@
#import <Foundation/Foundation.h>
-#import "FIRCoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/**
* This class provides constant fields of Google APIs.
*/
-FIR_SWIFT_NAME(FirebaseOptions)
+NS_SWIFT_NAME(FirebaseOptions)
@interface FIROptions : NSObject <NSCopying>
/**
* Returns the default options.
*/
-+ (nullable FIROptions *)defaultOptions FIR_SWIFT_NAME(defaultOptions());
++ (nullable FIROptions *)defaultOptions NS_SWIFT_NAME(defaultOptions());
/**
* An iOS API key used for authenticating requests from your app, e.g.
* @"AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk", used to identify your app to Google servers.
*/
-@property(nonatomic, copy, nullable) NSString *APIKey FIR_SWIFT_NAME(apiKey);
+@property(nonatomic, copy, nullable) NSString *APIKey NS_SWIFT_NAME(apiKey);
/**
* The bundle ID for the application. Defaults to `[[NSBundle mainBundle] bundleID]` when not set
@@ -58,7 +56,7 @@ FIR_SWIFT_NAME(FirebaseOptions)
* The Project Number from the Google Developer's console, for example @"012345678901", used to
* configure Google Cloud Messaging.
*/
-@property(nonatomic, copy) NSString *GCMSenderID FIR_SWIFT_NAME(gcmSenderID);
+@property(nonatomic, copy) NSString *GCMSenderID NS_SWIFT_NAME(gcmSenderID);
/**
* The Project ID from the Firebase console, for example @"abc-xyz-123".
@@ -127,7 +125,7 @@ FIR_SWIFT_NAME(FirebaseOptions)
// clang-format off
- (instancetype)initWithGoogleAppID:(NSString *)googleAppID
GCMSenderID:(NSString *)GCMSenderID
- FIR_SWIFT_NAME(init(googleAppID:gcmSenderID:));
+ NS_SWIFT_NAME(init(googleAppID:gcmSenderID:));
// clang-format on
@end
diff --git a/Firebase/Database/Public/FIRDataEventType.h b/Firebase/Database/Public/FIRDataEventType.h
index fccc98a..916ce32 100644
--- a/Firebase/Database/Public/FIRDataEventType.h
+++ b/Firebase/Database/Public/FIRDataEventType.h
@@ -18,7 +18,6 @@
#define Firebase_FIRDataEventType_h
#import <Foundation/Foundation.h>
-#import "FIRDatabaseSwiftNameSupport.h"
/**
* This enum is the set of events that you can observe at a Firebase Database location.
@@ -34,6 +33,6 @@ typedef NS_ENUM(NSInteger, FIRDataEventType) {
FIRDataEventTypeChildMoved,
/// Any data changes at a location or, recursively, at any child node.
FIRDataEventTypeValue
-} FIR_SWIFT_NAME(DataEventType);
+} NS_SWIFT_NAME(DataEventType);
#endif
diff --git a/Firebase/Database/Public/FIRDataSnapshot.h b/Firebase/Database/Public/FIRDataSnapshot.h
index e465045..02a1e6a 100644
--- a/Firebase/Database/Public/FIRDataSnapshot.h
+++ b/Firebase/Database/Public/FIRDataSnapshot.h
@@ -15,7 +15,6 @@
*/
#import <Foundation/Foundation.h>
-#import "FIRDatabaseSwiftNameSupport.h"
NS_ASSUME_NONNULL_BEGIN
@@ -30,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
* They can't be modified and will never change. To modify data at a location,
* use a FIRDatabaseReference (e.g. with setValue:).
*/
-FIR_SWIFT_NAME(DataSnapshot)
+NS_SWIFT_NAME(DataSnapshot)
@interface FIRDataSnapshot : NSObject
diff --git a/Firebase/Database/Public/FIRDatabase.h b/Firebase/Database/Public/FIRDatabase.h
index 606f164..6761669 100644
--- a/Firebase/Database/Public/FIRDatabase.h
+++ b/Firebase/Database/Public/FIRDatabase.h
@@ -16,7 +16,6 @@
#import <Foundation/Foundation.h>
#import "FIRDatabaseReference.h"
-#import "FIRDatabaseSwiftNameSupport.h"
@class FIRApp;
@@ -27,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
* [FIRDatabase database]. To access a location in the database and read or write data,
* use [FIRDatabase reference].
*/
-FIR_SWIFT_NAME(Database)
+NS_SWIFT_NAME(Database)
@interface FIRDatabase : NSObject
/**
@@ -43,7 +42,7 @@ FIR_SWIFT_NAME(Database)
*
* @return A FIRDatabase instance.
*/
-+ (FIRDatabase *) database FIR_SWIFT_NAME(database());
++ (FIRDatabase *) database NS_SWIFT_NAME(database());
/**
* Gets a FirebaseDatabase instance for the specified URL.
@@ -72,7 +71,7 @@ FIR_SWIFT_NAME(Database)
* @param app The FIRApp to get a FIRDatabase for.
* @return A FIRDatabase instance.
*/
-+ (FIRDatabase *) databaseForApp:(FIRApp *)app FIR_SWIFT_NAME(database(app:));
++ (FIRDatabase *) databaseForApp:(FIRApp *)app NS_SWIFT_NAME(database(app:));
/** The FIRApp instance to which this FIRDatabase belongs. */
@property (weak, readonly, nonatomic) FIRApp *app;
@@ -134,7 +133,7 @@ FIR_SWIFT_NAME(Database)
* application.
*
*/
-@property (nonatomic) BOOL persistenceEnabled FIR_SWIFT_NAME(isPersistenceEnabled);
+@property (nonatomic) BOOL persistenceEnabled NS_SWIFT_NAME(isPersistenceEnabled);
/**
* By default the Firebase Database client will use up to 10MB of disk space to cache data. If the cache grows beyond
diff --git a/Firebase/Database/Public/FIRDatabaseQuery.h b/Firebase/Database/Public/FIRDatabaseQuery.h
index be4ad27..ef56643 100644
--- a/Firebase/Database/Public/FIRDatabaseQuery.h
+++ b/Firebase/Database/Public/FIRDatabaseQuery.h
@@ -15,7 +15,6 @@
*/
#import <Foundation/Foundation.h>
-#import "FIRDatabaseSwiftNameSupport.h"
#import "FIRDataEventType.h"
#import "FIRDataSnapshot.h"
@@ -26,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
* are returned by observeEventType: and and can later be passed to removeObserverWithHandle: to
* stop receiving updates.
*/
-typedef NSUInteger FIRDatabaseHandle FIR_SWIFT_NAME(DatabaseHandle);
+typedef NSUInteger FIRDatabaseHandle NS_SWIFT_NAME(DatabaseHandle);
/**
* A FIRDatabaseQuery instance represents a query over the data at a particular location.
@@ -35,7 +34,7 @@ typedef NSUInteger FIRDatabaseHandle FIR_SWIFT_NAME(DatabaseHandle);
* on a FIRDatabaseReference. The query methods can be chained to further specify the data you are interested in
* observing
*/
-FIR_SWIFT_NAME(DatabaseQuery)
+NS_SWIFT_NAME(DatabaseQuery)
@interface FIRDatabaseQuery : NSObject
diff --git a/Firebase/Database/Public/FIRDatabaseReference.h b/Firebase/Database/Public/FIRDatabaseReference.h
index 53d0cdd..fdc92b6 100644
--- a/Firebase/Database/Public/FIRDatabaseReference.h
+++ b/Firebase/Database/Public/FIRDatabaseReference.h
@@ -17,7 +17,6 @@
#import <Foundation/Foundation.h>
#import "FIRDatabaseQuery.h"
#import "FIRDatabase.h"
-#import "FIRDatabaseSwiftNameSupport.h"
#import "FIRDataSnapshot.h"
#import "FIRMutableData.h"
#import "FIRTransactionResult.h"
@@ -36,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
* to read data (ie. observeEventType:withBlock:), write data (ie. setValue:), and to
* create new FIRDatabaseReferences (ie. child:).
*/
-FIR_SWIFT_NAME(DatabaseReference)
+NS_SWIFT_NAME(DatabaseReference)
@interface FIRDatabaseReference : FIRDatabaseQuery
diff --git a/Firebase/Database/Public/FIRDatabaseSwiftNameSupport.h b/Firebase/Database/Public/FIRDatabaseSwiftNameSupport.h
deleted file mode 100644
index 55e1bcc..0000000
--- a/Firebase/Database/Public/FIRDatabaseSwiftNameSupport.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 FIR_SWIFT_NAME
-
-#import <Foundation/Foundation.h>
-
-// NS_SWIFT_NAME can only translate factory methods before the iOS 9.3 SDK.
-// Wrap it in our own macro if it's a non-compatible SDK.
-#ifdef __IPHONE_9_3
-#define FIR_SWIFT_NAME(X) NS_SWIFT_NAME(X)
-#else
-#define FIR_SWIFT_NAME(X) // Intentionally blank.
-#endif // #ifdef __IPHONE_9_3
-
-#endif // FIR_SWIFT_NAME
diff --git a/Firebase/Database/Public/FIRMutableData.h b/Firebase/Database/Public/FIRMutableData.h
index 4e7250a..7445d71 100644
--- a/Firebase/Database/Public/FIRMutableData.h
+++ b/Firebase/Database/Public/FIRMutableData.h
@@ -15,7 +15,6 @@
*/
#import <Foundation/Foundation.h>
-#import "FIRDatabaseSwiftNameSupport.h"
NS_ASSUME_NONNULL_BEGIN
@@ -35,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* Note that changes made to a child FIRMutableData instance will be visible to the parent.
*/
-FIR_SWIFT_NAME(MutableData)
+NS_SWIFT_NAME(MutableData)
@interface FIRMutableData : NSObject
diff --git a/Firebase/Database/Public/FIRServerValue.h b/Firebase/Database/Public/FIRServerValue.h
index f5eadd5..365590c 100644
--- a/Firebase/Database/Public/FIRServerValue.h
+++ b/Firebase/Database/Public/FIRServerValue.h
@@ -14,15 +14,13 @@
* limitations under the License.
*/
-#import "FIRDatabaseSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/**
* Placeholder values you may write into Firebase Database as a value or priority
* that will automatically be populated by the Firebase Database server.
*/
-FIR_SWIFT_NAME(ServerValue)
+NS_SWIFT_NAME(ServerValue)
@interface FIRServerValue : NSObject
/**
diff --git a/Firebase/Database/Public/FIRTransactionResult.h b/Firebase/Database/Public/FIRTransactionResult.h
index 3c2d39a..d356c5c 100644
--- a/Firebase/Database/Public/FIRTransactionResult.h
+++ b/Firebase/Database/Public/FIRTransactionResult.h
@@ -15,7 +15,6 @@
*/
#import <Foundation/Foundation.h>
-#import "FIRDatabaseSwiftNameSupport.h"
#import "FIRMutableData.h"
NS_ASSUME_NONNULL_BEGIN
@@ -23,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Used for runTransactionBlock:. An FIRTransactionResult instance is a container for the results of the transaction.
*/
-FIR_SWIFT_NAME(TransactionResult)
+NS_SWIFT_NAME(TransactionResult)
@interface FIRTransactionResult : NSObject
/**
diff --git a/Firebase/Messaging/Public/FIRMessaging.h b/Firebase/Messaging/Public/FIRMessaging.h
index 65a9d06..7cd7b19 100644
--- a/Firebase/Messaging/Public/FIRMessaging.h
+++ b/Firebase/Messaging/Public/FIRMessaging.h
@@ -16,17 +16,6 @@
#import <Foundation/Foundation.h>
-
-// NS_SWIFT_NAME can only translate factory methods before the iOS 9.3 SDK.
-// Wrap it in our own macro if it's a non-compatible SDK.
-#ifndef FIR_SWIFT_NAME
-#ifdef __IPHONE_9_3
-#define FIR_SWIFT_NAME(X) NS_SWIFT_NAME(X)
-#else
-#define FIR_SWIFT_NAME(X) // Intentionally blank.
-#endif // #ifdef __IPHONE_9_3
-#endif // #ifndef FIR_SWIFT_NAME
-
/**
* @related FIRMessaging
*
@@ -40,7 +29,7 @@
*/
typedef void(^FIRMessagingFCMTokenFetchCompletion)(NSString * _Nullable FCMToken,
NSError * _Nullable error)
- FIR_SWIFT_NAME(MessagingFCMTokenFetchCompletion);
+ NS_SWIFT_NAME(MessagingFCMTokenFetchCompletion);
/**
@@ -54,7 +43,7 @@ typedef void(^FIRMessagingFCMTokenFetchCompletion)(NSString * _Nullable FCMToken
* will match a value from the FIRMessagingError enumeration.
*/
typedef void(^FIRMessagingDeleteFCMTokenCompletion)(NSError * _Nullable error)
- FIR_SWIFT_NAME(MessagingDeleteFCMTokenCompletion);
+ NS_SWIFT_NAME(MessagingDeleteFCMTokenCompletion);
/**
* The completion handler invoked once the data connection with FIRMessaging is
@@ -69,7 +58,7 @@ typedef void(^FIRMessagingDeleteFCMTokenCompletion)(NSError * _Nullable error)
* to FIRMessaging failed.
*/
typedef void(^FIRMessagingConnectCompletion)(NSError * __nullable error)
- FIR_SWIFT_NAME(MessagingConnectCompletion)
+ NS_SWIFT_NAME(MessagingConnectCompletion)
__deprecated_msg("Please listen for the FIRMessagingConnectionStateChangedNotification "
"NSNotification instead.");
@@ -80,7 +69,7 @@ typedef void(^FIRMessagingConnectCompletion)(NSError * __nullable error)
* of the successfully delivered message.
*/
FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingSendSuccessNotification
- FIR_SWIFT_NAME(MessagingSendSuccess);
+ NS_SWIFT_NAME(MessagingSendSuccess);
/**
* Notification sent when the upstream message was failed to be sent to the
@@ -89,7 +78,7 @@ FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingSendSuccessNoti
* information for the failure.
*/
FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingSendErrorNotification
- FIR_SWIFT_NAME(MessagingSendError);
+ NS_SWIFT_NAME(MessagingSendError);
/**
* Notification sent when the Firebase messaging server deletes pending
@@ -100,7 +89,7 @@ FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingSendErrorNotifi
* server.
*/
FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingMessagesDeletedNotification
- FIR_SWIFT_NAME(MessagingMessagesDeleted);
+ NS_SWIFT_NAME(MessagingMessagesDeleted);
/**
* Notification sent when Firebase Messaging establishes or disconnects from
@@ -108,7 +97,7 @@ FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingMessagesDeleted
* notification by checking the `isDirectChannelEstablished` property of FIRMessaging.
*/
FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingConnectionStateChangedNotification
- FIR_SWIFT_NAME(MessagingConnectionStateChanged);
+ NS_SWIFT_NAME(MessagingConnectionStateChanged);
/**
* Notification sent when the FCM registration token has been refreshed. Please use the
@@ -117,7 +106,7 @@ FOUNDATION_EXPORT const NSNotificationName __nonnull FIRMessagingConnectionState
*/
FOUNDATION_EXPORT const NSNotificationName __nonnull
FIRMessagingRegistrationTokenRefreshedNotification
- FIR_SWIFT_NAME(MessagingRegistrationTokenRefreshed);
+ NS_SWIFT_NAME(MessagingRegistrationTokenRefreshed);
#else
/**
* Notification sent when the upstream message has been delivered
@@ -125,7 +114,7 @@ FOUNDATION_EXPORT const NSNotificationName __nonnull
* of the successfully delivered message.
*/
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendSuccessNotification
- FIR_SWIFT_NAME(MessagingSendSuccessNotification);
+ NS_SWIFT_NAME(MessagingSendSuccessNotification);
/**
* Notification sent when the upstream message was failed to be sent to the
@@ -134,7 +123,7 @@ FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendSuccessNotification
* information for the failure.
*/
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendErrorNotification
- FIR_SWIFT_NAME(MessagingSendErrorNotification);
+ NS_SWIFT_NAME(MessagingSendErrorNotification);
/**
* Notification sent when the Firebase messaging server deletes pending
@@ -145,7 +134,7 @@ FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingSendErrorNotification
* server.
*/
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingMessagesDeletedNotification
- FIR_SWIFT_NAME(MessagingMessagesDeletedNotification);
+ NS_SWIFT_NAME(MessagingMessagesDeletedNotification);
/**
* Notification sent when Firebase Messaging establishes or disconnects from
@@ -153,7 +142,7 @@ FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingMessagesDeletedNotifica
* notification by checking the `isDirectChannelEstablished` property of FIRMessaging.
*/
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingConnectionStateChangedNotification
- FIR_SWIFT_NAME(MessagingConnectionStateChangedNotification);
+ NS_SWIFT_NAME(MessagingConnectionStateChangedNotification);
/**
* Notification sent when the FCM registration token has been refreshed. Please use the
@@ -161,7 +150,7 @@ FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingConnectionStateChangedN
* updated tokens.
*/
FOUNDATION_EXPORT NSString * __nonnull const FIRMessagingRegistrationTokenRefreshedNotification
- FIR_SWIFT_NAME(MessagingRegistrationTokenRefreshedNotification);
+ NS_SWIFT_NAME(MessagingRegistrationTokenRefreshedNotification);
#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
/**
@@ -188,7 +177,7 @@ typedef NS_ENUM(NSUInteger, FIRMessagingError) {
/// Some parameters of the request were invalid.
FIRMessagingErrorInvalidRequest = 7,
-} FIR_SWIFT_NAME(MessagingError);
+} NS_SWIFT_NAME(MessagingError);
/// Status for the downstream message received by the app.
typedef NS_ENUM(NSInteger, FIRMessagingMessageStatus) {
@@ -196,7 +185,7 @@ typedef NS_ENUM(NSInteger, FIRMessagingMessageStatus) {
FIRMessagingMessageStatusUnknown,
/// New downstream message received by the app.
FIRMessagingMessageStatusNew,
-} FIR_SWIFT_NAME(MessagingMessageStatus);
+} NS_SWIFT_NAME(MessagingMessageStatus);
/**
* The APNS token type for the app. If the token type is set to `UNKNOWN`
@@ -212,10 +201,10 @@ typedef NS_ENUM(NSInteger, FIRMessagingAPNSTokenType) {
FIRMessagingAPNSTokenTypeSandbox,
/// Production token type.
FIRMessagingAPNSTokenTypeProd,
-} FIR_SWIFT_NAME(MessagingAPNSTokenType);
+} NS_SWIFT_NAME(MessagingAPNSTokenType);
/// Information about a downstream message received by the app.
-FIR_SWIFT_NAME(MessagingMessageInfo)
+NS_SWIFT_NAME(MessagingMessageInfo)
@interface FIRMessagingMessageInfo : NSObject
/// The status of the downstream message
@@ -229,7 +218,7 @@ FIR_SWIFT_NAME(MessagingMessageInfo)
* This is only for devices running iOS 10 or above. To support devices running iOS 9 or below, use
* the local and remote notifications handlers defined in UIApplicationDelegate protocol.
*/
-FIR_SWIFT_NAME(MessagingRemoteMessage)
+NS_SWIFT_NAME(MessagingRemoteMessage)
@interface FIRMessagingRemoteMessage : NSObject
/// The downstream message received by the application.
@@ -243,7 +232,7 @@ FIR_SWIFT_NAME(MessagingRemoteMessage)
* To support devices running iOS 9 or below, use the local and remote notifications handlers
* defined in UIApplicationDelegate protocol.
*/
-FIR_SWIFT_NAME(MessagingDelegate)
+NS_SWIFT_NAME(MessagingDelegate)
@protocol FIRMessagingDelegate <NSObject>
@optional
@@ -256,14 +245,14 @@ FIR_SWIFT_NAME(MessagingDelegate)
/// * Subscribing to any topics.
- (void)messaging:(nonnull FIRMessaging *)messaging
didReceiveRegistrationToken:(nonnull NSString *)fcmToken
- FIR_SWIFT_NAME(messaging(_:didReceiveRegistrationToken:));
+ NS_SWIFT_NAME(messaging(_:didReceiveRegistrationToken:));
/// This method will be called whenever FCM receives a new, default FCM token for your
/// Firebase project's Sender ID. This method is deprecated. Please use
/// `messaging:didReceiveRegistrationToken:`.
- (void)messaging:(nonnull FIRMessaging *)messaging
didRefreshRegistrationToken:(nonnull NSString *)fcmToken
- FIR_SWIFT_NAME(messaging(_:didRefreshRegistrationToken:))
+ NS_SWIFT_NAME(messaging(_:didRefreshRegistrationToken:))
__deprecated_msg("Please use messaging:didReceiveRegistrationToken:, which is called for both \
current and refreshed tokens.");
@@ -272,12 +261,12 @@ FIR_SWIFT_NAME(MessagingDelegate)
/// UIApplicationDelegate's -application:didReceiveRemoteNotification: method.
- (void)messaging:(nonnull FIRMessaging *)messaging
didReceiveMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage
- FIR_SWIFT_NAME(messaging(_:didReceive:))
+ NS_SWIFT_NAME(messaging(_:didReceive:))
__IOS_AVAILABLE(10.0);
/// The callback to handle data message received via FCM for devices running iOS 10 or above.
- (void)applicationReceivedRemoteMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage
- FIR_SWIFT_NAME(application(received:))
+ NS_SWIFT_NAME(application(received:))
__deprecated_msg("Use FIRMessagingDelegate’s -messaging:didReceiveMessage:");
@end
@@ -291,7 +280,7 @@ FIR_SWIFT_NAME(MessagingDelegate)
*
* In order to receive FIRMessaging messages, declare `application:didReceiveRemoteNotification:`.
*/
-FIR_SWIFT_NAME(Messaging)
+NS_SWIFT_NAME(Messaging)
@interface FIRMessaging : NSObject
/**
@@ -325,7 +314,7 @@ FIR_SWIFT_NAME(Messaging)
*
* @return An instance of FIRMessaging.
*/
-+ (nonnull instancetype)messaging FIR_SWIFT_NAME(messaging());
++ (nonnull instancetype)messaging NS_SWIFT_NAME(messaging());
/**
* Unavailable. Use +messaging instead.
@@ -347,7 +336,7 @@ FIR_SWIFT_NAME(Messaging)
* If you would like to set the type of the APNS token, rather than relying on
* automatic detection, see: `-setAPNSToken:type:`.
*/
-@property(nonatomic, copy, nullable) NSData *APNSToken FIR_SWIFT_NAME(apnsToken);
+@property(nonatomic, copy, nullable) NSData *APNSToken NS_SWIFT_NAME(apnsToken);
/**
* Set APNS token for the application. This APNS token will be used to register
@@ -377,7 +366,7 @@ FIR_SWIFT_NAME(Messaging)
* Once you have an FCM token, you should send it to your application server, so it can use
* the FCM token to send notifications to your device.
*/
-@property(nonatomic, readonly, nullable) NSString *FCMToken FIR_SWIFT_NAME(fcmToken);
+@property(nonatomic, readonly, nullable) NSString *FCMToken NS_SWIFT_NAME(fcmToken);
/**
@@ -398,7 +387,7 @@ FIR_SWIFT_NAME(Messaging)
*/
- (void)retrieveFCMTokenForSenderID:(nonnull NSString *)senderID
completion:(nonnull FIRMessagingFCMTokenFetchCompletion)completion
- FIR_SWIFT_NAME(retrieveFCMToken(forSenderID:completion:));
+ NS_SWIFT_NAME(retrieveFCMToken(forSenderID:completion:));
/**
@@ -410,7 +399,7 @@ FIR_SWIFT_NAME(Messaging)
*/
- (void)deleteFCMTokenForSenderID:(nonnull NSString *)senderID
completion:(nonnull FIRMessagingDeleteFCMTokenCompletion)completion
- FIR_SWIFT_NAME(deleteFCMToken(forSenderID:completion:));
+ NS_SWIFT_NAME(deleteFCMToken(forSenderID:completion:));
#pragma mark - Connect
@@ -428,7 +417,7 @@ FIR_SWIFT_NAME(Messaging)
* establishing a connection and invoke the handler when successful.
*/
- (void)connectWithCompletion:(nonnull FIRMessagingConnectCompletion)handler
- FIR_SWIFT_NAME(connect(handler:))
+ NS_SWIFT_NAME(connect(handler:))
__deprecated_msg("Please use the shouldEstablishDirectChannel property instead.");
/**
@@ -449,14 +438,14 @@ FIR_SWIFT_NAME(Messaging)
*
* @param topic The name of the topic, for example, @"sports".
*/
-- (void)subscribeToTopic:(nonnull NSString *)topic FIR_SWIFT_NAME(subscribe(toTopic:));
+- (void)subscribeToTopic:(nonnull NSString *)topic NS_SWIFT_NAME(subscribe(toTopic:));
/**
* Asynchronously unsubscribe from a topic.
*
* @param topic The name of the topic, for example @"sports".
*/
-- (void)unsubscribeFromTopic:(nonnull NSString *)topic FIR_SWIFT_NAME(unsubscribe(fromTopic:));
+- (void)unsubscribeFromTopic:(nonnull NSString *)topic NS_SWIFT_NAME(unsubscribe(fromTopic:));
#pragma mark - Upstream
diff --git a/Firebase/Storage/Public/FIRStorage.h b/Firebase/Storage/Public/FIRStorage.h
index 112b1c6..f70b875 100644
--- a/Firebase/Storage/Public/FIRStorage.h
+++ b/Firebase/Storage/Public/FIRStorage.h
@@ -17,7 +17,6 @@
#import <Foundation/Foundation.h>
#import "FIRStorageConstants.h"
-#import "FIRStorageSwiftNameSupport.h"
@class FIRApp;
@class FIRStorageReference;
@@ -38,28 +37,28 @@ FOUNDATION_EXPORT const unsigned char *const FIRStorageVersionString;
* If you call [FIRStorage storageForApp:] and provide a custom instance of FIRApp,
* the storage location will be specified via the FIROptions#storageBucket property.
*/
-FIR_SWIFT_NAME(Storage)
+NS_SWIFT_NAME(Storage)
@interface FIRStorage : NSObject
/**
* Creates an instance of FIRStorage, configured with the default FIRApp.
* @return the FIRStorage instance, initialized with the default FIRApp.
*/
-+ (instancetype)storage FIR_SWIFT_NAME(storage());
++ (instancetype)storage NS_SWIFT_NAME(storage());
/**
* Creates an instance of FIRStorage, configured with the custom FIRApp @a app.
* @param app The custom FIRApp used for initialization.
* @return the FIRStorage instance, initialized with the custom FIRApp.
*/
-+ (instancetype)storageForApp:(FIRApp *)app FIR_SWIFT_NAME(storage(app:));
++ (instancetype)storageForApp:(FIRApp *)app NS_SWIFT_NAME(storage(app:));
/**
* Creates an instance of FIRStorage, configured with a custom storage bucket @a url.
* @param url The gs:// url to your Firebase Storage Bucket.
* @return the FIRStorage instance, initialized with the custom FIRApp.
*/
-+ (instancetype)storageWithURL:(NSString *)url FIR_SWIFT_NAME(storage(url:));
++ (instancetype)storageWithURL:(NSString *)url NS_SWIFT_NAME(storage(url:));
/**
* Creates an instance of FIRStorage, configured with a custom FIRApp @a app and a custom storage
@@ -68,7 +67,7 @@ FIR_SWIFT_NAME(Storage)
* @param url The gs:// url to your Firebase Storage Bucket.
* @return the FIRStorage instance, initialized with the custom FIRApp.
*/
-+ (instancetype)storageForApp:(FIRApp *)app URL:(NSString *)url FIR_SWIFT_NAME(storage(app:url:));
++ (instancetype)storageForApp:(FIRApp *)app URL:(NSString *)url NS_SWIFT_NAME(storage(app:url:));
/**
* The Firebase App associated with this Firebase Storage instance.
diff --git a/Firebase/Storage/Public/FIRStorageConstants.h b/Firebase/Storage/Public/FIRStorageConstants.h
index cf6c3b8..be20135 100644
--- a/Firebase/Storage/Public/FIRStorageConstants.h
+++ b/Firebase/Storage/Public/FIRStorageConstants.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRStorageSwiftNameSupport.h"
-
@class FIRStorageDownloadTask;
@class FIRStorageMetadata;
@class FIRStorageTaskSnapshot;
@@ -28,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* NSString typedef representing a task listener handle.
*/
-typedef NSString *FIRStorageHandle FIR_SWIFT_NAME(StorageHandle);
+typedef NSString *FIRStorageHandle NS_SWIFT_NAME(StorageHandle);
/**
* Block typedef typically used when downloading data.
@@ -36,21 +34,21 @@ typedef NSString *FIRStorageHandle FIR_SWIFT_NAME(StorageHandle);
* @param error The error describing failure, if one occurred.
*/
typedef void (^FIRStorageVoidDataError)(NSData *_Nullable data, NSError *_Nullable error)
- FIR_SWIFT_NAME(StorageVoidDataError);
+ NS_SWIFT_NAME(StorageVoidDataError);
/**
* Block typedef typically used when performing "binary" async operations such as delete,
* where the operation either succeeds without an error or fails with an error.
* @param error The error describing failure, if one occurred.
*/
-typedef void (^FIRStorageVoidError)(NSError *_Nullable error) FIR_SWIFT_NAME(StorageVoidError);
+typedef void (^FIRStorageVoidError)(NSError *_Nullable error) NS_SWIFT_NAME(StorageVoidError);
/**
* Block typedef typically used when retrieving metadata.
* @param metadata The metadata returned by the operation, if metadata exists.
*/
typedef void (^FIRStorageVoidMetadata)(FIRStorageMetadata *_Nullable metadata)
- FIR_SWIFT_NAME(StorageVoidMetadata);
+ NS_SWIFT_NAME(StorageVoidMetadata);
/**
* Block typedef typically used when retrieving metadata with the possibility of an error.
@@ -59,14 +57,14 @@ typedef void (^FIRStorageVoidMetadata)(FIRStorageMetadata *_Nullable metadata)
*/
typedef void (^FIRStorageVoidMetadataError)(FIRStorageMetadata *_Nullable metadata,
NSError *_Nullable error)
- FIR_SWIFT_NAME(StorageVoidMetadataError);
+ NS_SWIFT_NAME(StorageVoidMetadataError);
/**
* Block typedef typically used to asynchronously return a storage task snapshot.
* @param snapshot The returned task snapshot.
*/
typedef void (^FIRStorageVoidSnapshot)(FIRStorageTaskSnapshot *snapshot)
- FIR_SWIFT_NAME(StorageVoidSnapshot);
+ NS_SWIFT_NAME(StorageVoidSnapshot);
/**
* Block typedef typically used when retrieving a download URL.
@@ -74,7 +72,7 @@ typedef void (^FIRStorageVoidSnapshot)(FIRStorageTaskSnapshot *snapshot)
* @param error The error describing failure, if one occurred.
*/
typedef void (^FIRStorageVoidURLError)(NSURL *_Nullable URL, NSError *_Nullable error)
- FIR_SWIFT_NAME(StorageVoidURLError);
+ NS_SWIFT_NAME(StorageVoidURLError);
/**
* Enum representing the upload and download task status.
@@ -109,12 +107,12 @@ typedef NS_ENUM(NSInteger, FIRStorageTaskStatus) {
* Task has failed and is unrecoverable.
*/
FIRStorageTaskStatusFailure
-} FIR_SWIFT_NAME(StorageTaskStatus);
+} NS_SWIFT_NAME(StorageTaskStatus);
/**
* Firebase Storage error domain.
*/
-FOUNDATION_EXPORT NSString *const FIRStorageErrorDomain FIR_SWIFT_NAME(StorageErrorDomain);
+FOUNDATION_EXPORT NSString *const FIRStorageErrorDomain NS_SWIFT_NAME(StorageErrorDomain);
/**
* Enum representing the errors raised by Firebase Storage.
@@ -168,6 +166,6 @@ typedef NS_ENUM(NSInteger, FIRStorageErrorCode) {
/** User cancelled the operation. */
FIRStorageErrorCodeCancelled = -13040
-} FIR_SWIFT_NAME(StorageErrorCode);
+} NS_SWIFT_NAME(StorageErrorCode);
NS_ASSUME_NONNULL_END
diff --git a/Firebase/Storage/Public/FIRStorageDownloadTask.h b/Firebase/Storage/Public/FIRStorageDownloadTask.h
index f9d3e76..c11373f 100644
--- a/Firebase/Storage/Public/FIRStorageDownloadTask.h
+++ b/Firebase/Storage/Public/FIRStorageDownloadTask.h
@@ -17,7 +17,6 @@
#import <Foundation/Foundation.h>
#import "FIRStorageObservableTask.h"
-#import "FIRStorageSwiftNameSupport.h"
NS_ASSUME_NONNULL_BEGIN
@@ -31,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
* specified callbackQueue in FIRStorage, or the main queue if left unspecified.
* Currently all uploads must be initiated and managed on the main queue.
*/
-FIR_SWIFT_NAME(StorageDownloadTask)
+NS_SWIFT_NAME(StorageDownloadTask)
@interface FIRStorageDownloadTask : FIRStorageObservableTask <FIRStorageTaskManagement>
@end
diff --git a/Firebase/Storage/Public/FIRStorageMetadata.h b/Firebase/Storage/Public/FIRStorageMetadata.h
index e6e001f..51f3547 100644
--- a/Firebase/Storage/Public/FIRStorageMetadata.h
+++ b/Firebase/Storage/Public/FIRStorageMetadata.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRStorageSwiftNameSupport.h"
-
@class FIRStorageReference;
NS_ASSUME_NONNULL_BEGIN
@@ -29,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
* Objects#resource docs.
* @see https://cloud.google.com/storage/docs/json_api/v1/objects#resource
*/
-FIR_SWIFT_NAME(StorageMetadata)
+NS_SWIFT_NAME(StorageMetadata)
@interface FIRStorageMetadata : NSObject <NSCopying>
/**
diff --git a/Firebase/Storage/Public/FIRStorageObservableTask.h b/Firebase/Storage/Public/FIRStorageObservableTask.h
index 502aba5..d8ad401 100644
--- a/Firebase/Storage/Public/FIRStorageObservableTask.h
+++ b/Firebase/Storage/Public/FIRStorageObservableTask.h
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-#import "FIRStorageSwiftNameSupport.h"
#import "FIRStorageTask.h"
NS_ASSUME_NONNULL_BEGIN
@@ -28,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
* observers at a later date.
* This class is currently not thread safe and can only be called on the main thread.
*/
-FIR_SWIFT_NAME(StorageObservableTask)
+NS_SWIFT_NAME(StorageObservableTask)
@interface FIRStorageObservableTask : FIRStorageTask
/**
diff --git a/Firebase/Storage/Public/FIRStorageReference.h b/Firebase/Storage/Public/FIRStorageReference.h
index a85c738..a63c127 100644
--- a/Firebase/Storage/Public/FIRStorageReference.h
+++ b/Firebase/Storage/Public/FIRStorageReference.h
@@ -20,7 +20,6 @@
#import "FIRStorageConstants.h"
#import "FIRStorageDownloadTask.h"
#import "FIRStorageMetadata.h"
-#import "FIRStorageSwiftNameSupport.h"
#import "FIRStorageTask.h"
#import "FIRStorageUploadTask.h"
@@ -32,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
* path.
* @see https://cloud.google.com/storage/
*/
-FIR_SWIFT_NAME(StorageReference)
+NS_SWIFT_NAME(StorageReference)
@interface FIRStorageReference : NSObject
/**
@@ -100,7 +99,7 @@ FIR_SWIFT_NAME(StorageReference)
* @param uploadData The NSData to upload.
* @return An instance of FIRStorageUploadTask, which can be used to monitor or manage the upload.
*/
-- (FIRStorageUploadTask *)putData:(NSData *)uploadData FIR_SWIFT_NAME(putData(_:));
+- (FIRStorageUploadTask *)putData:(NSData *)uploadData NS_SWIFT_NAME(putData(_:));
/**
* Asynchronously uploads data to the currently specified FIRStorageReference.
@@ -113,7 +112,7 @@ FIR_SWIFT_NAME(StorageReference)
// clang-format off
- (FIRStorageUploadTask *)putData:(NSData *)uploadData
metadata:(nullable FIRStorageMetadata *)metadata
-FIR_SWIFT_NAME(putData(_:metadata:));
+NS_SWIFT_NAME(putData(_:metadata:));
// clang-format on
/**
@@ -131,7 +130,7 @@ FIR_SWIFT_NAME(putData(_:metadata:));
metadata:(nullable FIRStorageMetadata *)metadata
completion:(nullable void (^)(FIRStorageMetadata *_Nullable metadata,
NSError *_Nullable error))completion
- FIR_SWIFT_NAME(putData(_:metadata:completion:));
+ NS_SWIFT_NAME(putData(_:metadata:completion:));
// clang-format on
/**
@@ -140,7 +139,7 @@ FIR_SWIFT_NAME(putData(_:metadata:));
* @param fileURL A URL representing the system file path of the object to be uploaded.
* @return An instance of FIRStorageUploadTask, which can be used to monitor or manage the upload.
*/
-- (FIRStorageUploadTask *)putFile:(NSURL *)fileURL FIR_SWIFT_NAME(putFile(from:));
+- (FIRStorageUploadTask *)putFile:(NSURL *)fileURL NS_SWIFT_NAME(putFile(from:));
/**
* Asynchronously uploads a file to the currently specified FIRStorageReference.
@@ -152,7 +151,7 @@ FIR_SWIFT_NAME(putData(_:metadata:));
// clang-format off
- (FIRStorageUploadTask *)putFile:(NSURL *)fileURL
metadata:(nullable FIRStorageMetadata *)metadata
- FIR_SWIFT_NAME(putFile(from:metadata:));
+ NS_SWIFT_NAME(putFile(from:metadata:));
// clang-format on
/**
@@ -169,7 +168,7 @@ FIR_SWIFT_NAME(putData(_:metadata:));
metadata:(nullable FIRStorageMetadata *)metadata
completion:(nullable void (^)(FIRStorageMetadata *_Nullable metadata,
NSError *_Nullable error))completion
- FIR_SWIFT_NAME(putFile(from:metadata:completion:));
+ NS_SWIFT_NAME(putFile(from:metadata:completion:));
// clang-format on
#pragma mark - Downloads
@@ -188,7 +187,7 @@ FIR_SWIFT_NAME(putData(_:metadata:));
- (FIRStorageDownloadTask *)dataWithMaxSize:(int64_t)size
completion:(void (^)(NSData *_Nullable data,
NSError *_Nullable error))completion
- FIR_SWIFT_NAME(getData(maxSize:completion:));
+ NS_SWIFT_NAME(getData(maxSize:completion:));
// clang-format on
/**
@@ -229,7 +228,7 @@ FIR_SWIFT_NAME(putData(_:metadata:));
*/
- (void)metadataWithCompletion:
(void (^)(FIRStorageMetadata *_Nullable metadata, NSError *_Nullable error))completion
- FIR_SWIFT_NAME(getMetadata(completion:));
+ NS_SWIFT_NAME(getMetadata(completion:));
/**
* Updates the metadata associated with an object at the current path.
@@ -241,7 +240,7 @@ FIR_SWIFT_NAME(putData(_:metadata:));
- (void)updateMetadata:(FIRStorageMetadata *)metadata
completion:(nullable void (^)(FIRStorageMetadata *_Nullable metadata,
NSError *_Nullable error))completion
-FIR_SWIFT_NAME(updateMetadata(_:completion:));
+NS_SWIFT_NAME(updateMetadata(_:completion:));
// clang-format on
#pragma mark - Delete
diff --git a/Firebase/Storage/Public/FIRStorageSwiftNameSupport.h b/Firebase/Storage/Public/FIRStorageSwiftNameSupport.h
deleted file mode 100644
index 216c047..0000000
--- a/Firebase/Storage/Public/FIRStorageSwiftNameSupport.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 FIR_SWIFT_NAME
-
-#import <Foundation/Foundation.h>
-
-// NS_SWIFT_NAME can only translate factory methods before the iOS 9.3 SDK.
-// Wrap it in our own macro if it's a non-compatible SDK.
-#ifdef __IPHONE_9_3
-#define FIR_SWIFT_NAME(X) NS_SWIFT_NAME(X)
-#else
-#define FIR_SWIFT_NAME(X) // Intentionally blank.
-#endif // #ifdef __IPHONE_9_3
-
-#endif // FIR_SWIFT_NAME
diff --git a/Firebase/Storage/Public/FIRStorageTask.h b/Firebase/Storage/Public/FIRStorageTask.h
index b49363c..e889d5e 100644
--- a/Firebase/Storage/Public/FIRStorageTask.h
+++ b/Firebase/Storage/Public/FIRStorageTask.h
@@ -18,7 +18,6 @@
#import "FIRStorageConstants.h"
#import "FIRStorageMetadata.h"
-#import "FIRStorageSwiftNameSupport.h"
NS_ASSUME_NONNULL_BEGIN
@@ -30,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
* If no queue is specified by the developer, it defaults to the main queue.
* Currently not thread safe, so only call methods on the main thread.
*/
-FIR_SWIFT_NAME(StorageTask)
+NS_SWIFT_NAME(StorageTask)
@interface FIRStorageTask : NSObject
/**
@@ -46,7 +45,7 @@ FIR_SWIFT_NAME(StorageTask)
* implement pause, resume, and cancel, which operate on the task to pause, resume, and cancel
* operations.
*/
-FIR_SWIFT_NAME(StorageTaskManagement)
+NS_SWIFT_NAME(StorageTaskManagement)
@protocol FIRStorageTaskManagement <NSObject>
@required
diff --git a/Firebase/Storage/Public/FIRStorageTaskSnapshot.h b/Firebase/Storage/Public/FIRStorageTaskSnapshot.h
index b654c09..7d14202 100644
--- a/Firebase/Storage/Public/FIRStorageTaskSnapshot.h
+++ b/Firebase/Storage/Public/FIRStorageTaskSnapshot.h
@@ -17,7 +17,6 @@
#import <Foundation/Foundation.h>
#import "FIRStorageConstants.h"
-#import "FIRStorageSwiftNameSupport.h"
NS_ASSUME_NONNULL_BEGIN
@@ -30,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
* A Snapshot contains a task, storage reference, metadata (if it exists),
* progress, and an error (if one occurred).
*/
-FIR_SWIFT_NAME(StorageTaskSnapshot)
+NS_SWIFT_NAME(StorageTaskSnapshot)
@interface FIRStorageTaskSnapshot : NSObject
/**
diff --git a/Firebase/Storage/Public/FIRStorageUploadTask.h b/Firebase/Storage/Public/FIRStorageUploadTask.h
index cf9bde8..c753500 100644
--- a/Firebase/Storage/Public/FIRStorageUploadTask.h
+++ b/Firebase/Storage/Public/FIRStorageUploadTask.h
@@ -17,7 +17,6 @@
#import <Foundation/Foundation.h>
#import "FIRStorageObservableTask.h"
-#import "FIRStorageSwiftNameSupport.h"
NS_ASSUME_NONNULL_BEGIN
@@ -31,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
* specified callbackQueue in FIRStorage, or the main queue if left unspecified.
* Currently all uploads must be initiated and managed on the main queue.
*/
-FIR_SWIFT_NAME(StorageUploadTask)
+NS_SWIFT_NAME(StorageUploadTask)
@interface FIRStorageUploadTask : FIRStorageObservableTask <FIRStorageTaskManagement>
@end
diff --git a/Firestore/Source/API/FIRFirestore+Internal.h b/Firestore/Source/API/FIRFirestore+Internal.h
index 08f5266..c2e995a 100644
--- a/Firestore/Source/API/FIRFirestore+Internal.h
+++ b/Firestore/Source/API/FIRFirestore+Internal.h
@@ -15,7 +15,6 @@
*/
#import "FIRFirestore.h"
-#import "FIRFirestoreSwiftNameSupport.h"
NS_ASSUME_NONNULL_BEGIN
@@ -53,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN
* @param completion A block to execute once everything has shut down.
*/
- (void)shutdownWithCompletion:(nullable void (^)(NSError *_Nullable error))completion
- FIR_SWIFT_NAME(shutdown(completion:));
+ NS_SWIFT_NAME(shutdown(completion:));
@property(nonatomic, strong, readonly) FSTDatabaseID *databaseID;
@property(nonatomic, strong, readonly) FSTFirestoreClient *client;
diff --git a/Firestore/Source/Public/FIRCollectionReference.h b/Firestore/Source/Public/FIRCollectionReference.h
index 11cb969..ba3389f 100644
--- a/Firestore/Source/Public/FIRCollectionReference.h
+++ b/Firestore/Source/Public/FIRCollectionReference.h
@@ -16,7 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
#import "FIRQuery.h"
NS_ASSUME_NONNULL_BEGIN
@@ -27,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
* A `FIRCollectionReference` object can be used for adding documents, getting document references,
* and querying for documents (using the methods inherited from `FIRQuery`).
*/
-FIR_SWIFT_NAME(CollectionReference)
+NS_SWIFT_NAME(CollectionReference)
@interface FIRCollectionReference : FIRQuery
/** */
@@ -53,7 +52,7 @@ FIR_SWIFT_NAME(CollectionReference)
*
* @return A FIRDocumentReference pointing to a new document with an auto-generated ID.
*/
-- (FIRDocumentReference *)documentWithAutoID FIR_SWIFT_NAME(document());
+- (FIRDocumentReference *)documentWithAutoID NS_SWIFT_NAME(document());
/**
* Gets a `FIRDocumentReference` referring to the document at the specified path, relative to this
@@ -64,7 +63,7 @@ FIR_SWIFT_NAME(CollectionReference)
*
* @return The `FIRDocumentReference` for the specified document path.
*/
-- (FIRDocumentReference *)documentWithPath:(NSString *)documentPath FIR_SWIFT_NAME(document(_:));
+- (FIRDocumentReference *)documentWithPath:(NSString *)documentPath NS_SWIFT_NAME(document(_:));
/**
* Add a new document to this collection with the specified data, assigning it a document ID
@@ -75,7 +74,7 @@ FIR_SWIFT_NAME(CollectionReference)
* @return A `FIRDocumentReference` pointing to the newly created document.
*/
- (FIRDocumentReference *)addDocumentWithData:(NSDictionary<NSString *, id> *)data
- FIR_SWIFT_NAME(addDocument(data:));
+ NS_SWIFT_NAME(addDocument(data:));
/**
* Add a new document to this collection with the specified data, assigning it a document ID
@@ -87,11 +86,11 @@ FIR_SWIFT_NAME(CollectionReference)
* @return A `FIRDocumentReference` pointing to the newly created document.
*/
// clang-format off
-// clang-format breaks the FIR_SWIFT_NAME attribute
+// clang-format breaks the NS_SWIFT_NAME attribute
- (FIRDocumentReference *)addDocumentWithData:(NSDictionary<NSString *, id> *)data
completion:
(nullable void (^)(NSError *_Nullable error))completion
- FIR_SWIFT_NAME(addDocument(data:completion:));
+ NS_SWIFT_NAME(addDocument(data:completion:));
// clang-format on
@end
diff --git a/Firestore/Source/Public/FIRDocumentChange.h b/Firestore/Source/Public/FIRDocumentChange.h
index 674e3b2..022c81b 100644
--- a/Firestore/Source/Public/FIRDocumentChange.h
+++ b/Firestore/Source/Public/FIRDocumentChange.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
@class FIRDocumentSnapshot;
@@ -33,13 +31,13 @@ typedef NS_ENUM(NSInteger, FIRDocumentChangeType) {
* the query.
*/
FIRDocumentChangeTypeRemoved
-} FIR_SWIFT_NAME(DocumentChangeType);
+} NS_SWIFT_NAME(DocumentChangeType);
/**
* A `FIRDocumentChange` represents a change to the documents matching a query. It contains the
* document affected and the type of change that occurred (added, modified, or removed).
*/
-FIR_SWIFT_NAME(DocumentChange)
+NS_SWIFT_NAME(DocumentChange)
@interface FIRDocumentChange : NSObject
/** */
diff --git a/Firestore/Source/Public/FIRDocumentReference.h b/Firestore/Source/Public/FIRDocumentReference.h
index 03340c1..bd6d7b8 100644
--- a/Firestore/Source/Public/FIRDocumentReference.h
+++ b/Firestore/Source/Public/FIRDocumentReference.h
@@ -16,7 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
#import "FIRListenerRegistration.h"
@class FIRFirestore;
@@ -30,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
* Options for use with `[FIRDocumentReference addSnapshotListener]` to control the behavior of the
* snapshot listener.
*/
-FIR_SWIFT_NAME(DocumentListenOptions)
+NS_SWIFT_NAME(DocumentListenOptions)
@interface FIRDocumentListenOptions : NSObject
+ (instancetype)options NS_SWIFT_UNAVAILABLE("Use initializer");
@@ -47,7 +46,7 @@ FIR_SWIFT_NAME(DocumentListenOptions)
* @return The receiver is returned for optional method chaining.
*/
- (instancetype)includeMetadataChanges:(BOOL)includeMetadataChanges
- FIR_SWIFT_NAME(includeMetadataChanges(_:));
+ NS_SWIFT_NAME(includeMetadataChanges(_:));
@end
@@ -60,7 +59,7 @@ typedef void (^FIRDocumentSnapshotBlock)(FIRDocumentSnapshot *_Nullable snapshot
* may or may not exist. A `FIRDocumentReference` can also be used to create a
* `FIRCollectionReference` to a subcollection.
*/
-FIR_SWIFT_NAME(DocumentReference)
+NS_SWIFT_NAME(DocumentReference)
@interface FIRDocumentReference : NSObject
/** */
@@ -92,7 +91,7 @@ FIR_SWIFT_NAME(DocumentReference)
* @return The `FIRCollectionReference` at the specified _collectionPath_.
*/
- (FIRCollectionReference *)collectionWithPath:(NSString *)collectionPath
- FIR_SWIFT_NAME(collection(_:));
+ NS_SWIFT_NAME(collection(_:));
#pragma mark - Writing Data
@@ -166,7 +165,7 @@ FIR_SWIFT_NAME(DocumentReference)
// NOTE: this is named 'deleteDocument' because 'delete' is a keyword in Objective-C++.
/** Deletes the document referred to by this `FIRDocumentReference`. */
// clang-format off
-- (void)deleteDocument FIR_SWIFT_NAME(delete());
+- (void)deleteDocument NS_SWIFT_NAME(delete());
// clang-format on
/**
@@ -176,7 +175,7 @@ FIR_SWIFT_NAME(DocumentReference)
*/
// clang-format off
- (void)deleteDocumentWithCompletion:(nullable void (^)(NSError *_Nullable error))completion
- FIR_SWIFT_NAME(delete(completion:));
+ NS_SWIFT_NAME(delete(completion:));
// clang-format on
#pragma mark - Retrieving Data
@@ -187,7 +186,7 @@ FIR_SWIFT_NAME(DocumentReference)
* @param completion a block to execute once the document has been successfully read.
*/
- (void)getDocumentWithCompletion:(FIRDocumentSnapshotBlock)completion
- FIR_SWIFT_NAME(getDocument(completion:));
+ NS_SWIFT_NAME(getDocument(completion:));
/**
* Attaches a listener for DocumentSnapshot events.
@@ -197,7 +196,7 @@ FIR_SWIFT_NAME(DocumentReference)
* @return A FIRListenerRegistration that can be used to remove this listener.
*/
- (id<FIRListenerRegistration>)addSnapshotListener:(FIRDocumentSnapshotBlock)listener
- FIR_SWIFT_NAME(addSnapshotListener(_:));
+ NS_SWIFT_NAME(addSnapshotListener(_:));
/**
* Attaches a listener for DocumentSnapshot events.
@@ -211,7 +210,7 @@ FIR_SWIFT_NAME(DocumentReference)
- (id<FIRListenerRegistration>)addSnapshotListenerWithOptions:
(nullable FIRDocumentListenOptions *)options
listener:(FIRDocumentSnapshotBlock)listener
- FIR_SWIFT_NAME(addSnapshotListener(options:listener:));
+ NS_SWIFT_NAME(addSnapshotListener(options:listener:));
// clang-format on
@end
diff --git a/Firestore/Source/Public/FIRDocumentSnapshot.h b/Firestore/Source/Public/FIRDocumentSnapshot.h
index e923e3e..3e67c25 100644
--- a/Firestore/Source/Public/FIRDocumentSnapshot.h
+++ b/Firestore/Source/Public/FIRDocumentSnapshot.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
@class FIRDocumentReference;
@class FIRSnapshotMetadata;
@@ -28,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
* can be extracted with the `data` property or by using subscript syntax to access a specific
* field.
*/
-FIR_SWIFT_NAME(DocumentSnapshot)
+NS_SWIFT_NAME(DocumentSnapshot)
@interface FIRDocumentSnapshot : NSObject
/** */
diff --git a/Firestore/Source/Public/FIRFieldPath.h b/Firestore/Source/Public/FIRFieldPath.h
index b80eda7..3445f2e 100644
--- a/Firestore/Source/Public/FIRFieldPath.h
+++ b/Firestore/Source/Public/FIRFieldPath.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/**
@@ -25,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
* (referring to a top level field in the document), or a list of field names (referring to a nested
* field in the document).
*/
-FIR_SWIFT_NAME(FieldPath)
+NS_SWIFT_NAME(FieldPath)
@interface FIRFieldPath : NSObject <NSCopying>
- (instancetype)init NS_UNAVAILABLE;
@@ -37,7 +35,7 @@ FIR_SWIFT_NAME(FieldPath)
* @param fieldNames A list of field names.
* @return A `FieldPath` that points to a field location in a document.
*/
-- (instancetype)initWithFields:(NSArray<NSString *> *)fieldNames FIR_SWIFT_NAME(init(_:));
+- (instancetype)initWithFields:(NSArray<NSString *> *)fieldNames NS_SWIFT_NAME(init(_:));
/**
* A special sentinel `FieldPath` to refer to the ID of a document. It can be used in queries to
diff --git a/Firestore/Source/Public/FIRFieldValue.h b/Firestore/Source/Public/FIRFieldValue.h
index f7d19f0..11a0da0 100644
--- a/Firestore/Source/Public/FIRFieldValue.h
+++ b/Firestore/Source/Public/FIRFieldValue.h
@@ -16,14 +16,12 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/**
* Sentinel values that can be used when writing document fields with setData() or updateData().
*/
-FIR_SWIFT_NAME(FieldValue)
+NS_SWIFT_NAME(FieldValue)
@interface FIRFieldValue : NSObject
/** */
@@ -31,14 +29,14 @@ FIR_SWIFT_NAME(FieldValue)
/** Used with updateData() to mark a field for deletion. */
// clang-format off
-+ (instancetype)fieldValueForDelete FIR_SWIFT_NAME(delete());
++ (instancetype)fieldValueForDelete NS_SWIFT_NAME(delete());
// clang-format on
/**
* Used with setData() or updateData() to include a server-generated timestamp in the written
* data.
*/
-+ (instancetype)fieldValueForServerTimestamp FIR_SWIFT_NAME(serverTimestamp());
++ (instancetype)fieldValueForServerTimestamp NS_SWIFT_NAME(serverTimestamp());
@end
diff --git a/Firestore/Source/Public/FIRFirestore.h b/Firestore/Source/Public/FIRFirestore.h
index c31fef6..0935917 100644
--- a/Firestore/Source/Public/FIRFirestore.h
+++ b/Firestore/Source/Public/FIRFirestore.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
@class FIRApp;
@class FIRCollectionReference;
@class FIRDocumentReference;
@@ -31,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
* `FIRFirestore` represents a Firestore Database and is the entry point for all Firestore
* operations.
*/
-FIR_SWIFT_NAME(Firestore)
+NS_SWIFT_NAME(Firestore)
@interface FIRFirestore : NSObject
#pragma mark - Initializing
@@ -44,7 +42,7 @@ FIR_SWIFT_NAME(Firestore)
*
* @return The `FIRFirestore` instance.
*/
-+ (instancetype)firestore FIR_SWIFT_NAME(firestore());
++ (instancetype)firestore NS_SWIFT_NAME(firestore());
/**
* Creates, caches, and returns a `FIRFirestore` object for the specified _app_. Each subsequent
@@ -56,7 +54,7 @@ FIR_SWIFT_NAME(Firestore)
*
* @return The `FIRFirestore` instance.
*/
-+ (instancetype)firestoreForApp:(FIRApp *)app FIR_SWIFT_NAME(firestore(app:));
++ (instancetype)firestoreForApp:(FIRApp *)app NS_SWIFT_NAME(firestore(app:));
/**
* Custom settings used to configure this `FIRFirestore` object.
@@ -80,7 +78,7 @@ FIR_SWIFT_NAME(Firestore)
* @return The `FIRCollectionReference` at the specified _collectionPath_.
*/
- (FIRCollectionReference *)collectionWithPath:(NSString *)collectionPath
- FIR_SWIFT_NAME(collection(_:));
+ NS_SWIFT_NAME(collection(_:));
/**
* Gets a `FIRDocumentReference` referring to the document at the specified path within the
@@ -91,7 +89,7 @@ FIR_SWIFT_NAME(Firestore)
*
* @return The `FIRDocumentReference` for the specified _documentPath_.
*/
-- (FIRDocumentReference *)documentWithPath:(NSString *)documentPath FIR_SWIFT_NAME(document(_:));
+- (FIRDocumentReference *)documentWithPath:(NSString *)documentPath NS_SWIFT_NAME(document(_:));
#pragma mark - Transactions and Write Batches
diff --git a/Firestore/Source/Public/FIRFirestoreErrors.h b/Firestore/Source/Public/FIRFirestoreErrors.h
index f2e19d9..968391c 100644
--- a/Firestore/Source/Public/FIRFirestoreErrors.h
+++ b/Firestore/Source/Public/FIRFirestoreErrors.h
@@ -16,12 +16,10 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/** The Cloud Firestore error domain. */
-FOUNDATION_EXPORT NSString *const FIRFirestoreErrorDomain FIR_SWIFT_NAME(FirestoreErrorDomain);
+FOUNDATION_EXPORT NSString *const FIRFirestoreErrorDomain NS_SWIFT_NAME(FirestoreErrorDomain);
/** Error codes used by Cloud Firestore. */
typedef NS_ENUM(NSInteger, FIRFirestoreErrorCode) {
@@ -100,6 +98,6 @@ typedef NS_ENUM(NSInteger, FIRFirestoreErrorCode) {
/** The request does not have valid authentication credentials for the operation. */
FIRFirestoreErrorCodeUnauthenticated = 16
-} FIR_SWIFT_NAME(FirestoreErrorCode);
+} NS_SWIFT_NAME(FirestoreErrorCode);
NS_ASSUME_NONNULL_END
diff --git a/Firestore/Source/Public/FIRFirestoreSettings.h b/Firestore/Source/Public/FIRFirestoreSettings.h
index 7097e60..7a1f2a3 100644
--- a/Firestore/Source/Public/FIRFirestoreSettings.h
+++ b/Firestore/Source/Public/FIRFirestoreSettings.h
@@ -16,12 +16,10 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/** Settings used to configure a `FIRFirestore` instance. */
-FIR_SWIFT_NAME(FirestoreSettings)
+NS_SWIFT_NAME(FirestoreSettings)
@interface FIRFirestoreSettings : NSObject <NSCopying>
/**
diff --git a/Firestore/Source/Public/FIRFirestoreSwiftNameSupport.h b/Firestore/Source/Public/FIRFirestoreSwiftNameSupport.h
deleted file mode 100644
index 216c047..0000000
--- a/Firestore/Source/Public/FIRFirestoreSwiftNameSupport.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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 FIR_SWIFT_NAME
-
-#import <Foundation/Foundation.h>
-
-// NS_SWIFT_NAME can only translate factory methods before the iOS 9.3 SDK.
-// Wrap it in our own macro if it's a non-compatible SDK.
-#ifdef __IPHONE_9_3
-#define FIR_SWIFT_NAME(X) NS_SWIFT_NAME(X)
-#else
-#define FIR_SWIFT_NAME(X) // Intentionally blank.
-#endif // #ifdef __IPHONE_9_3
-
-#endif // FIR_SWIFT_NAME
diff --git a/Firestore/Source/Public/FIRGeoPoint.h b/Firestore/Source/Public/FIRGeoPoint.h
index de409b5..ee7a7ea 100644
--- a/Firestore/Source/Public/FIRGeoPoint.h
+++ b/Firestore/Source/Public/FIRGeoPoint.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/**
@@ -27,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
* Latitude values are in the range of [-90, 90].
* Longitude values are in the range of [-180, 180].
*/
-FIR_SWIFT_NAME(GeoPoint)
+NS_SWIFT_NAME(GeoPoint)
@interface FIRGeoPoint : NSObject <NSCopying>
/** */
diff --git a/Firestore/Source/Public/FIRListenerRegistration.h b/Firestore/Source/Public/FIRListenerRegistration.h
index 93df407..c3a16cd 100644
--- a/Firestore/Source/Public/FIRListenerRegistration.h
+++ b/Firestore/Source/Public/FIRListenerRegistration.h
@@ -16,12 +16,10 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/** Represents a listener that can be removed by calling remove. */
-FIR_SWIFT_NAME(ListenerRegistration)
+NS_SWIFT_NAME(ListenerRegistration)
@protocol FIRListenerRegistration <NSObject>
/**
diff --git a/Firestore/Source/Public/FIRQuery.h b/Firestore/Source/Public/FIRQuery.h
index 5c5546d..4e7e161 100644
--- a/Firestore/Source/Public/FIRQuery.h
+++ b/Firestore/Source/Public/FIRQuery.h
@@ -16,7 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
#import "FIRListenerRegistration.h"
@class FIRFieldPath;
@@ -30,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
* Options for use with `[FIRQuery addSnapshotListener]` to control the behavior of the snapshot
* listener.
*/
-FIR_SWIFT_NAME(QueryListenOptions)
+NS_SWIFT_NAME(QueryListenOptions)
@interface FIRQueryListenOptions : NSObject
+ (instancetype)options NS_SWIFT_UNAVAILABLE("Use initializer");
@@ -49,7 +48,7 @@ FIR_SWIFT_NAME(QueryListenOptions)
* @return The receiver is returned for optional method chaining.
*/
- (instancetype)includeQueryMetadataChanges:(BOOL)includeQueryMetadataChanges
- FIR_SWIFT_NAME(includeQueryMetadataChanges(_:));
+ NS_SWIFT_NAME(includeQueryMetadataChanges(_:));
@property(nonatomic, assign, readonly) BOOL includeDocumentMetadataChanges;
@@ -62,7 +61,7 @@ FIR_SWIFT_NAME(QueryListenOptions)
* @return The receiver is returned for optional method chaining.
*/
- (instancetype)includeDocumentMetadataChanges:(BOOL)includeDocumentMetadataChanges
- FIR_SWIFT_NAME(includeDocumentMetadataChanges(_:));
+ NS_SWIFT_NAME(includeDocumentMetadataChanges(_:));
@end
@@ -73,7 +72,7 @@ typedef void (^FIRQuerySnapshotBlock)(FIRQuerySnapshot *_Nullable snapshot,
* A `FIRQuery` refers to a Query which you can read or listen to. You can also construct
* refined `FIRQuery` objects by adding filters and ordering.
*/
-FIR_SWIFT_NAME(Query)
+NS_SWIFT_NAME(Query)
@interface FIRQuery : NSObject
/** */
- (id)init __attribute__((unavailable("FIRQuery cannot be created directly.")));
@@ -89,7 +88,7 @@ FIR_SWIFT_NAME(Query)
* documentSet will be `nil` only if error is `non-nil`.
*/
- (void)getDocumentsWithCompletion:(FIRQuerySnapshotBlock)completion
- FIR_SWIFT_NAME(getDocuments(completion:));
+ NS_SWIFT_NAME(getDocuments(completion:));
/**
* Attaches a listener for QuerySnapshot events.
@@ -99,7 +98,7 @@ FIR_SWIFT_NAME(Query)
* @return A FIRListenerRegistration that can be used to remove this listener.
*/
- (id<FIRListenerRegistration>)addSnapshotListener:(FIRQuerySnapshotBlock)listener
- FIR_SWIFT_NAME(addSnapshotListener(_:));
+ NS_SWIFT_NAME(addSnapshotListener(_:));
/**
* Attaches a listener for QuerySnapshot events.
@@ -113,7 +112,7 @@ FIR_SWIFT_NAME(Query)
- (id<FIRListenerRegistration>)addSnapshotListenerWithOptions:
(nullable FIRQueryListenOptions *)options
listener:(FIRQuerySnapshotBlock)listener
- FIR_SWIFT_NAME(addSnapshotListener(options:listener:));
+ NS_SWIFT_NAME(addSnapshotListener(options:listener:));
// clang-format on
#pragma mark - Filtering Data
@@ -128,7 +127,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereField:(NSString *)field
- isEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isEqualTo:));
+ isEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isEqualTo:));
// clang-format on
/**
@@ -142,7 +141,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path
- isEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isEqualTo:));
+ isEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isEqualTo:));
// clang-format on
/**
@@ -156,7 +155,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereField:(NSString *)field
- isLessThan:(id)value FIR_SWIFT_NAME(whereField(_:isLessThan:));
+ isLessThan:(id)value NS_SWIFT_NAME(whereField(_:isLessThan:));
// clang-format on
/**
@@ -170,7 +169,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path
- isLessThan:(id)value FIR_SWIFT_NAME(whereField(_:isLessThan:));
+ isLessThan:(id)value NS_SWIFT_NAME(whereField(_:isLessThan:));
// clang-format on
/**
@@ -184,7 +183,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereField:(NSString *)field
- isLessThanOrEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:));
+ isLessThanOrEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:));
// clang-format on
/**
@@ -198,7 +197,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path
- isLessThanOrEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:));
+ isLessThanOrEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:));
// clang-format on
/**
@@ -212,7 +211,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereField:(NSString *)field
- isGreaterThan:(id)value FIR_SWIFT_NAME(whereField(_:isGreaterThan:));
+ isGreaterThan:(id)value NS_SWIFT_NAME(whereField(_:isGreaterThan:));
// clang-format on
/**
@@ -226,7 +225,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path
- isGreaterThan:(id)value FIR_SWIFT_NAME(whereField(_:isGreaterThan:));
+ isGreaterThan:(id)value NS_SWIFT_NAME(whereField(_:isGreaterThan:));
// clang-format on
/**
@@ -240,7 +239,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereField:(NSString *)field
- isGreaterThanOrEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isGreaterThanOrEqualTo:));
+ isGreaterThanOrEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isGreaterThanOrEqualTo:));
// clang-format on
/**
@@ -254,7 +253,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path
- isGreaterThanOrEqualTo:(id)value FIR_SWIFT_NAME(whereField(_:isGreaterThanOrEqualTo:));
+ isGreaterThanOrEqualTo:(id)value NS_SWIFT_NAME(whereField(_:isGreaterThanOrEqualTo:));
// clang-format on
#pragma mark - Sorting Data
@@ -265,7 +264,7 @@ FIR_SWIFT_NAME(Query)
*
* @return The created `FIRQuery`.
*/
-- (FIRQuery *)queryOrderedByField:(NSString *)field FIR_SWIFT_NAME(order(by:));
+- (FIRQuery *)queryOrderedByField:(NSString *)field NS_SWIFT_NAME(order(by:));
/**
* Creates and returns a new `FIRQuery` that's additionally sorted by the specified field.
@@ -274,7 +273,7 @@ FIR_SWIFT_NAME(Query)
*
* @return The created `FIRQuery`.
*/
-- (FIRQuery *)queryOrderedByFieldPath:(FIRFieldPath *)path FIR_SWIFT_NAME(order(by:));
+- (FIRQuery *)queryOrderedByFieldPath:(FIRFieldPath *)path NS_SWIFT_NAME(order(by:));
/**
* Creates and returns a new `FIRQuery` that's additionally sorted by the specified field,
@@ -287,7 +286,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryOrderedByField:(NSString *)field
- descending:(BOOL)descending FIR_SWIFT_NAME(order(by:descending:));
+ descending:(BOOL)descending NS_SWIFT_NAME(order(by:descending:));
// clang-format on
/**
@@ -301,7 +300,7 @@ FIR_SWIFT_NAME(Query)
*/
// clang-format off
- (FIRQuery *)queryOrderedByFieldPath:(FIRFieldPath *)path
- descending:(BOOL)descending FIR_SWIFT_NAME(order(by:descending:));
+ descending:(BOOL)descending NS_SWIFT_NAME(order(by:descending:));
// clang-format on
#pragma mark - Limiting Data
@@ -313,7 +312,7 @@ FIR_SWIFT_NAME(Query)
*
* @return The created `FIRQuery`.
*/
-- (FIRQuery *)queryLimitedTo:(NSInteger)limit FIR_SWIFT_NAME(limit(to:));
+- (FIRQuery *)queryLimitedTo:(NSInteger)limit NS_SWIFT_NAME(limit(to:));
#pragma mark - Choosing Endpoints
/**
@@ -326,7 +325,7 @@ FIR_SWIFT_NAME(Query)
* @return The created `FIRQuery`.
*/
- (FIRQuery *)queryStartingAtDocument:(FIRDocumentSnapshot *)document
- FIR_SWIFT_NAME(start(atDocument:));
+ NS_SWIFT_NAME(start(atDocument:));
/**
* Creates and returns a new `FIRQuery` that starts at the provided fields relative to the order of
@@ -337,7 +336,7 @@ FIR_SWIFT_NAME(Query)
*
* @return The created `FIRQuery`.
*/
-- (FIRQuery *)queryStartingAtValues:(NSArray *)fieldValues FIR_SWIFT_NAME(start(at:));
+- (FIRQuery *)queryStartingAtValues:(NSArray *)fieldValues NS_SWIFT_NAME(start(at:));
/**
* Creates and returns a new `FIRQuery` that starts after the provided document (exclusive). The
@@ -349,7 +348,7 @@ FIR_SWIFT_NAME(Query)
* @return The created `FIRQuery`.
*/
- (FIRQuery *)queryStartingAfterDocument:(FIRDocumentSnapshot *)document
- FIR_SWIFT_NAME(start(afterDocument:));
+ NS_SWIFT_NAME(start(afterDocument:));
/**
* Creates and returns a new `FIRQuery` that starts after the provided fields relative to the order
@@ -361,7 +360,7 @@ FIR_SWIFT_NAME(Query)
*
* @return The created `FIRQuery`.
*/
-- (FIRQuery *)queryStartingAfterValues:(NSArray *)fieldValues FIR_SWIFT_NAME(start(after:));
+- (FIRQuery *)queryStartingAfterValues:(NSArray *)fieldValues NS_SWIFT_NAME(start(after:));
/**
* Creates and returns a new `FIRQuery` that ends before the provided document (exclusive). The end
@@ -373,7 +372,7 @@ FIR_SWIFT_NAME(Query)
* @return The created `FIRQuery`.
*/
- (FIRQuery *)queryEndingBeforeDocument:(FIRDocumentSnapshot *)document
- FIR_SWIFT_NAME(end(beforeDocument:));
+ NS_SWIFT_NAME(end(beforeDocument:));
/**
* Creates and returns a new `FIRQuery` that ends before the provided fields relative to the order
@@ -384,7 +383,7 @@ FIR_SWIFT_NAME(Query)
*
* @return The created `FIRQuery`.
*/
-- (FIRQuery *)queryEndingBeforeValues:(NSArray *)fieldValues FIR_SWIFT_NAME(end(before:));
+- (FIRQuery *)queryEndingBeforeValues:(NSArray *)fieldValues NS_SWIFT_NAME(end(before:));
/**
* Creates and returns a new `FIRQuery` that ends at the provided document (exclusive). The end
@@ -396,7 +395,7 @@ FIR_SWIFT_NAME(Query)
* @return The created `FIRQuery`.
*/
- (FIRQuery *)queryEndingAtDocument:(FIRDocumentSnapshot *)document
- FIR_SWIFT_NAME(end(atDocument:));
+ NS_SWIFT_NAME(end(atDocument:));
/**
* Creates and returns a new `FIRQuery` that ends at the provided fields relative to the order of
@@ -407,7 +406,7 @@ FIR_SWIFT_NAME(Query)
*
* @return The created `FIRQuery`.
*/
-- (FIRQuery *)queryEndingAtValues:(NSArray *)fieldValues FIR_SWIFT_NAME(end(at:));
+- (FIRQuery *)queryEndingAtValues:(NSArray *)fieldValues NS_SWIFT_NAME(end(at:));
@end
diff --git a/Firestore/Source/Public/FIRQuerySnapshot.h b/Firestore/Source/Public/FIRQuerySnapshot.h
index 800368d..c49a07a 100644
--- a/Firestore/Source/Public/FIRQuerySnapshot.h
+++ b/Firestore/Source/Public/FIRQuerySnapshot.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
@class FIRDocumentChange;
@@ -30,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
* using "for ... in documentSet.documents" and its size can be inspected with `isEmpty` and
* `count`.
*/
-FIR_SWIFT_NAME(QuerySnapshot)
+NS_SWIFT_NAME(QuerySnapshot)
@interface FIRQuerySnapshot : NSObject
/** */
diff --git a/Firestore/Source/Public/FIRSetOptions.h b/Firestore/Source/Public/FIRSetOptions.h
index e1103a1..c865e06 100644
--- a/Firestore/Source/Public/FIRSetOptions.h
+++ b/Firestore/Source/Public/FIRSetOptions.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/**
@@ -26,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
* `FIRWriteBatch` and `FIRTransaction` can be configured to perform granular merges instead
* of overwriting the target documents in their entirety.
*/
-FIR_SWIFT_NAME(SetOptions)
+NS_SWIFT_NAME(SetOptions)
@interface FIRSetOptions : NSObject
/** */
diff --git a/Firestore/Source/Public/FIRSnapshotMetadata.h b/Firestore/Source/Public/FIRSnapshotMetadata.h
index 04a6b45..4c7ff98 100644
--- a/Firestore/Source/Public/FIRSnapshotMetadata.h
+++ b/Firestore/Source/Public/FIRSnapshotMetadata.h
@@ -16,12 +16,10 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
/** Metadata about a snapshot, describing the state of the snapshot. */
-FIR_SWIFT_NAME(SnapshotMetadata)
+NS_SWIFT_NAME(SnapshotMetadata)
@interface FIRSnapshotMetadata : NSObject
- (instancetype)init NS_UNAVAILABLE;
diff --git a/Firestore/Source/Public/FIRTransaction.h b/Firestore/Source/Public/FIRTransaction.h
index 68e4600..51a6e90 100644
--- a/Firestore/Source/Public/FIRTransaction.h
+++ b/Firestore/Source/Public/FIRTransaction.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
@class FIRDocumentReference;
@@ -29,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @see FIRFirestore#transaction:completion:
*/
-FIR_SWIFT_NAME(Transaction)
+NS_SWIFT_NAME(Transaction)
@interface FIRTransaction : NSObject
/** */
@@ -47,7 +45,7 @@ FIR_SWIFT_NAME(Transaction)
// clang-format off
- (FIRTransaction *)setData:(NSDictionary<NSString *, id> *)data
forDocument:(FIRDocumentReference *)document
- FIR_SWIFT_NAME(setData(_:forDocument:));
+ NS_SWIFT_NAME(setData(_:forDocument:));
// clang-format on
/**
@@ -64,7 +62,7 @@ FIR_SWIFT_NAME(Transaction)
- (FIRTransaction *)setData:(NSDictionary<NSString *, id> *)data
forDocument:(FIRDocumentReference *)document
options:(FIRSetOptions *)options
- FIR_SWIFT_NAME(setData(_:forDocument:options:));
+ NS_SWIFT_NAME(setData(_:forDocument:options:));
// clang-format on
/**
@@ -79,7 +77,7 @@ FIR_SWIFT_NAME(Transaction)
// clang-format off
- (FIRTransaction *)updateData:(NSDictionary<id, id> *)fields
forDocument:(FIRDocumentReference *)document
- FIR_SWIFT_NAME(updateData(_:forDocument:));
+ NS_SWIFT_NAME(updateData(_:forDocument:));
// clang-format on
/**
@@ -89,7 +87,7 @@ FIR_SWIFT_NAME(Transaction)
* @return This `FIRTransaction` instance. Used for chaining method calls.
*/
- (FIRTransaction *)deleteDocument:(FIRDocumentReference *)document
- FIR_SWIFT_NAME(deleteDocument(_:));
+ NS_SWIFT_NAME(deleteDocument(_:));
/**
* Reads the document referenced by `document`.
@@ -99,7 +97,7 @@ FIR_SWIFT_NAME(Transaction)
*/
- (FIRDocumentSnapshot *_Nullable)getDocument:(FIRDocumentReference *)document
error:(NSError *__autoreleasing *)error
- FIR_SWIFT_NAME(getDocument(_:));
+ NS_SWIFT_NAME(getDocument(_:));
@end
diff --git a/Firestore/Source/Public/FIRWriteBatch.h b/Firestore/Source/Public/FIRWriteBatch.h
index b88e6cc..a74d451 100644
--- a/Firestore/Source/Public/FIRWriteBatch.h
+++ b/Firestore/Source/Public/FIRWriteBatch.h
@@ -16,8 +16,6 @@
#import <Foundation/Foundation.h>
-#import "FIRFirestoreSwiftNameSupport.h"
-
NS_ASSUME_NONNULL_BEGIN
@class FIRDocumentReference;
@@ -33,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
* Unlike transactions, write batches are persisted offline and therefore are preferable when you
* don't need to condition your writes on read data.
*/
-FIR_SWIFT_NAME(WriteBatch)
+NS_SWIFT_NAME(WriteBatch)
@interface FIRWriteBatch : NSObject
/** :nodoc: */
@@ -50,7 +48,7 @@ FIR_SWIFT_NAME(WriteBatch)
*/
// clang-format off
- (FIRWriteBatch *)setData:(NSDictionary<NSString *, id> *)data
- forDocument:(FIRDocumentReference *)document FIR_SWIFT_NAME(setData(_:forDocument:));
+ forDocument:(FIRDocumentReference *)document NS_SWIFT_NAME(setData(_:forDocument:));
// clang-format on
/**
@@ -67,7 +65,7 @@ FIR_SWIFT_NAME(WriteBatch)
- (FIRWriteBatch *)setData:(NSDictionary<NSString *, id> *)data
forDocument:(FIRDocumentReference *)document
options:(FIRSetOptions *)options
- FIR_SWIFT_NAME(setData(_:forDocument:options:));
+ NS_SWIFT_NAME(setData(_:forDocument:options:));
// clang-format on
/**
@@ -82,7 +80,7 @@ FIR_SWIFT_NAME(WriteBatch)
// clang-format off
- (FIRWriteBatch *)updateData:(NSDictionary<id, id> *)fields
forDocument:(FIRDocumentReference *)document
- FIR_SWIFT_NAME(updateData(_:forDocument:));
+ NS_SWIFT_NAME(updateData(_:forDocument:));
// clang-format on
/**
@@ -92,7 +90,7 @@ FIR_SWIFT_NAME(WriteBatch)
* @return This `FIRWriteBatch` instance. Used for chaining method calls.
*/
- (FIRWriteBatch *)deleteDocument:(FIRDocumentReference *)document
- FIR_SWIFT_NAME(deleteDocument(_:));
+ NS_SWIFT_NAME(deleteDocument(_:));
/**
* Commits all of the writes in this write batch as a single atomic unit.