diff options
author | Andrew Breckenridge <asbreckenridge@me.com> | 2017-06-02 02:35:38 +0900 |
---|---|---|
committer | Morgan Chen <morganchen12@gmail.com> | 2017-06-01 10:35:38 -0700 |
commit | 96859c6c70a84844572d0bceca5a8c156188220a (patch) | |
tree | faa5fe41d46dbda91a0c360698943ad377a17734 /Firebase/Database | |
parent | a8ac02b7c1c2859326fc1d975dc034f75a817d96 (diff) |
mark FIRDatabase init unavailable (#48)
FIRDatabase's initializer is inherited from NSObject and causes subtle bugs if called. See https://github.com/firebase/firebase-ios-sdk/issues/31
Diffstat (limited to 'Firebase/Database')
-rw-r--r-- | Firebase/Database/Api/FIRDatabase.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Firebase/Database/Api/FIRDatabase.h b/Firebase/Database/Api/FIRDatabase.h index e77ed31..ebdbf8a 100644 --- a/Firebase/Database/Api/FIRDatabase.h +++ b/Firebase/Database/Api/FIRDatabase.h @@ -29,6 +29,14 @@ NS_ASSUME_NONNULL_BEGIN */ FIR_SWIFT_NAME(Database) @interface FIRDatabase : NSObject + +/** + * The NSObject initializer that has been marked as unavailable. Use the `database` + * method instead + * + * @return An instancetype instance +*/ ++ (instancetype) init __attribute__((unavailable("use the database method instead"))); /** * Gets the instance of FIRDatabase for the default FIRApp. |