Преглед изворни кода

[iOS] Fix loading initial URL when app is closed

We must not pass nil as the URL, that will translate to null and we won't be
able to load the initial URL which is passed as the launch parameters.
j8
Saúl Ibarra Corretgé пре 8 година
родитељ
комит
aaf5dd75fa
1 измењених фајлова са 10 додато и 5 уклоњено
  1. 10
    5
      ios/sdk/src/JitsiMeetView.m

+ 10
- 5
ios/sdk/src/JitsiMeetView.m Прегледај датотеку

208
  * @param urlObject - The URL to load which may identify a conference to join.
208
  * @param urlObject - The URL to load which may identify a conference to join.
209
  */
209
  */
210
 - (void)loadURLObject:(NSDictionary *)urlObject {
210
 - (void)loadURLObject:(NSDictionary *)urlObject {
211
-    NSDictionary *props = @{
212
-        @"externalAPIScope": externalAPIScope,
213
-        @"url": urlObject ?: [NSNull null],
214
-        @"welcomePageEnabled": @(self.welcomePageEnabled)
215
-    };
211
+    NSMutableDictionary *props = [[NSMutableDictionary alloc] init];
212
+
213
+    [props setObject:externalAPIScope forKey:@"externalAPIScope"];
214
+    [props setObject:@(self.welcomePageEnabled) forKey:@"welcomePageEnabled"];
215
+
216
+    // XXX url must not be set when nil, so it appears as undefined in JS and we
217
+    // check the launch parameters.
218
+    if (urlObject) {
219
+        [props setObject:urlObject forKey:@"url"];
220
+    }
216
 
221
 
217
     if (rootView == nil) {
222
     if (rootView == nil) {
218
         rootView
223
         rootView

Loading…
Откажи
Сачувај