File tree 1 file changed +7
-5
lines changed
firestore/ios/firestore-snippets-cpp
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 19
19
#include " firebase/app.h"
20
20
#include " firebase/firestore.h"
21
21
22
+ using firebase::App;
23
+ using firebase::firestore::Firestore;
24
+
22
25
@interface AppDelegate ()
23
26
24
27
@end
@@ -27,13 +30,12 @@ @implementation AppDelegate
27
30
28
31
- (BOOL )application : (UIApplication *)application didFinishLaunchingWithOptions : (NSDictionary *)launchOptions {
29
32
[FIRApp configure ];
30
- #pragma clang diagnostic push
31
- #pragma clang diagnostic ignored "-Wunused-variable"
32
33
// [START get_firestore_instance]
33
- firebase::App::Create ();
34
- auto db = firebase::firestore::Firestore::GetInstance ();
34
+ // Make sure the call to `Create()` happens some time before you call Firestore::GetInstance().
35
+ App::Create ();
36
+ Firestore * db = Firestore::GetInstance ();
35
37
// [END get_firestore_instance]
36
- # pragma clang diagnostic pop
38
+ ( void )db; // suppress unused variable warning
37
39
return YES ;
38
40
}
39
41
You can’t perform that action at this time.
0 commit comments