3

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).

Joris Mans
  • 6,024
  • 6
  • 42
  • 69
  • did you ever find a solution here? currently dealing with the same thing. – max Jan 03 '23 at 16:32
  • Nope. Had to give up on it. TBH I absolutely hate all these cross-platform development environments. You just swap one set of problems for another and in the end it's not always cheaper. Especially for long term projects that require maintenance for 5+ years. – Joris Mans Jan 18 '23 at 15:27
  • We got it around by just checking if the device was a simulator, and if it was, passing a custom environment value to bypass app check – max Jan 19 '23 at 16:45

0 Answers0