Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(deeplinking): After braking it with the dropbox implementation.
hristoterezov467452d11059
diff --git a/ios/README.md b/ios/README.mdindex 3d7e295b8d..fbad16faa0 100644--- a/ios/README.md+++ b/ios/README.md@@ -125,7 +125,23 @@ continueUserActivity:(NSUserActivity *)userActivitycontinueUserActivity:userActivityrestorationHandler:restorationHandler];}+```++And also one of the following:+```objc+// See https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623073-application?language=objc+- (BOOL)application:(UIApplication *)app+ openURL:(NSURL *)url+ options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {+ return [JitsiMeetView application:app+ openURL:url+ options: options];+}+```+or+```objc+// See https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623112-application?language=objc- (BOOL)application:(UIApplication *)applicationopenURL:(NSURL *)urlsourceApplication:(NSString *)sourceApplication@@ -215,31 +231,33 @@ user to request entering Picture-in-Picture.## Dropbox integration-To setup the dropbox integration you need to do the following steps:+To setup the Dropbox integration, follow these steps:-1. Add the following lines in your Info.plist file and replace `<APP_KEY>` with your dropbox app key:+1. Add the following to the app's Info.plist and change `<APP_KEY>` to your+Dropbox app key:```<key>CFBundleURLTypes</key><array>- <dict>- <key>CFBundleURLSchemes</key>- <array>- <string>db-<APP_KEY></string>- </array>- <key>CFBundleURLName</key>- <string></string>- </dict>+ <dict>+ <key>CFBundleURLName</key>+ <string></string>+ <key>CFBundleURLSchemes</key>+ <array>+ <string>db-<APP_KEY></string>+ </array>+ </dict></array><key>LSApplicationQueriesSchemes</key><array>- <string>dbapi-8-emm</string>- <string>dbapi-2</string>+ <string>dbapi-2</string>+ <string>dbapi-8-emm</string></array>```-2. Add the following method to `AppDelegate`:+2. Add the following to the app's `AppDelegate`:```objc-- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url+- (BOOL)application:(UIApplication *)app+ openURL:(NSURL *)urloptions:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {return [JitsiMeetView application:appopenURL:urldiff --git a/ios/app/src/AppDelegate.m b/ios/app/src/AppDelegate.mindex 82a0101595..791e0c86ca 100644--- a/ios/app/src/AppDelegate.m+++ b/ios/app/src/AppDelegate.m@@ -36,22 +36,13 @@restorationHandler:restorationHandler];}-- (BOOL)application:(UIApplication *)application- openURL:(NSURL *)url- sourceApplication:(NSString *)sourceApplication- annotation:(id)annotation {- return [JitsiMeetView application:application- openURL:url- sourceApplication:sourceApplication- annotation:annotation];-}--- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url+- (BOOL)application:(UIApplication *)app+ openURL:(NSURL *)urloptions:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {- return [JitsiMeetView application:app- openURL:url- options: options];+ return [JitsiMeetView application:app+ openURL:url+ options:options];}@enddiff --git a/ios/sdk/src/JitsiMeetView.m b/ios/sdk/src/JitsiMeetView.mindex 817dd4eb72..5e81e0e966 100644--- a/ios/sdk/src/JitsiMeetView.m+++ b/ios/sdk/src/JitsiMeetView.m@@ -195,6 +195,14 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;restorationHandler:restorationHandler];}++ (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];+}++ (BOOL)application:(UIApplication *)applicationopenURL:(NSURL *)urlsourceApplication:(NSString *)sourceApplication@@ -214,13 +222,6 @@ static NSMapTable<NSString *, JitsiMeetView *> *views;annotation:annotation];}-+ (BOOL)application:(UIApplication *)app openURL:(NSURL *)url- options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {- return [Dropbox application:app- openURL:url- options: options];-}-#pragma mark Initializers- (instancetype)init {diff --git a/ios/sdk/src/dropbox/Dropbox.m b/ios/sdk/src/dropbox/Dropbox.mindex b173cb7477..dd0dc5c2ce 100644--- a/ios/sdk/src/dropbox/Dropbox.m+++ b/ios/sdk/src/dropbox/Dropbox.m@@ -16,6 +16,7 @@#import <React/RCTBridgeModule.h>#import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>+#import "Dropbox.h"RCTPromiseResolveBlock currentResolve = nil;@@ -24,19 +25,19 @@ RCTPromiseRejectBlock currentReject = nil;@implementation Dropbox+ (NSString *)getAppKey{- NSArray *urlTypes = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleURLTypes"];- for(NSDictionary<NSString *, NSArray *> *urlType in urlTypes) {+ NSArray *urlTypes+ = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleURLTypes"];++ for (NSDictionary<NSString *, NSArray *> *urlType in urlTypes) {NSArray *urlSchemes = urlType[@"CFBundleURLSchemes"];- if(urlSchemes != nil) {- for(NSString *urlScheme in urlSchemes) {- if(urlScheme != nil) {- if ([urlScheme hasPrefix:@"db-"]) {- return [urlScheme substringFromIndex:3];- }++ if (urlSchemes) {+ for (NSString *urlScheme in urlSchemes) {+ if (urlScheme && [urlScheme hasPrefix:@"db-"]) {+ return [urlScheme substringFromIndex:3];}}}-}return nil;@@ -52,7 +53,7 @@ RCT_EXPORT_MODULE();};};-RCT_EXPORT_METHOD(authorize: (RCTPromiseResolveBlock)resolve+RCT_EXPORT_METHOD(authorize:(RCTPromiseResolveBlock)resolvereject:(__unused RCTPromiseRejectBlock)reject) {currentResolve = resolve;currentReject = reject;@@ -75,7 +76,7 @@ RCT_EXPORT_METHOD(getDisplayName: (NSString *)tokenresolve(result.name.displayName);} else {NSString *msg = @"Failed!";- if (networkError != nil) {+ if (networkError) {msg = [NSString stringWithFormat:@"Failed! Error: %@", networkError];}reject(@"getDisplayName", @"Failed", nil);@@ -93,7 +94,7 @@ RCT_EXPORT_METHOD(getSpaceUsage: (NSString *)tokenDBUSERSSpaceAllocation *allocation = result.allocation;NSNumber *allocated = 0;NSNumber *used = 0;- if([allocation isIndividual]) {+ if ([allocation isIndividual]) {allocated = allocation.individual.allocated;used = result.used;} else if ([allocation isTeam]) {@@ -108,7 +109,7 @@ RCT_EXPORT_METHOD(getSpaceUsage: (NSString *)tokenresolve(dictionary);} else {NSString *msg = @"Failed!";- if (networkError != nil) {+ if (networkError) {msg = [NSString stringWithFormat:@"Failed! Error: %@", networkError];}reject(@"getSpaceUsage", msg, nil);@@ -117,15 +118,18 @@ RCT_EXPORT_METHOD(getSpaceUsage: (NSString *)token}-+ (BOOL)application:(UIApplication *)app openURL:(NSURL *)url++ (BOOL)application:(UIApplication *)app+ openURL:(NSURL *)urloptions:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {+ if (currentReject == nil || currentResolve == nil) {+ return NO;+ }DBOAuthResult *authResult = [DBClientsManager handleRedirectURL:url];- if (authResult != nil) {+ if (authResult) {if ([authResult isSuccess]) {currentResolve(authResult.accessToken.accessToken);currentResolve = nil;currentReject = nil;- return YES;} else {NSString *msg;if ([authResult isError]) {@@ -137,13 +141,15 @@ RCT_EXPORT_METHOD(getSpaceUsage: (NSString *)tokencurrentResolve = nil;currentReject = nil;}+ return YES;}return NO;}-+ (UIViewController*)topMostController++ (UIViewController *)topMostController{- UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController;+ UIViewController *topController+ = [UIApplication sharedApplication].keyWindow.rootViewController;while (topController.presentedViewController) {topController = topController.presentedViewController;@@ -154,10 +160,10 @@ RCT_EXPORT_METHOD(getSpaceUsage: (NSString *)token+ (void)setAppKey {NSString *appKey = [self getAppKey];- if (appKey != nil) {++ if (appKey) {[DBClientsManager setupWithAppKey:appKey];}}-@end