[iOS] Unify openURL methods and mark the old one deprecated (#3489)

Make sure both methods offer the same behavior and mark the old one as
deprecated so SDK users get a warning.
This commit is contained in:
Saúl Ibarra Corretgé 2018-09-28 21:54:09 +02:00 committed by Любомир Маринов
parent 9a1e9fff98
commit c54db8337d
3 changed files with 14 additions and 13 deletions

View File

@ -154,6 +154,8 @@ or
}
```
NOTE: The latter is deprecated.
### JitsiMeetViewDelegate
This delegate is optional, and can be set on the `JitsiMeetView` instance using

View File

@ -46,7 +46,7 @@
+ (BOOL)application:(UIApplication * _Nonnull)application
openURL:(NSURL * _Nonnull)URL
sourceApplication:(NSString * _Nullable)sourceApplication
annotation:(id _Nullable)annotation;
annotation:(id _Nullable)annotation __deprecated;
- (void)loadURL:(NSURL * _Nullable)url;

View File

@ -198,15 +198,10 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;
+ (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
return
[Dropbox application:app openURL:url options:options]
|| [RCTLinkingManager application:app openURL:url options:options];
}
if ([Dropbox application:app openURL:url options:options]) {
return YES;
}
+ (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
// XXX At least twice we received bug reports about malfunctioning loadURL
// in the Jitsi Meet SDK while the Jitsi Meet app seemed to functioning as
// expected in our testing. But that was to be expected because the app does
@ -216,10 +211,14 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;
return YES;
}
return [RCTLinkingManager application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
return [RCTLinkingManager application:app openURL:url options:options];
}
+ (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
return [self application:application openURL:url options:@{}];
}
#pragma mark Initializers