From 4588fa0a065724d7f274e8222a40924346229a35 Mon Sep 17 00:00:00 2001 From: Morgan Chen Date: Tue, 7 Feb 2017 12:41:39 -0800 Subject: [PATCH] fix data source init having side effects --- FirebaseDatabaseUI/FUICollection.h | 2 +- .../FUICollectionViewDataSource.h | 33 ++++++--- .../FUICollectionViewDataSource.m | 39 +++++++--- FirebaseDatabaseUI/FUIDataSource.h | 65 ---------------- FirebaseDatabaseUI/FUIDataSource.m | 74 ------------------- FirebaseDatabaseUI/FUITableViewDataSource.h | 31 +++++--- FirebaseDatabaseUI/FUITableViewDataSource.m | 39 +++++++--- FirebaseDatabaseUI/FirebaseDatabaseUI.h | 1 - .../FUICollectionViewDataSourceTest.m | 11 ++- FirebaseUI.xcodeproj/project.pbxproj | 10 --- .../xcschemes/FirebaseDatabaseUI.xcscheme | 3 +- 11 files changed, 108 insertions(+), 200 deletions(-) delete mode 100644 FirebaseDatabaseUI/FUIDataSource.h delete mode 100644 FirebaseDatabaseUI/FUIDataSource.m diff --git a/FirebaseDatabaseUI/FUICollection.h b/FirebaseDatabaseUI/FUICollection.h index 1f5b7655595..250c77ff789 100644 --- a/FirebaseDatabaseUI/FUICollection.h +++ b/FirebaseDatabaseUI/FUICollection.h @@ -20,7 +20,7 @@ @import Foundation; -@class FUIArray; +@class FIRDatabaseReference, FIRDatabaseQuery, FIRDataSnapshot; @protocol FUICollectionDelegate; NS_ASSUME_NONNULL_BEGIN diff --git a/FirebaseDatabaseUI/FUICollectionViewDataSource.h b/FirebaseDatabaseUI/FUICollectionViewDataSource.h index 124560315d2..cb6005427bb 100644 --- a/FirebaseDatabaseUI/FUICollectionViewDataSource.h +++ b/FirebaseDatabaseUI/FUICollectionViewDataSource.h @@ -20,19 +20,17 @@ @import UIKit; -#import "FUIDataSource.h" +#import NS_ASSUME_NONNULL_BEGIN -@class FIRDatabaseReference; - /** * FUICollectionViewDataSource provides a class that conforms to the * UICollectionViewDataSource protocol which allows UICollectionViews to * adopt FUICollectionViewDataSource in order to provide a UICollectionView * synchronized to a Firebase reference or query. */ -@interface FUICollectionViewDataSource : FUIDataSource +@interface FUICollectionViewDataSource : NSObject /** * The UICollectionView instance that operations (inserts, removals, moves, @@ -46,16 +44,19 @@ NS_ASSUME_NONNULL_BEGIN * The callback to populate a subclass of UICollectionViewCell with an object * provided by the datasource. */ -@property(strong, nonatomic, readonly) UICollectionViewCell *(^populateCellAtIndexPath) +@property (strong, nonatomic, readonly) UICollectionViewCell *(^populateCellAtIndexPath) (UICollectionView *collectionView, NSIndexPath *indexPath, FIRDataSnapshot *object); +/** + * The number of items in the data source. + */ +@property (nonatomic, readonly) NSUInteger count; + /** * Initialize an instance of FUICollectionViewDataSource that populates * UICollectionViewCells with FIRDataSnapshots. * @param collection A FUICollection that the data source uses to pull snapshots * from Firebase Database. - * @param view An instance of a UICollectionView to bind to. This view - * is not retained by its data source. * @param populateCell A closure used by the data source to create the cells that * are displayed in the collection view. This closure is retained by the data * source, so if you capture self in the closure and also claim ownership of the @@ -64,7 +65,6 @@ NS_ASSUME_NONNULL_BEGIN * UICollectionViewCells with FIRDataSnapshots. */ - (instancetype)initWithCollection:(id)collection - view:(UICollectionView *)view populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView, NSIndexPath *indexPath, FIRDataSnapshot *object))populateCell NS_DESIGNATED_INITIALIZER; @@ -73,8 +73,6 @@ NS_ASSUME_NONNULL_BEGIN * Initialize an unsorted instance of FUICollectionViewDataSource that populates * UICollectionViewCells with FIRDataSnapshots. * @param query A Firebase query to bind the data source to. - * @param collectionView An instance of a UICollectionView to bind to. This view - * is not retained by its data source. * @param populateCell A closure used by the data source to create the cells that * are displayed in the collection view. This closure is retained by the data * source, so if you capture self in the closure and also claim ownership of the @@ -83,12 +81,23 @@ NS_ASSUME_NONNULL_BEGIN * UICollectionViewCells with FIRDataSnapshots. */ - (instancetype)initWithQuery:(FIRDatabaseQuery *)query - view:(UICollectionView *)collectionView populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView, NSIndexPath *indexPath, FIRDataSnapshot *object))populateCell; -- (instancetype)initWithCollection:(id)collection NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; + +/** + * Attaches the data source to a collection view and begins sending updates immediately. + * @param view An instance of UICollectionView that the data source should push + * updates to. + */ +- (void)bindToView:(UICollectionView *)view; + +/** + * Detaches the data source from a view and stops sending any updates. + */ +- (void)unbind; @end diff --git a/FirebaseDatabaseUI/FUICollectionViewDataSource.m b/FirebaseDatabaseUI/FUICollectionViewDataSource.m index 467dac46701..c9e67d52d44 100644 --- a/FirebaseDatabaseUI/FUICollectionViewDataSource.m +++ b/FirebaseDatabaseUI/FUICollectionViewDataSource.m @@ -19,33 +19,54 @@ // clang-format on #import "FUICollectionViewDataSource.h" +#import "FUIArray.h" @import FirebaseDatabase; +@interface FUICollectionViewDataSource () + +@property (nonatomic, readonly, nonnull) id collection; + +@end + @implementation FUICollectionViewDataSource #pragma mark - FUIDataSource initializer methods - (instancetype)initWithCollection:(id)collection - view:(UICollectionView *)view populateCell:(UICollectionViewCell * (^)(UICollectionView *, NSIndexPath *, FIRDataSnapshot *))populateCell { - self = [super initWithCollection:collection]; + self = [super init]; if (self) { - _collectionView = view; + _collection = collection; _populateCellAtIndexPath = populateCell; } return self; } - (instancetype)initWithQuery:(FIRDatabaseQuery *)query - view:(UICollectionView *)collectionView populateCell:(UICollectionViewCell *(^)(UICollectionView *, NSIndexPath *, FIRDataSnapshot *))populateCell { FUIArray *array = [[FUIArray alloc] initWithQuery:query]; - return [self initWithCollection:array view:collectionView populateCell:populateCell]; + return [self initWithCollection:array populateCell:populateCell]; +} + +- (NSUInteger)count { + return self.collection.count; +} + +- (void)bindToView:(UICollectionView *)view { + self.collectionView = view; + view.dataSource = self; + [self.collection observeQuery]; +} + +- (void)unbind { + self.collectionView.dataSource = nil; + self.collectionView = nil; + [self.collection invalidate]; } #pragma mark - FUICollectionDelegate methods @@ -75,7 +96,7 @@ - (void)array:(FUIArray *)array didMoveObject:(id)object - (nonnull UICollectionViewCell *)collectionView:(nonnull UICollectionView *)collectionView cellForItemAtIndexPath:(nonnull NSIndexPath *)indexPath { - FIRDataSnapshot *snap = [self.items objectAtIndex:indexPath.row]; + FIRDataSnapshot *snap = [self.collection.items objectAtIndex:indexPath.item]; UICollectionViewCell *cell = self.populateCellAtIndexPath(collectionView, indexPath, snap); @@ -88,7 +109,7 @@ - (NSInteger)numberOfSectionsInCollectionView:(nonnull UICollectionView *)collec - (NSInteger)collectionView:(nonnull UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - return self.count; + return self.collection.count; } @end @@ -100,8 +121,8 @@ - (FUICollectionViewDataSource *)bindToQuery:(FIRDatabaseQuery *)query NSIndexPath *, FIRDataSnapshot *))populateCell { FUICollectionViewDataSource *dataSource = - [[FUICollectionViewDataSource alloc] initWithQuery:query view:self populateCell:populateCell]; - self.dataSource = dataSource; + [[FUICollectionViewDataSource alloc] initWithQuery:query populateCell:populateCell]; + [dataSource bindToView:self]; return dataSource; } diff --git a/FirebaseDatabaseUI/FUIDataSource.h b/FirebaseDatabaseUI/FUIDataSource.h deleted file mode 100644 index 9e84383afc9..00000000000 --- a/FirebaseDatabaseUI/FUIDataSource.h +++ /dev/null @@ -1,65 +0,0 @@ -// clang-format off - -// -// Copyright (c) 2016 Google Inc. -// -// 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. -// - -// clang-format on - -@import Foundation; - -#import "FUIArray.h" - -@class FIRDatabaseReference; - -/** - * FUIDataSource is a generic superclass for all Firebase datasources, - * like - * FUITableViewDataSource and FUICollectionViewDataSource. It provides - * properties that all - * subclasses need as well as several methods that pass through to the instance - * of FirebaseArray. - */ -@interface FUIDataSource : NSObject - -/** - * The items in the data source. - */ -@property (nonatomic, readonly, copy) NSArray *items; - -/** - * The number of items in the receiver's collection. - */ -@property (nonatomic, readonly) NSUInteger count; - -/** - * Takes an FUICollection and immediately starts observing it. - */ -- (instancetype)initWithCollection:(id)collection NS_DESIGNATED_INITIALIZER; - -- (instancetype)init NS_UNAVAILABLE; - -/** - * Returns the snapshot at the given index in the receiver's collection. - */ -- (FIRDataSnapshot *)objectAtIndex:(NSUInteger)index; - -/** - * Provides a block which is called when the backing array cancels its query. - * @param block the block - */ -- (void)cancelWithBlock:(void (^)(NSError *error))block; - -@end diff --git a/FirebaseDatabaseUI/FUIDataSource.m b/FirebaseDatabaseUI/FUIDataSource.m deleted file mode 100644 index 5ec9d4d109b..00000000000 --- a/FirebaseDatabaseUI/FUIDataSource.m +++ /dev/null @@ -1,74 +0,0 @@ -// clang-format off - -// -// Copyright (c) 2016 Google Inc. -// -// 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. -// - -// clang-format on - -#import "FUIDataSource.h" - -@interface FUIDataSource () - -@property(copy, nonatomic, nonnull) void (^cancelBlock)(NSError *); - -/** - * The FirebaseArray which backs the instance of the datasource. - */ -@property(strong, nonatomic, nonnull) id collection; - -@end - -@implementation FUIDataSource - -#pragma mark - Initializer methods - -- (instancetype)initWithCollection:(id)collection { - self = [super init]; - if (self) { - _collection = collection; - _collection.delegate = self; - [_collection observeQuery]; - } - return self; -} - -#pragma mark - API methods - -- (NSArray *)items { - return [self.collection.items copy]; -} - -- (NSUInteger)count { - return self.collection.count; -} - -- (FIRDataSnapshot *)objectAtIndex:(NSUInteger)index { - return [self.collection snapshotAtIndex:index]; -} - -- (void)cancelWithBlock:(void (^)(NSError *))block { - self.cancelBlock = block; -} - -#pragma mark - FUICollectionDelegate methods - -- (void)canceledWithError:(NSError *)error { - if (self.cancelBlock != nil) { - self.cancelBlock(error); - } -} - -@end diff --git a/FirebaseDatabaseUI/FUITableViewDataSource.h b/FirebaseDatabaseUI/FUITableViewDataSource.h index 2f73bb6f0fc..826d1bfe0b5 100644 --- a/FirebaseDatabaseUI/FUITableViewDataSource.h +++ b/FirebaseDatabaseUI/FUITableViewDataSource.h @@ -20,7 +20,7 @@ @import UIKit; -#import "FUIDataSource.h" +#import NS_ASSUME_NONNULL_BEGIN @@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN * FUITableViewDataSource in order to provide a UITableView synchronized * to a Firebase reference or query. */ -@interface FUITableViewDataSource : FUIDataSource +@interface FUITableViewDataSource : NSObject /** * The UITableView instance that operations (inserts, removals, moves, etc.) are @@ -44,15 +44,18 @@ NS_ASSUME_NONNULL_BEGIN /** * The callback used by the data source to populate the table view. */ -@property(strong, nonatomic, readonly) UITableViewCell *(^populateCell) +@property (strong, nonatomic, readonly) UITableViewCell *(^populateCell) (UITableView *tableView, NSIndexPath *indexPath, FIRDataSnapshot *snap); +/** + * The number of items in the data source. + */ +@property (nonatomic, readonly) NSUInteger count; + /** * Initialize an instance of FUITableViewDataSource. * @param collection An FUICollection used by the data source to pull data * from Firebase Database. - * @param tableView An instance of a UITableView to bind to. This view is - * not retained by the data source. * @param populateCell A closure used by the data source to create/reuse * table view cells and populate their content. This closure is retained * by the data source, so if you capture self in the closure and also claim ownership @@ -60,7 +63,6 @@ NS_ASSUME_NONNULL_BEGIN * @return An instance of FUITableViewDataSource. */ - (instancetype)initWithCollection:(id)collection - view:(UITableView *)tableView populateCell:(UITableViewCell *(^)(UITableView *tableView, NSIndexPath *indexPath, FIRDataSnapshot *object))populateCell NS_DESIGNATED_INITIALIZER; @@ -70,8 +72,6 @@ NS_ASSUME_NONNULL_BEGIN * Initialize an instance of FUITableViewDataSource with contents ordered * by the query. * @param query A Firebase query to bind the data source to. - * @param tableView An instance of a UITableView to bind to. This view is - * not retained by the data source. * @param populateCell A closure used by the data source to create/reuse * table view cells and populate their content. This closure is retained * by the data source, so if you capture self in the closure and also claim ownership @@ -79,12 +79,23 @@ NS_ASSUME_NONNULL_BEGIN * @return An instance of FUITableViewDataSource. */ - (instancetype)initWithQuery:(FIRDatabaseQuery *)query - view:(UITableView *)tableView populateCell:(UITableViewCell *(^)(UITableView *tableView, NSIndexPath *indexPath, FIRDataSnapshot *object))populateCell; -- (instancetype)initWithCollection:(id)collection NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; + +/** + * Attaches the data source to a table view and begins sending updates immediately. + * @param view An instance of UITableView that the data source should push + * updates to. + */ +- (void)bindToView:(UITableView *)view; + +/** + * Detaches the data source from a view and stops sending any updates. + */ +- (void)unbind; @end diff --git a/FirebaseDatabaseUI/FUITableViewDataSource.m b/FirebaseDatabaseUI/FUITableViewDataSource.m index 257576a2750..8d832eb71bc 100644 --- a/FirebaseDatabaseUI/FUITableViewDataSource.m +++ b/FirebaseDatabaseUI/FUITableViewDataSource.m @@ -18,15 +18,18 @@ // clang-format on +#import "FUIArray.h" #import "FUITableViewDataSource.h" @import FirebaseDatabase; @interface FUITableViewDataSource () -@property(strong, nonatomic, readwrite) UITableViewCell *(^populateCell) +@property (strong, nonatomic, readwrite) UITableViewCell *(^populateCell) (UITableView *tableView, NSIndexPath *indexPath, FIRDataSnapshot *snap); +@property (strong, nonatomic, readonly) id collection; + @end @implementation FUITableViewDataSource @@ -34,25 +37,39 @@ @implementation FUITableViewDataSource #pragma mark - FUIDataSource initializer methods - (instancetype)initWithCollection:(id)collection - view:(UITableView *)tableView populateCell:(UITableViewCell *(^)(UITableView *, NSIndexPath *, FIRDataSnapshot *))populateCell { - self = [super initWithCollection:collection]; + self = [super init]; if (self != nil) { - self.tableView = tableView; - self.populateCell = populateCell; + _collection = collection; + _populateCell = populateCell; } return self; } - (instancetype)initWithQuery:(FIRDatabaseQuery *)query - view:(UITableView *)tableView populateCell:(UITableViewCell *(^)(UITableView *, NSIndexPath *, FIRDataSnapshot *))populateCell { FUIArray *array = [[FUIArray alloc] initWithQuery:query]; - return [self initWithCollection:array view:tableView populateCell:populateCell]; + return [self initWithCollection:array populateCell:populateCell]; +} + +- (NSUInteger)count { + return self.collection.count; +} + +- (void)bindToView:(UITableView *)view { + self.tableView = view; + view.dataSource = self; + [self.collection observeQuery]; +} + +- (void)unbind { + self.tableView.dataSource = nil; + self.tableView = nil; + [self.collection invalidate]; } #pragma mark - FUICollectionDelegate methods @@ -89,14 +106,14 @@ - (void)array:(FUIArray *)array didMoveObject:(id)object #pragma mark - UITableViewDataSource methods - (id)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - FIRDataSnapshot *snap = [self.items objectAtIndex:indexPath.row]; + FIRDataSnapshot *snap = [self.collection.items objectAtIndex:indexPath.row]; UITableViewCell *cell = self.populateCell(tableView, indexPath, snap); return cell; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return self.count; + return self.collection.count; } @end @@ -108,8 +125,8 @@ - (FUITableViewDataSource *)bindToQuery:(FIRDatabaseQuery *)query NSIndexPath *indexPath, FIRDataSnapshot *snap))populateCell { FUITableViewDataSource *dataSource = - [[FUITableViewDataSource alloc] initWithQuery:query view:self populateCell:populateCell]; - self.dataSource = dataSource; + [[FUITableViewDataSource alloc] initWithQuery:query populateCell:populateCell]; + [dataSource bindToView:self]; return dataSource; } diff --git a/FirebaseDatabaseUI/FirebaseDatabaseUI.h b/FirebaseDatabaseUI/FirebaseDatabaseUI.h index df47659ef54..fc6a8e19a90 100644 --- a/FirebaseDatabaseUI/FirebaseDatabaseUI.h +++ b/FirebaseDatabaseUI/FirebaseDatabaseUI.h @@ -29,5 +29,4 @@ FOUNDATION_EXPORT const unsigned char FirebaseDatabaseUIVersionString[]; #import #import #import -#import #import diff --git a/FirebaseDatabaseUITests/FUICollectionViewDataSourceTest.m b/FirebaseDatabaseUITests/FUICollectionViewDataSourceTest.m index c879bd0f535..7fd6ff4c4db 100644 --- a/FirebaseDatabaseUITests/FUICollectionViewDataSourceTest.m +++ b/FirebaseDatabaseUITests/FUICollectionViewDataSourceTest.m @@ -48,19 +48,18 @@ - (void)setUp { populateCell:^UICollectionViewCell *(UICollectionView *collectionView, NSIndexPath *indexPath, FIRDataSnapshot *object) { - UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kTestReuseIdentifier forIndexPath:indexPath]; + UICollectionViewCell *cell = + [collectionView dequeueReusableCellWithReuseIdentifier:kTestReuseIdentifier + forIndexPath:indexPath]; cell.accessibilityValue = object.key; return cell; }]; - - // Removing this NSLog causes the tests to crash since `numberOfItemsInSection` - // actually pulls updates from the data source or something - NSLog(@"count: %lu", [self.collectionView numberOfItemsInSection:0]); - + [self.observable populateWithCount:10]; } - (void)tearDown { + [self.dataSource unbind]; [self.observable removeAllObservers]; [UIView setAnimationsEnabled:YES]; [super tearDown]; diff --git a/FirebaseUI.xcodeproj/project.pbxproj b/FirebaseUI.xcodeproj/project.pbxproj index 03f41377fe5..f548aadc889 100644 --- a/FirebaseUI.xcodeproj/project.pbxproj +++ b/FirebaseUI.xcodeproj/project.pbxproj @@ -33,11 +33,9 @@ 8DA9413E1D678DEB00CD3685 /* FUIArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DA941391D678DEB00CD3685 /* FUIArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8DA9413F1D678DEB00CD3685 /* FUICollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DA9413A1D678DEB00CD3685 /* FUICollection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8DA941401D678DEB00CD3685 /* FUICollectionViewDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DA9413B1D678DEB00CD3685 /* FUICollectionViewDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8DA941411D678DEB00CD3685 /* FUIDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DA9413C1D678DEB00CD3685 /* FUIDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8DA941421D678DEB00CD3685 /* FUITableViewDataSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DA9413D1D678DEB00CD3685 /* FUITableViewDataSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8DA941471D678E3200CD3685 /* FUIArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA941431D678E3200CD3685 /* FUIArray.m */; }; 8DA941481D678E3200CD3685 /* FUICollectionViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA941441D678E3200CD3685 /* FUICollectionViewDataSource.m */; }; - 8DA941491D678E3200CD3685 /* FUIDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA941451D678E3200CD3685 /* FUIDataSource.m */; }; 8DA9414A1D678E3200CD3685 /* FUITableViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA941461D678E3200CD3685 /* FUITableViewDataSource.m */; }; 8DA941721D678F5400CD3685 /* FUIAuthPickerViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DA9414B1D678F5400CD3685 /* FUIAuthPickerViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8DA941731D678F5400CD3685 /* FUIAuthPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA9414C1D678F5400CD3685 /* FUIAuthPickerViewController.m */; }; @@ -106,7 +104,6 @@ 8DAF8BF71D89CC5300B251C7 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8DAF8BF51D89CC5300B251C7 /* GoogleService-Info.plist */; }; 8DBA0F7F1D872E4300D113D3 /* FUIArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA941431D678E3200CD3685 /* FUIArray.m */; }; 8DBA0F801D872E4700D113D3 /* FUICollectionViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA941441D678E3200CD3685 /* FUICollectionViewDataSource.m */; }; - 8DBA0F811D872E4B00D113D3 /* FUIDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA941451D678E3200CD3685 /* FUIDataSource.m */; }; 8DBA0F821D872E4E00D113D3 /* FUITableViewDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA941461D678E3200CD3685 /* FUITableViewDataSource.m */; }; 8DBA0F831D872E7A00D113D3 /* FUIAuthPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA9414C1D678F5400CD3685 /* FUIAuthPickerViewController.m */; }; 8DBA0F841D872E8C00D113D3 /* FUIAuth.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DA941511D678F5400CD3685 /* FUIAuth.m */; }; @@ -378,11 +375,9 @@ 8DA941391D678DEB00CD3685 /* FUIArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUIArray.h; sourceTree = ""; }; 8DA9413A1D678DEB00CD3685 /* FUICollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUICollection.h; sourceTree = ""; }; 8DA9413B1D678DEB00CD3685 /* FUICollectionViewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUICollectionViewDataSource.h; sourceTree = ""; }; - 8DA9413C1D678DEB00CD3685 /* FUIDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUIDataSource.h; sourceTree = ""; }; 8DA9413D1D678DEB00CD3685 /* FUITableViewDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUITableViewDataSource.h; sourceTree = ""; }; 8DA941431D678E3200CD3685 /* FUIArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUIArray.m; sourceTree = ""; }; 8DA941441D678E3200CD3685 /* FUICollectionViewDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUICollectionViewDataSource.m; sourceTree = ""; }; - 8DA941451D678E3200CD3685 /* FUIDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUIDataSource.m; sourceTree = ""; }; 8DA941461D678E3200CD3685 /* FUITableViewDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUITableViewDataSource.m; sourceTree = ""; }; 8DA9414B1D678F5400CD3685 /* FUIAuthPickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FUIAuthPickerViewController.h; sourceTree = ""; }; 8DA9414C1D678F5400CD3685 /* FUIAuthPickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FUIAuthPickerViewController.m; sourceTree = ""; }; @@ -858,8 +853,6 @@ 8D3A120D1DC2B122007558BA /* FUISortedArray.m */, 8DA9413B1D678DEB00CD3685 /* FUICollectionViewDataSource.h */, 8DA941441D678E3200CD3685 /* FUICollectionViewDataSource.m */, - 8DA9413C1D678DEB00CD3685 /* FUIDataSource.h */, - 8DA941451D678E3200CD3685 /* FUIDataSource.m */, 8DA9413D1D678DEB00CD3685 /* FUITableViewDataSource.h */, 8DA941461D678E3200CD3685 /* FUITableViewDataSource.m */, 8DCC4FA91D678CC400B0D3C4 /* Info.plist */, @@ -1113,7 +1106,6 @@ 8DA941401D678DEB00CD3685 /* FUICollectionViewDataSource.h in Headers */, 8DA941421D678DEB00CD3685 /* FUITableViewDataSource.h in Headers */, 8DA9413F1D678DEB00CD3685 /* FUICollection.h in Headers */, - 8DA941411D678DEB00CD3685 /* FUIDataSource.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1861,7 +1853,6 @@ 8DBA0F801D872E4700D113D3 /* FUICollectionViewDataSource.m in Sources */, 8DBA0F7F1D872E4300D113D3 /* FUIArray.m in Sources */, 8DC2FA5E1E44FA720036C03F /* FUISortedArray.m in Sources */, - 8DBA0F811D872E4B00D113D3 /* FUIDataSource.m in Sources */, 8DBA0F821D872E4E00D113D3 /* FUITableViewDataSource.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1915,7 +1906,6 @@ 8D3A120F1DC2B122007558BA /* FUISortedArray.m in Sources */, 8DA941481D678E3200CD3685 /* FUICollectionViewDataSource.m in Sources */, 8DA941471D678E3200CD3685 /* FUIArray.m in Sources */, - 8DA941491D678E3200CD3685 /* FUIDataSource.m in Sources */, 8DA9414A1D678E3200CD3685 /* FUITableViewDataSource.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseDatabaseUI.xcscheme b/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseDatabaseUI.xcscheme index 3fa39ac958c..d59d60168a5 100644 --- a/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseDatabaseUI.xcscheme +++ b/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseDatabaseUI.xcscheme @@ -26,7 +26,8 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + enableAddressSanitizer = "YES">