From the docs:
I have to add this to the AppDelegate.m
file:
FIRAppCheckDebugProviderFactory *providerFactory =
[[FIRAppCheckDebugProviderFactory alloc] init];
[FIRAppCheck setAppCheckProviderFactory:providerFactory];
// Use Firebase library to configure APIs
[FIRApp configure];
Managed to do this and to start my react native app.
However:
Launch the app. A local debug token will be logged when the SDK tries to send a request to the backend. For example:
I have no way of accessing the logs produced by the simulator. In the Terminal window I can only see logs generated by React Native, and when opening the System Log in the iOS simulator this is all I get:
Jul 30 12:11:56 **** syslogd[55934]: --- syslogd restarted ---
Jul 30 12:11:56 **** syslogd[55934]: Configuration Notice:
ASL Module "com.apple.contacts.ContactsAutocomplete" claims selected messages.
Those messages may not appear in standard system log files or in the ASL database.
I can't run the project from inside Xcode as I get build errors on some of the postbuild steps. I run it using yarn ios
which maps to react-native run-ios
in package.json
How do I access the printed debug token in order to get App Check working when running my app in a simulator? How do I get the logs the iOS simulator is generating as we normally see in Xcode when running a native app?
Note: I have a lot of experience with native iOS development and with JS development, but this is my first time working on a React Native app (external codebase I am supposed to do some maintenance on).