diff options
author | Sebastian Schmidt <mrschmidt@google.com> | 2018-02-12 19:11:45 -0800 |
---|---|---|
committer | Sebastian Schmidt <mrschmidt@google.com> | 2018-02-13 10:27:53 -0800 |
commit | 12faf205f34042aa7fb6ff13c6980556dbb1ba39 (patch) | |
tree | 4f6300167f06b0cb68fb5c5fb3274293df62bb91 /Example | |
parent | adf9fb31eeef639ef23b2ff22a71adaa91a263b7 (diff) |
Cleaning up implicit retain for the RTDB and Storage
Diffstat (limited to 'Example')
5 files changed, 14 insertions, 5 deletions
diff --git a/Example/Database/Tests/Integration/FData.m b/Example/Database/Tests/Integration/FData.m index aef15e1..d036f77 100644 --- a/Example/Database/Tests/Integration/FData.m +++ b/Example/Database/Tests/Integration/FData.m @@ -487,7 +487,7 @@ [[ref child:@"100003354884401"] setValue:@"alpha"]; __block BOOL ready = NO; - [ref observeEventType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot *snapshot) { + [ref observeSingleEventOfType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot *snapshot) { id val = [snapshot value]; XCTAssertTrue([val isKindOfClass:[NSDictionary class]], @"Expected a dictionary."); ready = YES; @@ -678,6 +678,8 @@ [self waitUntil:^BOOL{ return setDone && calls == 1; }]; + + [node removeAllObservers]; } - (void) testHasChildrenWorksCorrectly { @@ -878,6 +880,7 @@ [self waitUntil:^BOOL{ return calls == 1; }]; + [reader removeAllObservers]; } - (void) testSetPriorityOnNonexistentNodeFails { @@ -2208,6 +2211,7 @@ }]; WAIT_FOR(done); + [deleter removeAllObservers]; } - (void) testParentDeleteShadowsChildListenersWithNonDefaultQuery { diff --git a/Example/Database/Tests/Integration/FRealtime.m b/Example/Database/Tests/Integration/FRealtime.m index 5c7d186..5acda07 100644 --- a/Example/Database/Tests/Integration/FRealtime.m +++ b/Example/Database/Tests/Integration/FRealtime.m @@ -481,6 +481,7 @@ WAIT_FOR(count == 2); // cleanup + [reader removeAllObservers]; [FRepoManager disposeRepos:writerCfg]; } diff --git a/Example/Database/Tests/Unit/FSyncPointTests.m b/Example/Database/Tests/Unit/FSyncPointTests.m index 797a5aa..de4680f 100644 --- a/Example/Database/Tests/Unit/FSyncPointTests.m +++ b/Example/Database/Tests/Unit/FSyncPointTests.m @@ -86,15 +86,15 @@ typedef NSDictionary* (^fbt_nsdictionary_void)(void); } - (void) fireEvent:(id<FEvent>)event queue:(dispatch_queue_t)queue { - [NSException raise:@"NotImplementedError" format:@"Method not implemneted."]; + [NSException raise:@"NotImplementedError" format:@"Method not implemented."]; } - (FCancelEvent *) createCancelEventFromError:(NSError *)error path:(FPath *)path { - [NSException raise:@"NotImplementedError" format:@"Method not implemneted."]; + [NSException raise:@"NotImplementedError" format:@"Method not implemented."]; return nil; } - (FIRDatabaseHandle) handle { - [NSException raise:@"NotImplementedError" format:@"Method not implemneted."]; + [NSException raise:@"NotImplementedError" format:@"Method not implemented."]; return 0; } @end diff --git a/Example/Firebase.xcodeproj/project.pbxproj b/Example/Firebase.xcodeproj/project.pbxproj index 9431ae0..c8400d6 100644 --- a/Example/Firebase.xcodeproj/project.pbxproj +++ b/Example/Firebase.xcodeproj/project.pbxproj @@ -8111,6 +8111,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = "$(SRCROOT)/Database/App/iOS/Database-Info.plist"; @@ -8129,6 +8130,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; @@ -8650,6 +8652,7 @@ baseConfigurationReference = 06F3D16439F061DE9973902D /* Pods-Storage_Example_iOS.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -8671,6 +8674,7 @@ baseConfigurationReference = D440FB786B320FCF836B508F /* Pods-Storage_Example_iOS.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; diff --git a/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m b/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m index 703c2c6..8e826c9 100644 --- a/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m +++ b/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m @@ -33,7 +33,7 @@ NSTimeInterval kFIRStorageIntegrationTestTimeout = 30; * A sample configuration may look like: * * service firebase.storage { - * match /b/{YOUR_PROJECT_ID}.appspot.com/o { + * match /b/{bucket}/o { * ... * match /ios { * match /public/{allPaths=**} { |