Skip to content

Commit 69058b6

Browse files
committed
Update GIDAuthStateMigration to not perform migration when built for Mac Catalyst (#526)
1 parent 6ef11d8 commit 69058b6

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

GoogleSignIn/Sources/GIDAuthStateMigration/Implementation/GIDAuthStateMigration.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,24 @@ - (void)migrateIfNeededWithTokenURL:(NSURL *)tokenURL
7171
// performed.
7272
if (isFreshInstall) {
7373
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
74-
#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
74+
#if TARGET_OS_OSX
7575
[defaults setBool:YES forKey:kDataProtectedMigrationCheckPerformedKey];
76-
#elif TARGET_OS_IOS
76+
#elif TARGET_OS_IOS && !TARGET_OS_MACCATALYST
7777
[defaults setBool:YES forKey:kGTMAppAuthMigrationCheckPerformedKey];
78-
#endif // TARGET_OS_OSX || TARGET_OS_MACCATALYST
78+
#endif // TARGET_OS_OSX
7979
return;
8080
}
8181

82-
#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
82+
#if TARGET_OS_OSX
8383
[self performDataProtectedMigrationIfNeeded];
84-
#elif TARGET_OS_IOS
84+
#elif TARGET_OS_IOS && !TARGET_OS_MACCATALYST
8585
[self performGIDMigrationIfNeededWithTokenURL:tokenURL
8686
callbackPath:callbackPath
8787
keychainName:keychainName];
88-
#endif // TARGET_OS_OSX || TARGET_OS_MACCATALYST
88+
#endif // TARGET_OS_OSX
8989
}
9090

91-
#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
91+
#if TARGET_OS_OSX
9292
// Migrate from the fileBasedKeychain to dataProtectedKeychain with GTMAppAuth 5.0.
9393
- (void)performDataProtectedMigrationIfNeeded {
9494
// See if we've performed the migration check previously.
@@ -114,7 +114,7 @@ - (void)performDataProtectedMigrationIfNeeded {
114114
[defaults setBool:YES forKey:kDataProtectedMigrationCheckPerformedKey];
115115
}
116116

117-
#elif TARGET_OS_IOS
117+
#elif TARGET_OS_IOS && !TARGET_OS_MACCATALYST
118118
// Migrate from GPPSignIn 1.x or GIDSignIn 1.0 - 4.x to the GTMAppAuth storage introduced in
119119
// GIDSignIn 5.0.
120120
- (void)performGIDMigrationIfNeededWithTokenURL:(NSURL *)tokenURL
@@ -238,7 +238,7 @@ + (nullable NSString *)passwordForService:(NSString *)service {
238238
NSString *password = [[NSString alloc] initWithData:passwordData encoding:NSUTF8StringEncoding];
239239
return password;
240240
}
241-
#endif // TARGET_OS_OSX || TARGET_OS_MACCATALYST
241+
#endif // TARGET_OS_OSX
242242

243243
@end
244244

0 commit comments

Comments
 (0)