Skip to content

Commit fe13959

Browse files
committed
release FirestoreUI
Change-Id: I52b7d3a4395fb3e588d622b4b6bb937d451133d7
1 parent 95a09f6 commit fe13959

19 files changed

+109
-121
lines changed

FirebaseFirestoreUI/FUIBatchedArray.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// limitations under the License.
1515
//
1616

17-
@import Firestore;
17+
@import FirebaseFirestore;
1818

1919
#import "FUISnapshotArrayDiff.h"
2020

FirebaseFirestoreUI/FUICollectionViewDataSource.h renamed to FirebaseFirestoreUI/FUIFirestoreCollectionViewDataSource.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
NS_ASSUME_NONNULL_BEGIN
2626

2727
/**
28-
* FUICollectionViewDataSource provides a class that conforms to the
28+
* FUIFirestoreCollectionViewDataSource provides a class that conforms to the
2929
* UICollectionViewDataSource protocol which allows UICollectionViews to
30-
* adopt FUICollectionViewDataSource in order to provide a UICollectionView
30+
* adopt FUIFirestoreCollectionViewDataSource in order to provide a UICollectionView
3131
* synchronized to a Firestore reference or query.
3232
*/
33-
@interface FUICollectionViewDataSource : NSObject <UICollectionViewDataSource>
33+
@interface FUIFirestoreCollectionViewDataSource : NSObject <UICollectionViewDataSource>
3434

3535
/**
3636
* The UICollectionView instance that operations (inserts, removals, moves,
@@ -71,15 +71,15 @@ NS_ASSUME_NONNULL_BEGIN
7171
- (FIRDocumentSnapshot *)snapshotAtIndex:(NSInteger)index;
7272

7373
/**
74-
* Initialize an instance of FUICollectionViewDataSource that populates
74+
* Initialize an instance of FUIFirestoreCollectionViewDataSource that populates
7575
* UICollectionViewCells with FIRDataSnapshots.
7676
* @param collection A FUICollection that the data source uses to pull snapshots
7777
* from Cloud Firestore.
7878
* @param populateCell A closure used by the data source to create the cells that
7979
* are displayed in the collection view. This closure is retained by the data
8080
* source, so if you capture self in the closure and also claim ownership of the
8181
* data source, be sure to avoid retain cycles by capturing a weak reference to self.
82-
* @return An instance of FUICollectionViewDataSource that populates
82+
* @return An instance of FUIFirestoreCollectionViewDataSource that populates
8383
* UICollectionViewCells with FIRDataSnapshots.
8484
*/
8585
- (instancetype)initWithCollection:(FUIBatchedArray *)collection
@@ -88,14 +88,14 @@ NS_ASSUME_NONNULL_BEGIN
8888
FIRDocumentSnapshot *object))populateCell NS_DESIGNATED_INITIALIZER;
8989

9090
/**
91-
* Initialize an unsorted instance of FUICollectionViewDataSource that populates
91+
* Initialize an unsorted instance of FUIFirestoreCollectionViewDataSource that populates
9292
* UICollectionViewCells with FIRDataSnapshots.
9393
* @param query A Firestore query to bind the data source to.
9494
* @param populateCell A closure used by the data source to create the cells that
9595
* are displayed in the collection view. This closure is retained by the data
9696
* source, so if you capture self in the closure and also claim ownership of the
9797
* data source, be sure to avoid retain cycles by capturing a weak reference to self.
98-
* @return An instance of FUICollectionViewDataSource that populates
98+
* @return An instance of FUIFirestoreCollectionViewDataSource that populates
9999
* UICollectionViewCells with FIRDataSnapshots.
100100
*/
101101
- (instancetype)initWithQuery:(FIRQuery *)query
@@ -119,7 +119,7 @@ NS_ASSUME_NONNULL_BEGIN
119119

120120
@end
121121

122-
@interface UICollectionView (FUICollectionViewDataSource)
122+
@interface UICollectionView (FUIFirestoreCollectionViewDataSource)
123123

