|
@@ -35,7 +35,8 @@ RCTFatalHandler _RCTFatal = ^(NSError *error) {
|
35
|
35
|
@try {
|
36
|
36
|
NSString *name
|
37
|
37
|
= [NSString stringWithFormat:@"%@: %@",
|
38
|
|
- RCTFatalExceptionName, error.localizedDescription];
|
|
38
|
+ RCTFatalExceptionName,
|
|
39
|
+ error.localizedDescription];
|
39
|
40
|
NSString *message
|
40
|
41
|
= RCTFormatError(error.localizedDescription, jsStackTrace, 75);
|
41
|
42
|
[NSException raise:name format:@"%@", message];
|
|
@@ -110,12 +111,27 @@ void registerFatalErrorHandler() {
|
110
|
111
|
|
111
|
112
|
static RCTBridgeWrapper *bridgeWrapper;
|
112
|
113
|
|
|
114
|
+/**
|
|
115
|
+ * Copy of the {@code launchOptions} dictionary that the application was started
|
|
116
|
+ * with. It is required for the initial URL to be used if a (Universal) link was
|
|
117
|
+ * used to launch a new instance of the application.
|
|
118
|
+ */
|
|
119
|
+static NSDictionary *_launchOptions;
|
|
120
|
+
|
113
|
121
|
/**
|
114
|
122
|
* The {@code JitsiMeetView}s associated with their {@code ExternalAPI} scopes
|
115
|
123
|
* (i.e. unique identifiers within the process).
|
116
|
124
|
*/
|
117
|
125
|
static NSMapTable<NSString *, JitsiMeetView *> *views;
|
118
|
126
|
|
|
127
|
++ (BOOL)application:(UIApplication *)application
|
|
128
|
+ didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
|
129
|
+ // Store launch options, will be used when we create the bridge.
|
|
130
|
+ _launchOptions = [launchOptions copy];
|
|
131
|
+
|
|
132
|
+ return YES;
|
|
133
|
+}
|
|
134
|
+
|
119
|
135
|
#pragma mark Linking delegate helpers
|
120
|
136
|
// https://facebook.github.io/react-native/docs/linking.html
|
121
|
137
|
|
|
@@ -201,7 +217,7 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;
|
201
|
217
|
/**
|
202
|
218
|
* Internal initialization:
|
203
|
219
|
*
|
204
|
|
- * - sets the backgroudn color
|
|
220
|
+ * - sets the background color
|
205
|
221
|
* - creates the React bridge
|
206
|
222
|
* - loads the necessary custom fonts
|
207
|
223
|
* - registers a custom fatal error error handler for React
|
|
@@ -211,7 +227,8 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;
|
211
|
227
|
|
212
|
228
|
dispatch_once(&dispatchOncePredicate, ^{
|
213
|
229
|
// Initialize the static state of JitsiMeetView.
|
214
|
|
- bridgeWrapper = [[RCTBridgeWrapper alloc] init];
|
|
230
|
+ bridgeWrapper
|
|
231
|
+ = [[RCTBridgeWrapper alloc] initWithLaunchOptions:_launchOptions];
|
215
|
232
|
views = [NSMapTable strongToWeakObjectsMapTable];
|
216
|
233
|
|
217
|
234
|
// Dynamically load custom bundled fonts.
|