[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.
This commit is contained in:
Saúl Ibarra Corretgé 2017-07-28 14:28:58 +02:00 committed by Любомир Маринов
parent f1c9e57b43
commit aaf5dd75fa
1 changed files with 10 additions and 5 deletions

View File

@ -208,11 +208,16 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;
* @param urlObject - The URL to load which may identify a conference to join.
*/
- (void)loadURLObject:(NSDictionary *)urlObject {
NSDictionary *props = @{
@"externalAPIScope": externalAPIScope,
@"url": urlObject ?: [NSNull null],
@"welcomePageEnabled": @(self.welcomePageEnabled)
};
NSMutableDictionary *props = [[NSMutableDictionary alloc] init];
[props setObject:externalAPIScope forKey:@"externalAPIScope"];
[props setObject:@(self.welcomePageEnabled) forKey:@"welcomePageEnabled"];
// XXX url must not be set when nil, so it appears as undefined in JS and we
// check the launch parameters.
if (urlObject) {
[props setObject:urlObject forKey:@"url"];
}
if (rootView == nil) {
rootView