124124
/**
125125
* Creates a data source, attaches it to the collection view, and returns it.
@@ -132,10 +132,11 @@ NS_ASSUME_NONNULL_BEGIN
132132
* @return The created data source. This value must be retained while the collection
133133
* view is in use.
134134
*/
135-
- (FUICollectionViewDataSource *)bindToQuery:(FIRQuery *)query
136-
populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView,
137-
NSIndexPath *indexPath,
138-
FIRDocumentSnapshot *object))populateCell __attribute__((warn_unused_result));
135+
- (FUIFirestoreCollectionViewDataSource *)bindToQuery:(FIRQuery *)query
136+
populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView,
137+
NSIndexPath *indexPath,
138+
FIRDocumentSnapshot *object))populateCell
139+
__attribute__((warn_unused_result));
139140

140141
@end
141142

FirebaseFirestoreUI/FUICollectionViewDataSource.m renamed to FirebaseFirestoreUI/FUIFirestoreCollectionViewDataSource.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
// clang-format on
2020

21-
#import "FUICollectionViewDataSource.h"
21+
#import "FUIFirestoreCollectionViewDataSource.h"
2222

23-
@interface FUICollectionViewDataSource () <FUIBatchedArrayDelegate>
23+
@interface FUIFirestoreCollectionViewDataSource () <FUIBatchedArrayDelegate>
2424

2525
@property (nonatomic, readonly, nonnull) FUIBatchedArray *collection;
2626

@@ -33,7 +33,7 @@ @interface FUICollectionViewDataSource () <FUIBatchedArrayDelegate>
3333

3434
@end
3535

36-
@implementation FUICollectionViewDataSource
36+
@implementation FUIFirestoreCollectionViewDataSource
3737

3838
#pragma mark - FUIDataSource initializer methods
3939

@@ -168,14 +168,14 @@ - (NSInteger)collectionView:(nonnull UICollectionView *)collectionView
168168

169169
@end
170170

171-
@implementation UICollectionView (FUICollectionViewDataSource)
171+
@implementation UICollectionView (FUIFirestoreCollectionViewDataSource)
172172

