Skip to content

Commit 27b18ac

Browse files
authored
Do not modally animate the presenting of app check loading UI (#340)
1 parent cc7491f commit 27b18ac

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

GoogleSignIn/Sources/GIDAppCheck/UI/GIDActivityIndicatorViewController.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ @implementation GIDActivityIndicatorViewController
2424

2525
- (void)viewDidLoad {
2626
[super viewDidLoad];
27+
// Medium gray with transparency
28+
self.view.backgroundColor = [UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:0.25];
2729

2830
UIActivityIndicatorViewStyle style;
2931
if (@available(iOS 13.0, *)) {
@@ -32,6 +34,7 @@ - (void)viewDidLoad {
3234
style = UIActivityIndicatorViewStyleGray;
3335
}
3436
_activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:style];
37+
_activityIndicator.color = UIColor.whiteColor;
3538
self.activityIndicator.translatesAutoresizingMaskIntoConstraints = NO;
3639
[self.activityIndicator startAnimating];
3740
[self.view addSubview:self.activityIndicator];

GoogleSignIn/Sources/GIDTimedLoader/GIDTimedLoader.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ - (void)presentLoadingViewController {
6868
self.loadingTimeStamp = CACurrentMediaTime();
6969
dispatch_async(dispatch_get_main_queue(), ^{
7070
// Since this loading VC may be reused, the activity indicator may have been stopped; restart it
71+
self.loadingViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext;
72+
self.loadingViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
73+
self.presentingViewController.definesPresentationContext = YES;
7174
[self.loadingViewController.activityIndicator startAnimating];
7275
[self.presentingViewController presentViewController:self.loadingViewController
7376
animated:YES

Samples/Swift/AppAttestExample/AppAttestExampleForPod.xcodeproj/project.pbxproj

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
7345556F2AB142B40068F2B0 /* AppCheckDefaultSecrets.json in Resources */ = {isa = PBXBuildFile; fileRef = 7345556D2AB142B40068F2B0 /* AppCheckDefaultSecrets.json */; };
11-
734555702AB142B40068F2B0 /* AppCheckSecrets.json in Resources */ = {isa = PBXBuildFile; fileRef = 7345556E2AB142B40068F2B0 /* AppCheckSecrets.json */; };
10+
734555A02AB39FBF0068F2B0 /* AppCheckDefaultSecrets.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 7345559F2AB39FBF0068F2B0 /* AppCheckDefaultSecrets.xcconfig */; };
1211
738B4A322AA8FE800056885D /* AppCheckSecretReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738B4A312AA8FE800056885D /* AppCheckSecretReader.swift */; };
1312
738D5F732A26BC3B00A7F11B /* BirthdayLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738D5F722A26BC3B00A7F11B /* BirthdayLoader.swift */; };
1413
73A464042A1C3B3400BA8528 /* AppAttestExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73A464032A1C3B3400BA8528 /* AppAttestExampleApp.swift */; };
@@ -22,8 +21,7 @@
2221
4728D878D216B7D622E237DA /* Pods_AppAttestExampleForPod.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AppAttestExampleForPod.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2322
73080B2A2AAF9BDE00DEF667 /* AppAttestExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppAttestExampleTests.swift; sourceTree = "<group>"; };
2423
73443A232A55F56900A4932E /* AppAttestExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AppAttestExample.entitlements; sourceTree = "<group>"; };
25-
7345556D2AB142B40068F2B0 /* AppCheckDefaultSecrets.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = AppCheckDefaultSecrets.json; sourceTree = "<group>"; };
26-
7345556E2AB142B40068F2B0 /* AppCheckSecrets.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = AppCheckSecrets.json; sourceTree = "<group>"; };
24+
7345559F2AB39FBF0068F2B0 /* AppCheckDefaultSecrets.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = AppCheckDefaultSecrets.xcconfig; sourceTree = "<group>"; };
2725
738B4A312AA8FE800056885D /* AppCheckSecretReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCheckSecretReader.swift; sourceTree = "<group>"; };
2826
738D5F722A26BC3B00A7F11B /* BirthdayLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BirthdayLoader.swift; sourceTree = "<group>"; };
2927
73A065612A786D10007BC7FC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -71,8 +69,7 @@
7169
7345556C2AB142B40068F2B0 /* Secrets */ = {
7270
isa = PBXGroup;
7371
children = (
74-
7345556D2AB142B40068F2B0 /* AppCheckDefaultSecrets.json */,
75-
7345556E2AB142B40068F2B0 /* AppCheckSecrets.json */,
72+
7345559F2AB39FBF0068F2B0 /* AppCheckDefaultSecrets.xcconfig */,
7673
);
7774
path = Secrets;
7875
sourceTree = "<group>";
@@ -188,9 +185,8 @@
188185
isa = PBXResourcesBuildPhase;
189186
buildActionMask = 2147483647;
190187
files = (
191-
7345556F2AB142B40068F2B0 /* AppCheckDefaultSecrets.json in Resources */,
192188
73A4640B2A1C3B3500BA8528 /* Preview Assets.xcassets in Resources */,
193-
734555702AB142B40068F2B0 /* AppCheckSecrets.json in Resources */,
189+
734555A02AB39FBF0068F2B0 /* AppCheckDefaultSecrets.xcconfig in Resources */,
194190
);
195191
runOnlyForDeploymentPostprocessing = 0;
196192
};
@@ -255,6 +251,7 @@
255251
/* Begin XCBuildConfiguration section */
256252
73A4640C2A1C3B3500BA8528 /* Debug */ = {
257253
isa = XCBuildConfiguration;
254+
baseConfigurationReference = 7345559F2AB39FBF0068F2B0 /* AppCheckDefaultSecrets.xcconfig */;
258255
buildSettings = {
259256
ALWAYS_SEARCH_USER_PATHS = NO;
260257
CLANG_ANALYZER_NONNULL = YES;

0 commit comments

Comments
 (0)