瀏覽代碼

[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,11 +208,16 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;
208 208
  * @param urlObject - The URL to load which may identify a conference to join.
209 209
  */
210 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 222
     if (rootView == nil) {
218 223
         rootView

Loading…
取消
儲存