173-
- (FUICollectionViewDataSource *)bindToQuery:(FIRQuery *)query
174-
populateCell:(UICollectionViewCell *(^)(UICollectionView *,
175-
NSIndexPath *,
176-
FIRDocumentSnapshot *))populateCell {
177-
FUICollectionViewDataSource *dataSource =
178-
[[FUICollectionViewDataSource alloc] initWithQuery:query populateCell:populateCell];
173+
- (FUIFirestoreCollectionViewDataSource *)bindToQuery:(FIRQuery *)query
174+
populateCell:(UICollectionViewCell *(^)(UICollectionView *,
175+
NSIndexPath *,
176+
FIRDocumentSnapshot *))populateCell {
177+
FUIFirestoreCollectionViewDataSource *dataSource =
178+
[[FUIFirestoreCollectionViewDataSource alloc] initWithQuery:query populateCell:populateCell];
179179
[dataSource bindToView:self];
180180
return dataSource;
181181
}

FirebaseFirestoreUI/FUITableViewDataSource.h renamed to FirebaseFirestoreUI/FUIFirestoreTableViewDataSource.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
NS_ASSUME_NONNULL_BEGIN
2626

2727
/**
28-
* FUITableViewDataSource provides a class that conforms to the
28+
* FUIFirestoreTableViewDataSource provides a class that conforms to the
2929
* UITableViewDataSource protocol which allows UITableViews to implement
30-
* FUITableViewDataSource in order to provide a UITableView synchronized
30+
* FUIFirestoreTableViewDataSource in order to provide a UITableView synchronized
3131
* to a Firestore reference or query.
3232
*/
33-
@interface FUITableViewDataSource : NSObject <UITableViewDataSource>
33+
@interface FUIFirestoreTableViewDataSource : NSObject <UITableViewDataSource>
3434

3535
/**
3636
* The UITableView instance that operations (inserts, removals, moves, etc.) are
@@ -76,14 +76,14 @@ NS_ASSUME_NONNULL_BEGIN
7676
- (FIRDocumentSnapshot *)snapshotAtIndex:(NSInteger)index;
7777

7878
/**
79-
* Initialize an instance of FUITableViewDataSource.
79+
* Initialize an instance of FUIFirestoreTableViewDataSource.
8080
* @param collection An FUICollection used by the data source to pull data
8181
* from Cloud Firestore.
8282
* @param populateCell A closure used by the data source to create/reuse
8383
* table view cells and populate their content. This closure is retained
8484
* by the data source, so if you capture self in the closure and also claim ownership
8585
* of the data source, be sure to avoid retain cycles by capturing a weak reference to self.
86-
* @return An instance of FUITableViewDataSource.
86+
* @return An instance of FUIFirestoreTableViewDataSource.
8787
*/
8888
- (instancetype)initWithCollection:(FUIBatchedArray *)collection
8989
populateCell:(UITableViewCell *(^)(UITableView *tableView,
@@ -92,14 +92,14 @@ NS_ASSUME_NONNULL_BEGIN
9292

9393

9494
/**
95-
* Initialize an instance of FUITableViewDataSource with contents ordered
95+
* Initialize an instance of FUIFirestoreTableViewDataSource with contents ordered
9696
* by the query.
9797
* @param query A Firestore query to bind the data source to.
9898
* @param populateCell A closure used by the data source to create/reuse
9999
* table view cells and populate their content. This closure is retained
100100
* by the data source, so if you capture self in the closure and also claim ownership
101101
* of the data source, be sure to avoid retain cycles by capturing a weak reference to self.
102-
* @return An instance of FUITableViewDataSource.
102+
* @return An instance of FUIFirestoreTableViewDataSource.
103103
*/
104104
- (instancetype)initWithQuery:(FIRQuery *)query
105105
populateCell:(UITableViewCell *(^)(UITableView *tableView,
@@ -122,7 +122,7 @@ NS_ASSUME_NONNULL_BEGIN
122122

123123
@end
124124

125-
@interface UITableView (FUITableViewDataSource)
125+
@interface UITableView (FUIFirestoreTableViewDataSource)
126126

127127
/**
128128
* Creates a data source, attaches it to the table view, and returns it.
@@ -135,10 +135,11 @@ NS_ASSUME_NONNULL_BEGIN
135135
* @return The created data source. This value must be retained while the table
136136
* view is in use.
137137
*/
138-
- (FUITableViewDataSource *)bindToQuery:(FIRQuery *)query
139-
populateCell:(UITableViewCell *(^)(UITableView *tableView,
140-
NSIndexPath *indexPath,
141-
FIRDocumentSnapshot *object))populateCell __attribute__((warn_unused_result));
138+
- (FUIFirestoreTableViewDataSource *)bindToQuery:(FIRQuery *)query
139+
populateCell:(UITableViewCell *(^)(UITableView *tableView,
140+
NSIndexPath *indexPath,
141+
FIRDocumentSnapshot *object))populateCell
142+
__attribute__((warn_unused_result));
142143

143144
@end
144145

FirebaseFirestoreUI/FUITableViewDataSource.m renamed to FirebaseFirestoreUI/FUIFirestoreTableViewDataSource.m

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
// clang-format on
2020

21-
#import "FUITableViewDataSource.h"
21+
#import "FUIFirestoreTableViewDataSource.h"
2222

23-
@import Firestore;
23+
@import FirebaseFirestore;
2424

25-
@interface FUITableViewDataSource () <FUIBatchedArrayDelegate>
25+
@interface FUIFirestoreTableViewDataSource () <FUIBatchedArrayDelegate>
2626

2727
@property (strong, nonatomic, readwrite) UITableViewCell *(^populateCell)
2828
(UITableView *tableView, NSIndexPath *indexPath, FIRDocumentSnapshot *snap);
@@ -31,7 +31,7 @@ @interface FUITableViewDataSource () <FUIBatchedArrayDelegate>
3131

3232
@end
3333

34-
@implementation FUITableViewDataSource
34+
@implementation FUIFirestoreTableViewDataSource
3535

3636
#pragma mark - FUIDataSource initializer methods
3737

@@ -156,14 +156,14 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
156156

157157
@end
158158

159-
@implementation UITableView (FUITableViewDataSource)
159+
@implementation UITableView (FUIFirestoreTableViewDataSource)
160160

161-
- (FUITableViewDataSource *)bindToQuery:(FIRQuery *)query
162-
populateCell:(UITableViewCell *(^)(UITableView *tableView,
163-
NSIndexPath *indexPath,
164-
FIRDocumentSnapshot *snap))populateCell {
165-
FUITableViewDataSource *dataSource =
166-
[[FUITableViewDataSource alloc] initWithQuery:query populateCell:populateCell];
161+
- (FUIFirestoreTableViewDataSource *)bindToQuery:(FIRQuery *)query
162+
populateCell:(UITableViewCell *(^)(UITableView *tableView,
163+
NSIndexPath *indexPath,
164+
FIRDocumentSnapshot *snap))populateCell {
165+
FUIFirestoreTableViewDataSource *dataSource =
166+
[[FUIFirestoreTableViewDataSource alloc] initWithQuery:query populateCell:populateCell];
167167
[dataSource bindToView:self];
168168
return dataSource;
169169
}

FirebaseFirestoreUI/FUISnapshotArrayDiff.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#import <FirebaseFirestoreUI/FUISnapshotArrayDiff.h>
1818

19-
@import Firestore;
19+
@import FirebaseFirestore;
2020

2121
@interface FUIArraySlice ()
2222

FirebaseFirestoreUI/FirebaseFirestoreUI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ FOUNDATION_EXPORT const unsigned char FirebaseFirestoreUIVersionString[];
2424

2525
#import <FirebaseFirestoreUI/FUISnapshotArrayDiff.h>
2626
#import <FirebaseFirestoreUI/FUIBatchedArray.h>
27-
#import <FirebaseFirestoreUI/FUICollectionViewDataSource.h>
27+
#import <FirebaseFirestoreUI/FUIFirestoreCollectionViewDataSource.h>

FirebaseFirestoreUITests/FUIDocumentChange.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// limitations under the License.
1515
//
1616

17-
@import Firestore;
17+
@import FirebaseFirestore;
1818

1919
@interface FUIDocumentChange : NSObject
2020

FirebaseUI.podspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Pod::Spec.new do |s|
22
s.name = 'FirebaseUI'
3-
s.version = '4.3.0'
3+
s.version = '4.4.0'
44
s.summary = 'UI binding libraries for Firebase.'
55
s.homepage = 'https://github.com/firebase/FirebaseUI-iOS'
66
s.license = { :type => 'Apache 2.0', :file => 'FirebaseUIFrameworks/LICENSE' }
7-
s.source = { :http => 'https://github.com/firebase/FirebaseUI-iOS/releases/download/v4.3.0/FirebaseUIFrameworks.zip' }
7+
s.source = { :http => 'https://github.com/firebase/FirebaseUI-iOS/releases/download/v4.4.0/FirebaseUIFrameworks.zip' }
88
s.author = 'Firebase'
99
s.platform = :ios
1010
s.ios.deployment_target = '9.0'
@@ -22,6 +22,7 @@ Pod::Spec.new do |s|
2222
all.dependency 'FirebaseUI/Google'
2323
all.dependency 'FirebaseUI/Phone'
2424
all.dependency 'FirebaseUI/Twitter'
25+
all.dependency 'FirebaseUI/Firestore'
2526
end
2627

2728
s.subspec 'Database' do |database|
@@ -31,6 +32,7 @@ Pod::Spec.new do |s|
3132
end
3233

3334
s.subspec 'Firestore' do |firestore|
35+
firestore.platform = :ios, '8.0'
3436
firestore.vendored_frameworks = ["FirebaseUIFrameworks/FirebaseFirestoreUI/Frameworks/FirebaseFirestoreUI.framework"]
3537
firestore.dependency 'Firebase/Firestore'
3638
end

0 commit comments

Comments
 (0)