Skip to content

Commit f0a0292

Browse files
authored
fix(app-check, expo): init app-check shared instance before firebase in plugin (#8559)
This fixes the initialization order of the sharedInstance in the AppDelegate for iOS. Leading to simulators not properly able to setup the debug AppChcek provider.
1 parent 1324b4e commit f0a0292

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/app-check/plugin/src/ios/appDelegate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@ import RNFBAppCheck`,
101101
return contents.replace(
102102
firebaseLine,
103103
`${firebaseLine}
104-
FirebaseApp.configure()
105104
RNFBAppCheckModule.sharedInstance()
105+
FirebaseApp.configure()
106106
`,
107107
);
108108
}
109109

110110
// If Firebase initialization block not found, add both Firebase and App Check initialization
111111
// This is to make sure Firebase is initialized before App Check
112-
const methodInvocationBlock = `FirebaseApp.configure()
113-
RNFBAppCheckModule.sharedInstance()`;
112+
const methodInvocationBlock = `RNFBAppCheckModule.sharedInstance()
113+
FirebaseApp.configure()`;
114114

115115
const methodInvocationLineMatcher = /(?:factory\.startReactNative\()/;
116116

0 commit comments

Comments
 (0)