Skip to content

Commit 47413cc

Browse files
committed
Merge branch 'master' into mph-googledatatransport
2 parents f6dfd8e + ef873ff commit 47413cc

File tree

530 files changed

+32716
-6774
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

530 files changed

+32716
-6774
lines changed

.gitignore

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
Example/Auth/Sample/Sample.entitlements
2-
Example/Auth/Sample/GoogleService-Info_multi.plist
1+
Example/Auth/Sample/Application.plist
32
Example/Auth/Sample/AuthCredentials.h
3+
Example/Auth/Sample/GoogleService-Info_multi.plist
44
Example/Auth/Sample/GoogleService-Info.plist
5-
Example/Auth/Sample/Application.plist
6-
Example/Auth/SwiftSample/GoogleService-Info.plist
7-
Example/Auth/SwiftSample/Info.plist
8-
Example/Auth/SwiftSample/AuthCredentials.swift
5+
Example/Auth/Sample/Sample.entitlements
96
Example/Auth/ApiTests/AuthCredentials.h
107

118
Example/Database/App/GoogleService-Info.plist
129

1310
Example/Storage/App/GoogleService-Info.plist
1411

12+
Secrets.tar
13+
1514
# OS X
1615
.DS_Store
1716

@@ -33,6 +32,13 @@ DerivedData
3332
*.hmap
3433
*.ipa
3534

