Skip to content

Commit c4bb807

Browse files
committed
fix(app-check, ios): Xcode 14.3 compat bugfix
The new version of Xcode enforces firebase-ios-sdk API `UNAVAILABLE` directives (as it should!) and the initial implementation here was incorrectly relying on unavailable things Fixes #7014
1 parent f89dec5 commit c4bb807

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/app-check/ios/RNFBAppCheck/RNFBAppCheckProvider.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ - (void)configure:(FIRApp *)app
4242
// exists:
4343
if (debugToken != nil) {
4444
// We have a debug token, so just need to stuff it in the environment and it will hook up
45-
char *key = "FIRAAppCheckDebugToken", *value = (char*)[debugToken UTF8String];
45+
char *key = "FIRAAppCheckDebugToken", *value = (char *)[debugToken UTF8String];
4646
int overwrite = 1;
4747
setenv(key, value, overwrite);
4848
}
4949

50-
self.delegateProvider = [[FIRAppCheckDebugProvider new] initWithApp:app];
50+
self.delegateProvider = [[FIRAppCheckDebugProvider alloc] initWithApp:app];
5151
}
5252

5353
if ([providerName isEqualToString:@"deviceCheck"]) {
54-
self.delegateProvider = [[FIRDeviceCheckProvider new] initWithApp:app];
54+
self.delegateProvider = [[FIRDeviceCheckProvider alloc] initWithApp:app];
5555
}
5656

5757
if ([providerName isEqualToString:@"appAttest"]) {
@@ -61,7 +61,7 @@ - (void)configure:(FIRApp *)app
6161
// This is not a valid configuration.
6262
DLog(@"AppAttest unavailable: it requires iOS14+, macCatalyst14+ or tvOS15+. Installing "
6363
@"debug provider to guarantee invalid tokens in this invalid configuration.");
64-
self.delegateProvider = [[FIRAppCheckDebugProvider new] initWithApp:app];
64+
self.delegateProvider = [[FIRAppCheckDebugProvider alloc] initWithApp:app];
6565
}
6666
}
6767

0 commit comments

Comments
 (0)