Skip to content

Commit 97ddefd

Browse files
authored
docs(app-check): add iOS integration docs for react-native 0.79+ AppDelegate.swift
1 parent e4966ef commit 97ddefd

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

docs/app-check/usage/index.md

+26-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,32 @@ For instructions on how to generate required keys and register an app for the de
8989
9090
You must call initialize the AppCheck module prior to calling any firebase back-end services for App Check to function.
9191

92-
#### Configure AppCheck with iOS credentials (react-native 0.77+)
92+
#### Configure AppCheck with iOS credentials (react-native 0.79+)
93+
94+
To do that, edit your `ios/ProjectName/AppDelegate.swift` and add the following two lines:
95+
96+
At the top of the file, import the FirebaseCore SDK right after `import UIKit`:
97+
And within your existing `didFinishLaunchingWithOptions` method, add the following to the top of the method:
98+
99+
```diff
100+
import UIKit
101+
+ import RNFBAppCheck // <-- This is the import for AppCheck to work
102+
+ import FirebaseCore // <-- From App/Core integration, no other Firebase items needed
103+
import React
104+
import React_RCTAppDelegate
105+
import ReactAppDependencyProvider
106+
107+
...
108+
109+
func application(
110+
_ application: UIApplication,
111+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
112+
) -> Bool {
113+
+ RNFBAppCheckModule.sharedInstance() // <-- new for AppCheck to work
114+
+ FirebaseApp.configure() // <-- From App/Core integration
115+
```
116+
117+
#### Configure AppCheck with iOS credentials (react-native >= 0.77 && < 0.79)
93118

94119
To do that, edit your `ios/ProjectName/AppDelegate.swift` and add the following two lines:
95120

0 commit comments

Comments
 (0)