35+
# Swift Package Manager
36+
*/.build
37+
ZipBuilder/Packages
38+
ZipBuilder/*.xcodeproj
39+
ZipBuilder/Package.resolved
40+
41+
3642
# IntelliJ
3743
.idea
3844

@@ -76,5 +82,5 @@ Ninja
7682
# Visual Studio
7783
/.vs
7884

79-
# cocoapods-generate
85+
# CocoaPods generate
8086
gen/

.travis.yml

Lines changed: 14 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,17 @@ jobs:
3737

3838
- stage: test
3939
env:
40-
- PROJECT=InAppMessagingDisplay PLATFORM=iOS METHOD=xcodebuild
40+
- PROJECT=Functions PLATFORM=iOS METHOD=pod-lib-lint
41+
before_install:
42+
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
43+
script:
44+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFunctions.podspec
45+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFunctions.podspec --use-libraries
46+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFunctions.podspec --use-modular-headers
47+
48+
- stage: test
49+
env:
50+
- PROJECT=InAppMessaging PLATFORM=iOS METHOD=xcodebuild
4151
before_install:
4252
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
4353
script:
@@ -65,9 +75,9 @@ jobs:
6575
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAuthInterop.podspec
6676
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseDatabase.podspec
6777
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseDynamicLinks.podspec
78+
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseInstanceID.podspec
6879
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseMessaging.podspec
6980
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseStorage.podspec
70-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFunctions.podspec
7181
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessaging.podspec
7282
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessagingDisplay.podspec
7383

@@ -95,10 +105,10 @@ jobs:
95105
- travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseAuthInterop.podspec --use-libraries
96106
- travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseDatabase.podspec --use-libraries
97107
- travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseDynamicLinks.podspec --use-libraries
108+
- travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseInstanceID.podspec --use-libraries
98109
# The Protobuf dependency of FirebaseMessaging has warnings with --use-libraries
99110
- travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseMessaging.podspec --use-libraries --allow-warnings
100111
- travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseStorage.podspec --use-libraries
101-
- travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseFunctions.podspec --use-libraries
102112
- travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessaging.podspec --use-libraries
103113
- travis_retry ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessagingDisplay.podspec --use-libraries
104114

@@ -133,44 +143,7 @@ jobs:
133143

134144
# Alternative platforms
135145

136-
# Xcode 9
137-
- stage: test
138-
osx_image: xcode9.4
139-
env:
140-
- PROJECT=Firebase PLATFORM=iOS METHOD=xcodebuild
141-
before_install:
142-
- npm install ios-sim -g
143-
- ios-sim start --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus, 11.3"
144-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
145-
script:
146-
- travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
147-
148-
- stage: test
149-
osx_image: xcode9.4
150-
env:
151-
- PROJECT=InAppMessagingDisplay PLATFORM=iOS METHOD=xcodebuild
152-
before_install:
153-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
154-
script:
155-
- travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM
156-
157-
- stage: test
158-
osx_image: xcode9.4
159-
env:
160-
- PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild
161-
before_install:
162-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
163-
script:
164-
- travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
165-
166-
- stage: test
167-
env:
168-
- PROJECT=Firestore PLATFORM=macOS METHOD=cmake
169-
before_install:
170-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
171-
script:
172-
- travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
173-
146+
# Test Firestore on Xcode 8 to use old llvm to ensure C++ portability.
174147
- stage: test
175148
osx_image: xcode8.3
176149
env:
@@ -180,38 +153,6 @@ jobs:
180153
script:
181154
- travis_retry ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
182155

183-
# Xcode 9 may find lint errors that don't show up in Xcode 10 (#2081)
184-
- stage: test
185-
osx_image: xcode9.4
186-
env:
187-
- PROJECT=Firebase PLATFORM=iOS METHOD=pod-lib-lint
188-
before_install:
189-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
190-
script:
191-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh GoogleUtilities.podspec
192-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseCore.podspec
193-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAnalyticsInterop.podspec
194-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAuth.podspec
195-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAuthInterop.podspec
196-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseDatabase.podspec
197-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseDynamicLinks.podspec
198-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseMessaging.podspec
199-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseStorage.podspec
200-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFunctions.podspec
201-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessaging.podspec
202-
- travis_retry ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseInAppMessagingDisplay.podspec
203-
204-
- stage: test
205-
osx_image: xcode9.4
206-
env:
207-
- PROJECT=Firestore PLATFORM=iOS METHOD=pod-lib-lint
208-
before_install:
209-
- ./scripts/if_changed.sh ./scripts/install_prereqs.sh
210-
script:
211-
# Eliminate the one warning from BoringSSL when CocoaPods 1.6.0 is available.
212-
# The travis_wait is necessary because the command takes more than 10 minutes.
213-
- travis_wait 45 ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseFirestore.podspec --allow-warnings --no-subspecs
214-
215156
# Community-supported platforms
216157

217158
- stage: test
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* Copyright 2019 Google
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#import <XCTest/XCTest.h>
18+
19+
#import "FIRAuthApiTestsBase.h"
20+
21+
/** The testing email address for testCreateAccountWithEmailAndPassword. */
22+
static NSString *const kOldUserEmail = @"[email protected]";
23+
24+
/** The testing email address for testUpdatingUsersEmail. */
25+
static NSString *const kNewUserEmail = @"[email protected]";
26+
27+
@interface AccountInfoTests : FIRAuthApiTestsBase
28+
29+
@end
30+
31+
@implementation AccountInfoTests
32+
33+
- (void)testUpdatingUsersEmail {
34+
SKIP_IF_ON_MOBILE_HARNESS
35+
FIRAuth *auth = [FIRAuth auth];
36+
if (!auth) {
37+
XCTFail(@"Could not obtain auth object.");
38+
}
39+
40+
__block NSError *apiError;
41+
XCTestExpectation *expectation =
42+
[self expectationWithDescription:@"Created account with email and password."];
43+
[auth createUserWithEmail:kOldUserEmail
44+
password:@"password"
45+
completion:^(FIRAuthDataResult *user, NSError *error) {
46+
apiError = error;
47+
[expectation fulfill];
48+
}];
49+
[self waitForExpectationsWithTimeout:kExpectationsTimeout handler:nil];
50+
expectation = [self expectationWithDescription:@"Created account with email and password."];
51+
XCTAssertEqualObjects(auth.currentUser.email, kOldUserEmail);
52+
XCTAssertNil(apiError);
53+
54+
[auth.currentUser updateEmail:kNewUserEmail
55+
completion:^(NSError *_Nullable error) {
56+
apiError = error;
57+
[expectation fulfill];
58+
}];
59+
[self waitForExpectationsWithTimeout:kExpectationsTimeout handler:nil];
60+
XCTAssertNil(apiError);
61+
XCTAssertEqualObjects(auth.currentUser.email, kNewUserEmail);
62+
63+
// Clean up the created Firebase user for future runs.
64+
[self deleteCurrentUser];
65+
}
66+
67+
@end
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright 2019 Google
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#import <XCTest/XCTest.h>
18+
19+
#import "FIRAuthApiTestsBase.h"
20+
21+
@interface AnonymousAuthTests : FIRAuthApiTestsBase
22+
23+
@end
24+
25+
@implementation AnonymousAuthTests
26+
27+
- (void)testSignInAnonymously {
28+
[self signInAnonymously];
29+
XCTAssertTrue([FIRAuth auth].currentUser.anonymous);
30+
31+
[self deleteCurrentUser];
32+
}
33+
34+
@end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2019 Google
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#import "FIRAuthApiTestsBase.h"

0 commit comments

Comments
 (0)