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
feat(ios) migrate remaining helper classes to Swift
Saúl Ibarra Corretgé3d1eb5282c2f
diff --git a/ios/app/app.xcodeproj/project.pbxproj b/ios/app/app.xcodeproj/project.pbxprojindex e23c62906e..e3c17f26f8 100644--- a/ios/app/app.xcodeproj/project.pbxproj+++ b/ios/app/app.xcodeproj/project.pbxproj@@ -30,7 +30,6 @@4EB0603C260E09D000F524C5 /* SocketConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EB06039260E09D000F524C5 /* SocketConnection.swift */; };4EB0603D260E09D000F524C5 /* DarwinNotificationCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EB0603A260E09D000F524C5 /* DarwinNotificationCenter.swift */; };4EB0603E260E09D000F524C5 /* SampleUploader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EB0603B260E09D000F524C5 /* SampleUploader.swift */; };- DE4C456121DE1E4E00EA0709 /* FIRUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DE4C455F21DE1E4E00EA0709 /* FIRUtilities.m */; };DEA0B7122D7EF16E0062A9F6 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA0B7112D7EF16E0062A9F6 /* ViewController.swift */; };DEA0B7142D7EF7590062A9F6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA0B7132D7EF7590062A9F6 /* AppDelegate.swift */; };DEA9F289258A6EA800D4CD74 /* JitsiMeetSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEA9F288258A6EA800D4CD74 /* JitsiMeetSDK.framework */; };@@ -152,9 +151,6 @@B3B083EB1D4955FF0069CEE7 /* app.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = app.entitlements; sourceTree = "<group>"; };D6152FF9E9F7B0E86F70A21D /* libPods-JitsiMeet.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-JitsiMeet.a"; sourceTree = BUILT_PRODUCTS_DIR; };DE050388256E904600DEE3A5 /* WebRTC.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = WebRTC.xcframework; path = "../../node_modules/react-native-webrtc/apple/WebRTC.xcframework"; sourceTree = "<group>"; };- DE4C455F21DE1E4E00EA0709 /* FIRUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIRUtilities.m; sourceTree = "<group>"; };- DE4C456021DE1E4E00EA0709 /* FIRUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FIRUtilities.h; sourceTree = "<group>"; };- DEA0B7102D7EF16D0062A9F6 /* JitsiMeet-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JitsiMeet-Bridging-Header.h"; sourceTree = "<group>"; };DEA0B7112D7EF16E0062A9F6 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };DEA0B7132D7EF7590062A9F6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };DEA9F288258A6EA800D4CD74 /* JitsiMeetSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = JitsiMeetSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; };@@ -252,13 +248,10 @@isa = PBXGroup;children = (DEA0B7132D7EF7590062A9F6 /* AppDelegate.swift */,- DE4C456021DE1E4E00EA0709 /* FIRUtilities.h */,- DE4C455F21DE1E4E00EA0709 /* FIRUtilities.m */,13B07FB51A68108700A75B9A /* Images.xcassets */,13B07FB61A68108700A75B9A /* Info.plist */,13B07FB11A68108700A75B9A /* LaunchScreen.xib */,DEA0B7112D7EF16E0062A9F6 /* ViewController.swift */,- DEA0B7102D7EF16D0062A9F6 /* JitsiMeet-Bridging-Header.h */,);path = src;sourceTree = "<group>";@@ -649,7 +642,6 @@buildActionMask = 2147483647;files = (DEA0B7122D7EF16E0062A9F6 /* ViewController.swift in Sources */,- DE4C456121DE1E4E00EA0709 /* FIRUtilities.m in Sources */,DEA0B7142D7EF7590062A9F6 /* AppDelegate.swift in Sources */,);runOnlyForDeploymentPostprocessing = 0;@@ -881,7 +873,6 @@SUPPORTS_MACCATALYST = NO;SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;- SWIFT_OBJC_BRIDGING_HEADER = "src/JitsiMeet-Bridging-Header.h";SWIFT_OPTIMIZATION_LEVEL = "-Onone";SWIFT_VERSION = 6.0;TARGETED_DEVICE_FAMILY = "1,2";@@ -918,7 +909,6 @@SUPPORTS_MACCATALYST = NO;SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;- SWIFT_OBJC_BRIDGING_HEADER = "src/JitsiMeet-Bridging-Header.h";SWIFT_VERSION = 6.0;TARGETED_DEVICE_FAMILY = "1,2";};diff --git a/ios/app/src/AppDelegate.swift b/ios/app/src/AppDelegate.swiftindex ba5e9d9758..daa801d81f 100644--- a/ios/app/src/AppDelegate.swift+++ b/ios/app/src/AppDelegate.swift@@ -29,7 +29,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {jitsiMeet.application(application, didFinishLaunchingWithOptions: launchOptions ?? [:])- if FIRUtilities.appContainsRealServiceInfoPlist() {+ if self.appContainsRealServiceInfoPlist() {print("Enabling Firebase")FirebaseApp.configure()Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(!jitsiMeet.isCrashReportingDisabled())@@ -54,9 +54,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {// MARK: Linking delegate methodsfunc application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {- if FIRUtilities.appContainsRealServiceInfoPlist() {+ if self.appContainsRealServiceInfoPlist() {let handled = DynamicLinks.dynamicLinks().handleUniversalLink(userActivity.webpageURL!) { dynamicLink, error in- if let firebaseUrl = FIRUtilities.extractURL(dynamicLink) {+ if let firebaseUrl = self.extractURL(from: dynamicLink) {userActivity.webpageURL = firebaseUrlJitsiMeet.sharedInstance().application(application, continue: userActivity, restorationHandler: restorationHandler)}@@ -77,9 +77,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {var openUrl = url- if FIRUtilities.appContainsRealServiceInfoPlist() {+ if self.appContainsRealServiceInfoPlist() {if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url),- let firebaseUrl = FIRUtilities.extractURL(dynamicLink) {+ let firebaseUrl = self.extractURL(from: dynamicLink) {openUrl = firebaseUrl}}@@ -91,3 +91,19 @@ class AppDelegate: UIResponder, UIApplicationDelegate {return JitsiMeet.sharedInstance().application(application, supportedInterfaceOrientationsFor: window)}}++// Firebase utilities+extension AppDelegate {+ func appContainsRealServiceInfoPlist() -> Bool {+ return InfoPlistUtil.containsRealServiceInfoPlist(in: Bundle.main)+ }++ func extractURL(from dynamicLink: DynamicLink?) -> URL? {+ guard let dynamicLink = dynamicLink,+ let dynamicLinkURL = dynamicLink.url,+ dynamicLink.matchType == .unique || dynamicLink.matchType == .default else {+ return nil+ }+ return dynamicLinkURL+ }+}diff --git a/ios/app/src/FIRUtilities.h b/ios/app/src/FIRUtilities.hdeleted file mode 100644index 3e79064753..0000000000--- a/ios/app/src/FIRUtilities.h+++ /dev/null@@ -1,27 +0,0 @@-/*- * Copyright 2017 Google- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--#import <Foundation/Foundation.h>--@import Firebase;---@interface FIRUtilities : NSObject--+ (BOOL)appContainsRealServiceInfoPlist;-+ (NSURL *_Nullable)extractURL: (FIRDynamicLink* _Nullable)dynamicLink;--@enddiff --git a/ios/app/src/FIRUtilities.m b/ios/app/src/FIRUtilities.mdeleted file mode 100644index 69c47f7dbf..0000000000--- a/ios/app/src/FIRUtilities.m+++ /dev/null@@ -1,48 +0,0 @@-/*- * Copyright 2017 Google- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--#import "FIRUtilities.h"--@import JitsiMeetSDK;--@implementation FIRUtilities--+ (BOOL)appContainsRealServiceInfoPlist {- static BOOL containsRealServiceInfoPlist = NO;- static dispatch_once_t onceToken;- dispatch_once(&onceToken, ^{- NSBundle *bundle = [NSBundle mainBundle];- containsRealServiceInfoPlist = [InfoPlistUtil containsRealServiceInfoPlistInBundle:bundle];- });- return containsRealServiceInfoPlist;-}--+ (NSURL *)extractURL: (FIRDynamicLink*)dynamicLink {- NSURL *url = nil;- if (dynamicLink != nil) {- NSURL *dynamicLinkURL = dynamicLink.url;- if (dynamicLinkURL != nil- && (dynamicLink.matchType == FIRDLMatchTypeUnique- || dynamicLink.matchType == FIRDLMatchTypeDefault)) {- // Strong match, process it.- url = dynamicLinkURL;- }- }-- return url;-}--@enddiff --git a/ios/app/src/JitsiMeet-Bridging-Header.h b/ios/app/src/JitsiMeet-Bridging-Header.hdeleted file mode 100644index 299226de92..0000000000--- a/ios/app/src/JitsiMeet-Bridging-Header.h+++ /dev/null@@ -1,5 +0,0 @@-//-// Use this file to import your target's public headers that you would like to expose to Swift.-//--#import "FIRUtilities.h"