diff --git a/FirebaseAuthUI/AccountManagement/FUIAccountSettingsOperation.m b/FirebaseAuthUI/AccountManagement/FUIAccountSettingsOperation.m index dbbbf266bc6..b8c0b6f439a 100644 --- a/FirebaseAuthUI/AccountManagement/FUIAccountSettingsOperation.m +++ b/FirebaseAuthUI/AccountManagement/FUIAccountSettingsOperation.m @@ -205,9 +205,13 @@ - (void)reauthenticateWithPassword:(NSString *)password [self.delegate incrementActivity]; + if (self.delegate.auth.currentUser.email == nil) { + NSLog(@"FirebaseUI: Expected nonnull email during email/password reauthentication"); + return; + } [self.delegate.auth signInWithEmail:self.delegate.auth.currentUser.email password:password - completion:^(FIRUser *_Nullable user, NSError *_Nullable error) { + completion:^(FIRAuthDataResult *authResult, NSError *error) { [self.delegate decrementActivity]; [self finishOperationWithError:error]; diff --git a/FirebaseAuthUI/FUIAuth.m b/FirebaseAuthUI/FUIAuth.m index 4e3b9a82934..4b2ff4b640b 100644 --- a/FirebaseAuthUI/FUIAuth.m +++ b/FirebaseAuthUI/FUIAuth.m @@ -304,8 +304,9 @@ - (void)handleAccountLinkingForEmail:(NSString *)email return; } - [self.auth signInWithCredential:credential completion:^(FIRUser *_Nullable user, - NSError *_Nullable error) { + [self.auth signInAndRetrieveDataWithCredential:credential + completion:^(FIRAuthDataResult*_Nullable authResult, + NSError *_Nullable error) { if (error) { [self invokeResultCallbackWithAuthDataResult:nil error:error]; if (result) { @@ -314,6 +315,7 @@ - (void)handleAccountLinkingForEmail:(NSString *)email return; } + FIRUser *user = authResult.user; [user linkAndRetrieveDataWithCredential:newCredential completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error) { @@ -339,12 +341,15 @@ - (void)handleAccountLinkingForEmail:(NSString *)email - (void)invokeResultCallbackWithAuthDataResult:(nullable FIRAuthDataResult *)authDataResult error:(nullable NSError *)error { dispatch_async(dispatch_get_main_queue(), ^{ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" if ([self.delegate respondsToSelector:@selector(authUI:didSignInWithAuthDataResult:error:)]) { [self.delegate authUI:self didSignInWithAuthDataResult:authDataResult error:error]; } if ([self.delegate respondsToSelector:@selector(authUI:didSignInWithUser:error:)]) { [self.delegate authUI:self didSignInWithUser:authDataResult.user error:error]; } +#pragma clang diagnostic pop }); } diff --git a/FirebaseAuthUI/FUIAuthBaseViewController.m b/FirebaseAuthUI/FUIAuthBaseViewController.m index b1ab3dfac5c..d814606fd9f 100644 --- a/FirebaseAuthUI/FUIAuthBaseViewController.m +++ b/FirebaseAuthUI/FUIAuthBaseViewController.m @@ -313,9 +313,9 @@ - (void)incrementActivity { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(kActivityIndiactorAnimationDelay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - [_activityIndicator.superview bringSubviewToFront:_activityIndicator]; - if (_activityCount > 0) { - [_activityIndicator startAnimating]; + [self->_activityIndicator.superview bringSubviewToFront:_activityIndicator]; + if (self->_activityCount > 0) { + [self->_activityIndicator startAnimating]; } }); } diff --git a/FirebaseAuthUI/FUIAuthProvider.h b/FirebaseAuthUI/FUIAuthProvider.h index f992730b7b7..0a2de5c1a49 100644 --- a/FirebaseAuthUI/FUIAuthProvider.h +++ b/FirebaseAuthUI/FUIAuthProvider.h @@ -15,7 +15,7 @@ // #import -#import +#import @class FIRAuth; @class FIRAuthCredential; diff --git a/FirebaseAuthUI/FUIPasswordVerificationViewController.m b/FirebaseAuthUI/FUIPasswordVerificationViewController.m index da19cf087d7..b9d196f9754 100644 --- a/FirebaseAuthUI/FUIPasswordVerificationViewController.m +++ b/FirebaseAuthUI/FUIPasswordVerificationViewController.m @@ -152,7 +152,7 @@ - (void)verifyPassword:(NSString *)password { return; } - [authResult.user linkAndRetrieveDataWithCredential:_newCredential + [authResult.user linkAndRetrieveDataWithCredential:self->_newCredential completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error) { [self decrementActivity]; diff --git a/FirebaseAuthUITests/FUIAuthTest.m b/FirebaseAuthUITests/FUIAuthTest.m index 7c397fbc1b7..091f9915033 100644 --- a/FirebaseAuthUITests/FUIAuthTest.m +++ b/FirebaseAuthUITests/FUIAuthTest.m @@ -15,7 +15,6 @@ // @import XCTest; -@import FirebaseAnalytics; @import FirebaseAuth; @import FirebaseAuthUI; #import diff --git a/FirebaseDatabaseUI/FUIIndexArray.h b/FirebaseDatabaseUI/FUIIndexArray.h index 2a87571a2ac..858ee991873 100644 --- a/FirebaseDatabaseUI/FUIIndexArray.h +++ b/FirebaseDatabaseUI/FUIIndexArray.h @@ -170,9 +170,15 @@ didFailLoadWithError:(NSError *)error; */ - (nullable FIRDataSnapshot *)objectAtIndex:(NSUInteger)index; +/** + * Starts observing the index array's listeners. The indexed array will pass updates to its delegate + * until the `invalidate` method is called. + */ +- (void)observeQuery; + /** * Removes all observers from all queries managed by this array and renders this array - * unusable. + * unusable. Initialize a new array instead of reusing this array. */ - (void)invalidate; diff --git a/FirebaseDatabaseUI/FUIIndexArray.m b/FirebaseDatabaseUI/FUIIndexArray.m index b2a8212a52c..b0d0ad2d3f9 100644 --- a/FirebaseDatabaseUI/FUIIndexArray.m +++ b/FirebaseDatabaseUI/FUIIndexArray.m @@ -59,7 +59,6 @@ - (instancetype)initWithIndex:(id)index _data = data; _observers = [NSMutableArray array]; _delegate = delegate; - [self observeQueries]; } return self; } @@ -93,6 +92,10 @@ - (NSUInteger)count { return self.observers.count; } +- (void)observeQuery { + [self observeQueries]; +} + // FUIIndexArray instance becomes unusable after invalidation. - (void)invalidate { for (NSInteger i = 0; i < self.observers.count; i++) { diff --git a/FirebaseDatabaseUI/FUIIndexCollectionViewDataSource.h b/FirebaseDatabaseUI/FUIIndexCollectionViewDataSource.h index 08931b2cd86..8907ef204c2 100644 --- a/FirebaseDatabaseUI/FUIIndexCollectionViewDataSource.h +++ b/FirebaseDatabaseUI/FUIIndexCollectionViewDataSource.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN -@class FUIIndexCollectionViewDataSource; +@class FUIIndexCollectionViewDataSource, FUIIndexArray; @protocol FUIIndexCollectionViewDataSourceDelegate @optional @@ -70,6 +70,22 @@ didFailLoadAtIndex:(NSUInteger)index - (instancetype)init NS_UNAVAILABLE; +/** + * Initializes a collection view data source. + * @param indexArray The FUIIndexArray whose contents will be displayed in the collection view. + * @param collectionView The collection view that is populated by this data source. The + * data source pulls updates from Firebase database, so it must maintain a reference + * to the collection view in order to update its contents as the database pushes updates. + * The collection view is not retained by its data source. + * @param populateCell The closure invoked when populating a UICollectionViewCell (or subclass). + */ +- (instancetype)initWithIndexArray:(FUIIndexArray *)indexArray + delegate:(nullable id)delegate + populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView, + NSIndexPath *indexPath, + FIRDataSnapshot *_Nullable snap))populateCell + NS_DESIGNATED_INITIALIZER; + /** * Initializes a collection view data source. * @param indexQuery The Firebase query containing children of the data query. @@ -84,11 +100,10 @@ didFailLoadAtIndex:(NSUInteger)index */ - (instancetype)initWithIndex:(FIRDatabaseQuery *)indexQuery data:(FIRDatabaseReference *)dataQuery - collectionView:(UICollectionView *)collectionView delegate:(nullable id)delegate populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView, NSIndexPath *indexPath, - FIRDataSnapshot *_Nullable snap))populateCell NS_DESIGNATED_INITIALIZER; + FIRDataSnapshot *_Nullable snap))populateCell; /** * Returns the snapshot at the given index, if it has loaded. @@ -98,6 +113,18 @@ didFailLoadAtIndex:(NSUInteger)index */ - (nullable FIRDataSnapshot *)snapshotAtIndex:(NSInteger)index; +/** + * 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 @interface UICollectionView (FUIIndexCollectionViewDataSource) diff --git a/FirebaseDatabaseUI/FUIIndexCollectionViewDataSource.m b/FirebaseDatabaseUI/FUIIndexCollectionViewDataSource.m index a919f489cd9..91b3a4744a2 100644 --- a/FirebaseDatabaseUI/FUIIndexCollectionViewDataSource.m +++ b/FirebaseDatabaseUI/FUIIndexCollectionViewDataSource.m @@ -21,7 +21,7 @@ @interface FUIIndexCollectionViewDataSource () @property (nonatomic, readonly, nonnull) FUIIndexArray *array; -@property (nonatomic, readonly, weak) UICollectionView *collectionView; +@property (nonatomic, weak, nullable) UICollectionView *collectionView; @property (nonatomic, readonly, copy) UICollectionViewCell *(^populateCell) (UICollectionView *collectionView, NSIndexPath *indexPath, FIRDataSnapshot *object); @@ -32,17 +32,24 @@ @implementation FUIIndexCollectionViewDataSource - (instancetype)initWithIndex:(FIRDatabaseQuery *)indexQuery data:(FIRDatabaseReference *)dataQuery - collectionView:(UICollectionView *)collectionView + delegate:(id)delegate + populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView, + NSIndexPath *indexPath, + FIRDataSnapshot *snap))populateCell { + FUIIndexArray *array = [[FUIIndexArray alloc] initWithIndex:indexQuery + data:dataQuery + delegate:self]; + return [self initWithIndexArray:array delegate:delegate populateCell:populateCell]; +} + +- (instancetype)initWithIndexArray:(FUIIndexArray *)indexArray delegate:(id)delegate populateCell:(UICollectionViewCell *(^)(UICollectionView *collectionView, NSIndexPath *indexPath, FIRDataSnapshot *snap))populateCell { self = [super init]; if (self != nil) { - _array = [[FUIIndexArray alloc] initWithIndex:indexQuery - data:dataQuery - delegate:self]; - _collectionView = collectionView; + _array = indexArray; _collectionView.dataSource = self; _populateCell = populateCell; _delegate = delegate; @@ -58,6 +65,18 @@ - (FIRDataSnapshot *)snapshotAtIndex:(NSInteger)index { return [self.array objectAtIndex:index]; } +- (void)bindToView:(UICollectionView *)view { + self.collectionView = view; + view.dataSource = self; + [self.array observeQuery]; +} + +- (void)unbind { + [self.array invalidate]; + self.collectionView.dataSource = nil; + self.collectionView = nil; +} + #pragma mark - FUIIndexArrayDelegate - (void)array:(FUIIndexArray *)array @@ -115,7 +134,8 @@ - (void)array:(FUIIndexArray *)array #pragma mark - UICollectionViewDataSource -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { +- (NSInteger)collectionView:(UICollectionView *)collectionView + numberOfItemsInSection:(NSInteger)section { return self.array.count; } @@ -131,18 +151,17 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView @implementation UICollectionView (FUIIndexCollectionViewDataSource) - (FUIIndexCollectionViewDataSource *)bindToIndexedQuery:(FIRDatabaseQuery *)index - data:(FIRDatabaseReference *)data - delegate:(id)delegate - populateCell:(UICollectionViewCell *(^)(UICollectionView *, - NSIndexPath *, - FIRDataSnapshot *))populateCell { + data:(FIRDatabaseReference *)data + delegate:(id)delegate + populateCell:(UICollectionViewCell *(^)(UICollectionView *, + NSIndexPath *, + FIRDataSnapshot *))populateCell { FUIIndexCollectionViewDataSource *dataSource = [[FUIIndexCollectionViewDataSource alloc] initWithIndex:index - data:data - collectionView:self - delegate:delegate - populateCell:populateCell]; - self.dataSource = dataSource; + data:data + delegate:delegate + populateCell:populateCell]; + [dataSource bindToView:self]; return dataSource; } diff --git a/FirebaseDatabaseUI/FUIIndexTableViewDataSource.h b/FirebaseDatabaseUI/FUIIndexTableViewDataSource.h index 2284f8360c9..0c10ffad3b1 100644 --- a/FirebaseDatabaseUI/FUIIndexTableViewDataSource.h +++ b/FirebaseDatabaseUI/FUIIndexTableViewDataSource.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN -@class FUIIndexTableViewDataSource; +@class FUIIndexTableViewDataSource, FUIIndexArray; @protocol FUIIndexTableViewDataSourceDelegate @optional @@ -74,7 +74,7 @@ didFailLoadAtIndex:(NSUInteger)index * Initializes a table view data source. * @param indexQuery The Firebase query containing children of the data query. * @param dataQuery The reference whose children correspond to the contents of the - * index query. This reference's children's contents are served as teh contents + * index query. This reference's children's contents are served as the contents * of the table view that adopts this data source. * @param tableView The table view that is populated by this data source. The * data source pulls updates from Firebase database, so it must maintain a reference @@ -84,11 +84,26 @@ didFailLoadAtIndex:(NSUInteger)index */ - (instancetype)initWithIndex:(FIRDatabaseQuery *)indexQuery data:(FIRDatabaseReference *)dataQuery - tableView:(UITableView *)tableView delegate:(nullable id)delegate populateCell:(UITableViewCell *(^)(UITableView *tableView, NSIndexPath *indexPath, - FIRDataSnapshot *_Nullable snap))populateCell NS_DESIGNATED_INITIALIZER; + FIRDataSnapshot *_Nullable snap))populateCell; + +/** + * Initializes a table view data source. + * @param indexArray The FUIIndexArray whose contents will be displayed in the table view. + * @param tableView The table view that is populated by this data source. The + * data source pulls updates from Firebase database, so it must maintain a reference + * to the table view in order to update its contents as the database pushes updates. + * The table view is not retained by its data source. + * @param populateCell The closure invoked when populating a UITableViewCell (or subclass). + */ +- (instancetype)initWithIndexArray:(FUIIndexArray *)indexArray + delegate:(nullable id)delegate + populateCell:(UITableViewCell *(^)(UITableView *tableView, + NSIndexPath *indexPath, + FIRDataSnapshot *_Nullable snap))populateCell + NS_DESIGNATED_INITIALIZER; /** * Returns the snapshot at the given index, if it has loaded. @@ -98,6 +113,18 @@ didFailLoadAtIndex:(NSUInteger)index */ - (nullable FIRDataSnapshot *)snapshotAtIndex:(NSInteger)index; +/** + * 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 @interface UITableView (FUIIndexTableViewDataSource) diff --git a/FirebaseDatabaseUI/FUIIndexTableViewDataSource.m b/FirebaseDatabaseUI/FUIIndexTableViewDataSource.m index f87e5be6741..b579726d080 100644 --- a/FirebaseDatabaseUI/FUIIndexTableViewDataSource.m +++ b/FirebaseDatabaseUI/FUIIndexTableViewDataSource.m @@ -21,7 +21,7 @@ @interface FUIIndexTableViewDataSource () @property (nonatomic, readonly, nonnull) FUIIndexArray *array; -@property (nonatomic, readonly, weak) UITableView *tableView; +@property (nonatomic, weak, nullable) UITableView *tableView; @property (nonatomic, readonly, copy) UITableViewCell *(^populateCell) (UITableView *tableView, NSIndexPath *indexPath, FIRDataSnapshot *snap); @@ -38,26 +38,32 @@ - (instancetype)init { @throw e; } -- (instancetype)initWithIndex:(FIRDatabaseQuery *)indexQuery - data:(FIRDatabaseReference *)dataQuery - tableView:(UITableView *)tableView - delegate:(nullable id)delegate - populateCell:(UITableViewCell *(^)(UITableView *tableView, - NSIndexPath *indexPath, - FIRDataSnapshot *snap))populateCell { +- (instancetype)initWithIndexArray:(FUIIndexArray *)indexArray + delegate:(nullable id)delegate + populateCell:(UITableViewCell *(^)(UITableView *tableView, + NSIndexPath *indexPath, + FIRDataSnapshot *snap))populateCell { self = [super init]; if (self != nil) { - _array = [[FUIIndexArray alloc] initWithIndex:indexQuery - data:dataQuery - delegate:self]; - _tableView = tableView; - tableView.dataSource = self; + _array = indexArray; _populateCell = populateCell; _delegate = delegate; } return self; } +- (instancetype)initWithIndex:(FIRDatabaseQuery *)indexQuery + data:(FIRDatabaseReference *)dataQuery + delegate:(nullable id)delegate + populateCell:(UITableViewCell *(^)(UITableView *tableView, + NSIndexPath *indexPath, + FIRDataSnapshot *snap))populateCell { + FUIIndexArray *array = [[FUIIndexArray alloc] initWithIndex:indexQuery + data:dataQuery + delegate:self]; + return [self initWithIndexArray:array delegate:delegate populateCell:populateCell]; +} + - (NSArray *)indexes { return self.array.indexes; } @@ -66,6 +72,18 @@ - (FIRDataSnapshot *)snapshotAtIndex:(NSInteger)index { return [self.array objectAtIndex:index]; } +- (void)bindToView:(UITableView *)view { + self.tableView = view; + view.dataSource = self; + [self.array observeQuery]; +} + +- (void)unbind { + [self.array invalidate]; + self.tableView.dataSource = nil; + self.tableView = nil; +} + #pragma mark - FUIIndexArrayDelegate - (void)array:(FUIIndexArray *)array @@ -155,10 +173,9 @@ - (FUIIndexTableViewDataSource *)bindToIndexedQuery:(FIRDatabaseQuery *)index FUIIndexTableViewDataSource *dataSource = [[FUIIndexTableViewDataSource alloc] initWithIndex:index data:data - tableView:self delegate:delegate populateCell:populateCell]; - self.dataSource = dataSource; + [dataSource bindToView:self]; return dataSource; } diff --git a/FirebaseDatabaseUITests/FUIIndexArrayTest.m b/FirebaseDatabaseUITests/FUIIndexArrayTest.m index 28a2e233bda..da21135aa88 100644 --- a/FirebaseDatabaseUITests/FUIIndexArrayTest.m +++ b/FirebaseDatabaseUITests/FUIIndexArrayTest.m @@ -64,6 +64,7 @@ - (void)setUp { self.arrayDelegate = [[FUIIndexArrayTestDelegate alloc] init]; self.array.delegate = self.arrayDelegate; self.dict = [database() mutableCopy]; + [self.array observeQuery]; } - (void)tearDown { diff --git a/FirebaseFacebookAuthUI/FUIFacebookAuth.h b/FirebaseFacebookAuthUI/FUIFacebookAuth.h index 0c0e90d12d6..d3335221375 100644 --- a/FirebaseFacebookAuthUI/FUIFacebookAuth.h +++ b/FirebaseFacebookAuthUI/FUIFacebookAuth.h @@ -14,7 +14,7 @@ // limitations under the License. // -#import "FUIAuth.h" +#import "FirebaseAuthUI.h" @class FBSDKLoginManager; NS_ASSUME_NONNULL_BEGIN diff --git a/FirebaseFacebookAuthUI/FUIFacebookAuth.m b/FirebaseFacebookAuthUI/FUIFacebookAuth.m index 3d75d6b3ad8..59e8f8447e6 100644 --- a/FirebaseFacebookAuthUI/FUIFacebookAuth.m +++ b/FirebaseFacebookAuthUI/FUIFacebookAuth.m @@ -114,6 +114,8 @@ - (UIColor *)buttonTextColor { return [UIColor whiteColor]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)signInWithEmail:(nullable NSString *)email presentingViewController:(nullable UIViewController *)presentingViewController completion:(nullable FIRAuthProviderSignInCompletionBlock)completion { @@ -121,6 +123,7 @@ - (void)signInWithEmail:(nullable NSString *)email presentingViewController:presentingViewController completion:completion]; } +#pragma clang diagnostic pop - (void)signInWithDefaultValue:(nullable NSString *)defaultValue presentingViewController:(nullable UIViewController *)presentingViewController diff --git a/FirebaseGoogleAuthUI/FUIGoogleAuth.m b/FirebaseGoogleAuthUI/FUIGoogleAuth.m index eab9962e320..17258a2823a 100644 --- a/FirebaseGoogleAuthUI/FUIGoogleAuth.m +++ b/FirebaseGoogleAuthUI/FUIGoogleAuth.m @@ -103,6 +103,8 @@ - (UIColor *)buttonTextColor { return [UIColor colorWithWhite:0 alpha:0.54f]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)signInWithEmail:(nullable NSString *)email presentingViewController:(nullable UIViewController *)presentingViewController completion:(nullable FIRAuthProviderSignInCompletionBlock)completion { @@ -110,6 +112,7 @@ - (void)signInWithEmail:(nullable NSString *)email presentingViewController:presentingViewController completion:completion]; } +#pragma clang diagnostic pop - (void)signInWithDefaultValue:(nullable NSString *)defaultValue presentingViewController:(nullable UIViewController *)presentingViewController diff --git a/FirebasePhoneAuthUI/FUIPhoneAuth.m b/FirebasePhoneAuthUI/FUIPhoneAuth.m index 4b945fa3034..ad303bbdb69 100644 --- a/FirebasePhoneAuthUI/FUIPhoneAuth.m +++ b/FirebasePhoneAuthUI/FUIPhoneAuth.m @@ -91,6 +91,8 @@ - (void)signInWithPresentingViewController:(UIViewController *)presentingViewCon defaultValue:phoneNumber]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)signInWithEmail:(nullable NSString *)email presentingViewController:(nullable UIViewController *)presentingViewController completion:(nullable FIRAuthProviderSignInCompletionBlock)completion { @@ -98,6 +100,7 @@ - (void)signInWithEmail:(nullable NSString *)email presentingViewController:presentingViewController completion:completion]; } +#pragma clang diagnostic pop - (void)signInWithDefaultValue:(nullable NSString *)defaultValue presentingViewController:(nullable UIViewController *)presentingViewController @@ -141,7 +144,7 @@ - (void)callbackWithCredential:(nullable FIRAuthCredential *)credential FIRAuthResultCallback resultAuthCallback = ^(FIRUser *_Nullable user, NSError *_Nullable error) { if (!error) { - _pendingSignInCallback = nil; + self->_pendingSignInCallback = nil; } if (result) { result(user, error); diff --git a/FirebasePhoneAuthUI/FUIPhoneEntryViewController.m b/FirebasePhoneAuthUI/FUIPhoneEntryViewController.m index a07e71af271..03db4454695 100644 --- a/FirebasePhoneAuthUI/FUIPhoneEntryViewController.m +++ b/FirebasePhoneAuthUI/FUIPhoneEntryViewController.m @@ -181,7 +181,7 @@ - (void)onNext:(NSString *)phoneNumber { self.navigationItem.rightBarButtonItem.enabled = YES; if (error) { - [_phoneNumberField becomeFirstResponder]; + [self->_phoneNumberField becomeFirstResponder]; UIAlertController *alertController = [FUIPhoneAuth alertControllerForError:error actionHandler:nil]; diff --git a/FirebasePhoneAuthUI/FUIPhoneVerificationViewController.m b/FirebasePhoneAuthUI/FUIPhoneVerificationViewController.m index 2da2deb485d..b74ebf72aeb 100644 --- a/FirebasePhoneAuthUI/FUIPhoneVerificationViewController.m +++ b/FirebasePhoneAuthUI/FUIPhoneVerificationViewController.m @@ -134,14 +134,14 @@ - (IBAction)onResendCode:(id)sender { // TODO: Remove temporary workaround when the issue is fixed in FirebaseAuth. dispatch_block_t completionBlock = ^() { [self decrementActivity]; - _verificationID = verificationID; - [_codeField becomeFirstResponder]; + self->_verificationID = verificationID; + [self->_codeField becomeFirstResponder]; if (error) { UIAlertController *alertController = [FUIPhoneAuth alertControllerForError:error actionHandler:^{ - [_codeField clearCodeInput]; - [_codeField becomeFirstResponder]; + [self->_codeField clearCodeInput]; + [self->_codeField becomeFirstResponder]; }]; [self presentViewController:alertController animated:YES completion:nil]; return; @@ -149,7 +149,7 @@ - (IBAction)onResendCode:(id)sender { NSString *resultMessage = [NSString stringWithFormat:FUIPhoneAuthLocalizedString(kPAStr_ResendCodeResult), - _phoneNumber]; + self->_phoneNumber]; [self showAlertWithMessage:resultMessage]; }; if ([NSThread isMainThread]) { @@ -192,8 +192,8 @@ - (void)onNext:(NSString *)verificationCode { } else { UIAlertController *alertController = [FUIPhoneAuth alertControllerForError:error actionHandler:^{ - [_codeField clearCodeInput]; - [_codeField becomeFirstResponder]; + [self->_codeField clearCodeInput]; + [self->_codeField becomeFirstResponder]; }]; [self presentViewController:alertController animated:YES completion:nil]; } @@ -268,7 +268,7 @@ - (void)resendConfirmationCodeTimerFinished { - (void)updateResendLabel { NSInteger minutes = (NSInteger)_resendConfirmationCodeSeconds / 60; // Integer type for truncation NSInteger seconds = (NSInteger)round(_resendConfirmationCodeSeconds) % 60; - NSString *formattedTime = [NSString stringWithFormat:@"%ld:%02ld", minutes, seconds]; + NSString *formattedTime = [NSString stringWithFormat:@"%ld:%02ld", (long)minutes, (long)seconds]; _resendConfirmationCodeTimerLabel.text = [NSString stringWithFormat:FUIPhoneAuthLocalizedString(kPAStr_ResendCodeTimer), diff --git a/FirebaseTwitterAuthUI/FUITwitterAuth.m b/FirebaseTwitterAuthUI/FUITwitterAuth.m index c99ada73a24..a4ab893e177 100644 --- a/FirebaseTwitterAuthUI/FUITwitterAuth.m +++ b/FirebaseTwitterAuthUI/FUITwitterAuth.m @@ -85,6 +85,8 @@ - (UIColor *)buttonTextColor { return [UIColor whiteColor]; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-implementations" - (void)signInWithEmail:(nullable NSString *)email presentingViewController:(nullable UIViewController *)presentingViewController completion:(nullable FIRAuthProviderSignInCompletionBlock)completion { @@ -92,6 +94,7 @@ - (void)signInWithEmail:(nullable NSString *)email presentingViewController:presentingViewController completion:completion]; } +#pragma clang diagnostic pop - (void)signInWithDefaultValue:(nullable NSString *)defaultValue presentingViewController:(nullable UIViewController *)presentingViewController diff --git a/FirebaseUI.podspec b/FirebaseUI.podspec index 414a8668d18..77571ccc47b 100644 --- a/FirebaseUI.podspec +++ b/FirebaseUI.podspec @@ -1,10 +1,11 @@ Pod::Spec.new do |s| s.name = 'FirebaseUI' - s.version = '4.5.1' + s.version = '5.0.0' s.summary = 'UI binding libraries for Firebase.' s.homepage = 'https://github.com/firebase/FirebaseUI-iOS' s.license = { :type => 'Apache 2.0', :file => 'LICENSE' } - s.source = { :git => 'https://github.com/firebase/FirebaseUI-iOS.git', :tag => 'v4.5.1' } + # s.source = { :git => 'https://github.com/firebase/FirebaseUI-iOS.git', :tag => 'v5.0.0' } + s.source = { :git => 'sso://devrel/firebaseui-ios', :branch => 'firebase-5' } s.author = 'Firebase' s.platform = :ios s.ios.deployment_target = '9.0' @@ -13,13 +14,13 @@ Pod::Spec.new do |s| s.requires_arc = true s.public_header_files = 'FirebaseUI/FirebaseUI.h' s.source_files = 'FirebaseUI/FirebaseUI.h' - s.cocoapods_version = '>= 1.4.0.beta.2' + s.cocoapods_version = '>= 1.5.0' s.subspec 'Database' do |database| database.platform = :ios, '8.0' database.public_header_files = 'FirebaseDatabaseUI/*.h' database.source_files = 'FirebaseDatabaseUI/*.{h,m}' - database.dependency 'Firebase/Database', '~> 4.0' + database.dependency 'Firebase/Database', '~> 5.0' database.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/FirebaseUI/FirebaseDatabaseUI' } end @@ -35,7 +36,7 @@ Pod::Spec.new do |s| storage.platform = :ios, '8.0' storage.public_header_files = 'FirebaseStorageUI/*.h' storage.source_files = 'FirebaseStorageUI/*.{h,m}' - storage.dependency 'Firebase/Storage', '~> 4.0' + storage.dependency 'Firebase/Storage', '~> 5.0' storage.dependency 'SDWebImage', '~> 4.0' storage.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(PODS_ROOT)/FirebaseUI/FirebaseStorageUI' } end @@ -55,7 +56,7 @@ Pod::Spec.new do |s| 'FirebaseAuthUI/FUIPasswordSignUpViewController.h', 'FirebaseAuthUI/FUIPasswordVerificationViewController.h'] auth.source_files = ['FirebaseAuthUI/**/*.{h,m}', 'FirebaseAuthUI/*.{h,m}'] - auth.dependency 'Firebase/Auth', '~> 4.2' + auth.dependency 'Firebase/Auth', '~> 5.0' auth.resource_bundle = { 'FirebaseAuthUI' => ['FirebaseAuthUI/**/*.{xib,png,lproj}'] } diff --git a/FirebaseUI.xcodeproj/project.pbxproj b/FirebaseUI.xcodeproj/project.pbxproj index 732f4792a02..f6c747d771c 100644 --- a/FirebaseUI.xcodeproj/project.pbxproj +++ b/FirebaseUI.xcodeproj/project.pbxproj @@ -2668,7 +2668,7 @@ 8D2A849D1D678B2B0058DF04 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = FirebaseUI; TargetAttributes = { 8D2A84A51D678B2B0058DF04 = { @@ -4124,12 +4124,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = NO; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -4185,12 +4187,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = NO; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -4688,6 +4692,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = FirebaseAuthUI/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; @@ -4711,6 +4716,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = FirebaseAuthUI/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; diff --git a/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseAuthUI.xcscheme b/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseAuthUI.xcscheme index d3b8040c294..96f6d9a4c40 100644 --- a/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseAuthUI.xcscheme +++ b/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseAuthUI.xcscheme @@ -1,6 +1,6 @@ + codeCoverageEnabled = "YES" + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -127,7 +126,6 @@ buildConfiguration = "Release" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseUISample.xcscheme b/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseUISample.xcscheme index d6e6fdbf2f4..bcb383fd96f 100644 --- a/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseUISample.xcscheme +++ b/FirebaseUI.xcodeproj/xcshareddata/xcschemes/FirebaseUISample.xcscheme @@ -1,6 +1,6 @@ +#import +#import +#import +#import +#import +#import +#import diff --git a/Podfile b/Podfile index 4ebc924ff2d..5e9afb74029 100644 --- a/Podfile +++ b/Podfile @@ -35,53 +35,54 @@ target 'FirebaseAuthUI' do inherit! :search_paths pod 'OCMock' end -end -target 'FirebaseFacebookAuthUI' do - use_frameworks! - # Pods for Facebook Auth - pod 'FBSDKLoginKit', '~> 4.0' - pod 'FBSDKCoreKit', '~> 4.0' - - target 'FirebaseFacebookAuthUITests' do + target 'FirebaseFacebookAuthUI' do inherit! :search_paths - pod 'OCMock' + # Pods for Facebook Auth pod 'FBSDKLoginKit', '~> 4.0' pod 'FBSDKCoreKit', '~> 4.0' - end -end -target 'FirebaseGoogleAuthUI' do - use_frameworks! - # Pods for Google Auth - pod 'GoogleSignIn', '~> 4.0' + target 'FirebaseFacebookAuthUITests' do + inherit! :search_paths + pod 'OCMock' + pod 'FBSDKLoginKit', '~> 4.0' + pod 'FBSDKCoreKit', '~> 4.0' + end + end - target 'FirebaseGoogleAuthUITests' do + target 'FirebaseGoogleAuthUI' do inherit! :search_paths - pod 'OCMock' - end -end + # Pods for Google Auth + pod 'GoogleSignIn', '~> 4.0' -target 'FirebasePhoneAuthUI' do - use_frameworks! + target 'FirebaseGoogleAuthUITests' do + inherit! :search_paths + pod 'OCMock' + end + end - target 'FirebasePhoneAuthUITests' do + target 'FirebasePhoneAuthUI' do inherit! :search_paths - pod 'OCMock' - end -end -target 'FirebaseTwitterAuthUI' do - platform :ios, '9.0' - use_frameworks! - # Pods for Twitter Auth - pod 'TwitterKit', '~> 3.0' + target 'FirebasePhoneAuthUITests' do + inherit! :search_paths + pod 'OCMock' + end + end - target 'FirebaseTwitterAuthUITests' do + target 'FirebaseTwitterAuthUI' do platform :ios, '9.0' inherit! :search_paths - pod 'OCMock' + # Pods for Twitter Auth + pod 'TwitterKit', '~> 3.0' + + target 'FirebaseTwitterAuthUITests' do + platform :ios, '9.0' + inherit! :search_paths + pod 'OCMock' + end end + end target 'FirebaseFirestoreUI' do diff --git a/samples/swift/FirebaseUI-demo-swift.xcodeproj/project.pbxproj b/samples/swift/FirebaseUI-demo-swift.xcodeproj/project.pbxproj index 823c73952f3..0d2008df523 100644 --- a/samples/swift/FirebaseUI-demo-swift.xcodeproj/project.pbxproj +++ b/samples/swift/FirebaseUI-demo-swift.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 83ADA421B297A7B1F7CB0AE6 /* Pods_FirebaseUI_demo_swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C25BB7CA308C5C424718210 /* Pods_FirebaseUI_demo_swift.framework */; }; 8D5F93B01D9B192D00D5A2E4 /* StorageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D5F93AF1D9B192D00D5A2E4 /* StorageViewController.swift */; }; 8DABC9891D3D82D600453807 /* FUIAppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DABC9881D3D82D600453807 /* FUIAppDelegate.swift */; }; 8DABC9901D3D82D600453807 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8DABC98F1D3D82D600453807 /* Assets.xcassets */; }; @@ -35,6 +36,7 @@ C39BC0511DB812330060F6AF /* FUICustomPasswordVerificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C39BC04F1DB812330060F6AF /* FUICustomPasswordVerificationViewController.swift */; }; C39BC0521DB812330060F6AF /* FUICustomPasswordVerificationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C39BC0501DB812330060F6AF /* FUICustomPasswordVerificationViewController.xib */; }; C3F23ECD1D80F3300020509F /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C3F23ECC1D80F3300020509F /* GoogleService-Info.plist */; }; + D97EB4FE7BC9F61E2693C3D5 /* Pods_FirebaseUI_demo_swiftTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4AD650DC5456361A7935072D /* Pods_FirebaseUI_demo_swiftTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -48,6 +50,11 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 09327E451733542747A7D686 /* Pods-FirebaseUI-demo-swift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUI-demo-swift.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUI-demo-swift/Pods-FirebaseUI-demo-swift.debug.xcconfig"; sourceTree = ""; }; + 1F227DC9AE9CBA508BE1FCD8 /* Pods-FirebaseUI-demo-swiftTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUI-demo-swiftTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUI-demo-swiftTests/Pods-FirebaseUI-demo-swiftTests.release.xcconfig"; sourceTree = ""; }; + 4AD650DC5456361A7935072D /* Pods_FirebaseUI_demo_swiftTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseUI_demo_swiftTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 57C4F80F8385613585BFD0C4 /* Pods-FirebaseUI-demo-swiftTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUI-demo-swiftTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUI-demo-swiftTests/Pods-FirebaseUI-demo-swiftTests.debug.xcconfig"; sourceTree = ""; }; + 8C25BB7CA308C5C424718210 /* Pods_FirebaseUI_demo_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FirebaseUI_demo_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5F93AF1D9B192D00D5A2E4 /* StorageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageViewController.swift; sourceTree = ""; }; 8DABC9851D3D82D600453807 /* FirebaseUI-demo-swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "FirebaseUI-demo-swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 8DABC9881D3D82D600453807 /* FUIAppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUIAppDelegate.swift; sourceTree = ""; }; @@ -164,6 +171,7 @@ C39BC04F1DB812330060F6AF /* FUICustomPasswordVerificationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FUICustomPasswordVerificationViewController.swift; sourceTree = ""; }; C39BC0501DB812330060F6AF /* FUICustomPasswordVerificationViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FUICustomPasswordVerificationViewController.xib; sourceTree = ""; }; C3F23ECC1D80F3300020509F /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + D8162B06C2766B691DB3FF8E /* Pods-FirebaseUI-demo-swift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FirebaseUI-demo-swift.release.xcconfig"; path = "Pods/Target Support Files/Pods-FirebaseUI-demo-swift/Pods-FirebaseUI-demo-swift.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -171,6 +179,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 83ADA421B297A7B1F7CB0AE6 /* Pods_FirebaseUI_demo_swift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -178,6 +187,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D97EB4FE7BC9F61E2693C3D5 /* Pods_FirebaseUI_demo_swiftTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -199,6 +209,8 @@ 8DABC9871D3D82D600453807 /* FirebaseUI-demo-swift */, 8DABC99C1D3D82D600453807 /* FirebaseUI-demo-swiftTests */, 8DABC9861D3D82D600453807 /* Products */, + 8FBEB00D319B1157B501009F /* Pods */, + 8EDEFC86AB987C520AB2E5ED /* Frameworks */, ); sourceTree = ""; }; @@ -234,6 +246,26 @@ path = "FirebaseUI-demo-swiftTests"; sourceTree = ""; }; + 8EDEFC86AB987C520AB2E5ED /* Frameworks */ = { + isa = PBXGroup; + children = ( + 8C25BB7CA308C5C424718210 /* Pods_FirebaseUI_demo_swift.framework */, + 4AD650DC5456361A7935072D /* Pods_FirebaseUI_demo_swiftTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 8FBEB00D319B1157B501009F /* Pods */ = { + isa = PBXGroup; + children = ( + 09327E451733542747A7D686 /* Pods-FirebaseUI-demo-swift.debug.xcconfig */, + D8162B06C2766B691DB3FF8E /* Pods-FirebaseUI-demo-swift.release.xcconfig */, + 57C4F80F8385613585BFD0C4 /* Pods-FirebaseUI-demo-swiftTests.debug.xcconfig */, + 1F227DC9AE9CBA508BE1FCD8 /* Pods-FirebaseUI-demo-swiftTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; C302C1D31D91CC7B00ADBD41 /* Samples */ = { isa = PBXGroup; children = ( @@ -294,9 +326,12 @@ isa = PBXNativeTarget; buildConfigurationList = 8DABC9A21D3D82D600453807 /* Build configuration list for PBXNativeTarget "FirebaseUI-demo-swift" */; buildPhases = ( + 1243035B51C7AE06E002C61F /* [CP] Check Pods Manifest.lock */, 8DABC9811D3D82D600453807 /* Sources */, 8DABC9821D3D82D600453807 /* Frameworks */, 8DABC9831D3D82D600453807 /* Resources */, + FB186A05D75682C5A14947DE /* [CP] Embed Pods Frameworks */, + EBCCC9627AAF9F316135CB06 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -311,6 +346,7 @@ isa = PBXNativeTarget; buildConfigurationList = 8DABC9A51D3D82D600453807 /* Build configuration list for PBXNativeTarget "FirebaseUI-demo-swiftTests" */; buildPhases = ( + F2EEED680F289D0D35727B36 /* [CP] Check Pods Manifest.lock */, 8DABC9951D3D82D600453807 /* Sources */, 8DABC9961D3D82D600453807 /* Frameworks */, 8DABC9971D3D82D600453807 /* Resources */, @@ -484,6 +520,127 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 1243035B51C7AE06E002C61F /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-FirebaseUI-demo-swift-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + EBCCC9627AAF9F316135CB06 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUI-demo-swift/Pods-FirebaseUI-demo-swift-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseAuthUI.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseFacebookAuthUI.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseGoogleAuthUI.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebasePhoneAuthUI.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseUI/FirebaseTwitterAuthUI.bundle", + "${PODS_ROOT}/GoogleSignIn/Resources/GoogleSignIn.bundle", + "${PODS_ROOT}/TwitterKit/iOS/TwitterKit.framework/TwitterKitResources.bundle", + "${PODS_ROOT}/TwitterKit/iOS/TwitterKit.framework/TwitterShareExtensionUIResources.bundle", + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseAuthUI.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseFacebookAuthUI.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseGoogleAuthUI.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebasePhoneAuthUI.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseTwitterAuthUI.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TwitterKitResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TwitterShareExtensionUIResources.bundle", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUI-demo-swift/Pods-FirebaseUI-demo-swift-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + F2EEED680F289D0D35727B36 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-FirebaseUI-demo-swiftTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + FB186A05D75682C5A14947DE /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUI-demo-swift/Pods-FirebaseUI-demo-swift-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Bolts/Bolts.framework", + "${BUILT_PRODUCTS_DIR}/BoringSSL/openssl.framework", + "${BUILT_PRODUCTS_DIR}/FBSDKCoreKit/FBSDKCoreKit.framework", + "${BUILT_PRODUCTS_DIR}/FBSDKLoginKit/FBSDKLoginKit.framework", + "${BUILT_PRODUCTS_DIR}/GTMOAuth2/GTMOAuth2.framework", + "${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework", + "${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework", + "${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework", + "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", + "${PODS_ROOT}/TwitterCore/iOS/TwitterCore.framework", + "${PODS_ROOT}/TwitterKit/iOS/TwitterKit.framework", + "${BUILT_PRODUCTS_DIR}/gRPC/GRPCClient.framework", + "${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework", + "${BUILT_PRODUCTS_DIR}/gRPC-ProtoRPC/ProtoRPC.framework", + "${BUILT_PRODUCTS_DIR}/gRPC-RxLibrary/RxLibrary.framework", + "${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework", + "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Bolts.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKCoreKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBSDKLoginKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMOAuth2.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwitterCore.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwitterKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GRPCClient.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ProtoRPC.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxLibrary.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FirebaseUI-demo-swift/Pods-FirebaseUI-demo-swift-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 8DABC9811D3D82D600453807 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -717,6 +874,7 @@ }; 8DABC9A31D3D82D600453807 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 09327E451733542747A7D686 /* Pods-FirebaseUI-demo-swift.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BITCODE_GENERATION_MODE = ""; @@ -756,6 +914,7 @@ }; 8DABC9A41D3D82D600453807 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D8162B06C2766B691DB3FF8E /* Pods-FirebaseUI-demo-swift.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BITCODE_GENERATION_MODE = ""; @@ -794,6 +953,7 @@ }; 8DABC9A61D3D82D600453807 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 57C4F80F8385613585BFD0C4 /* Pods-FirebaseUI-demo-swiftTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = "FirebaseUI-demo-swiftTests/Info.plist"; @@ -807,6 +967,7 @@ }; 8DABC9A71D3D82D600453807 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 1F227DC9AE9CBA508BE1FCD8 /* Pods-FirebaseUI-demo-swiftTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = "FirebaseUI-demo-swiftTests/Info.plist"; diff --git a/samples/swift/Podfile b/samples/swift/Podfile index 515d55b5ba9..a1c5621f272 100644 --- a/samples/swift/Podfile +++ b/samples/swift/Podfile @@ -1,3 +1,6 @@ +source 'sso://cpdc-internal/spec' +source 'https://github.com/CocoaPods/Specs.git' + target 'FirebaseUI-demo-swift' do use_frameworks! @@ -8,4 +11,3 @@ target 'FirebaseUI-demo-swift' do end end -