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
ios: update sample PiP app
Saúl Ibarra Corretgéf26c5570df41
diff --git a/ios/example-pip-app/example-pip-app.xcodeproj/project.pbxproj b/ios/example-pip-app/example-pip-app.xcodeproj/project.pbxprojindex 49e95137c4..2b4b9dddab 100644--- a/ios/example-pip-app/example-pip-app.xcodeproj/project.pbxproj+++ b/ios/example-pip-app/example-pip-app.xcodeproj/project.pbxproj@@ -128,7 +128,7 @@isa = PBXProject;attributes = {LastSwiftUpdateCheck = 0920;- LastUpgradeCheck = 0920;+ LastUpgradeCheck = 1020;ORGANIZATIONNAME = "Atlassian Inc";TargetAttributes = {C6F99C36204DE6BE0001F710 = {@@ -264,6 +264,7 @@CLANG_WARN_BOOL_CONVERSION = YES;CLANG_WARN_COMMA = YES;CLANG_WARN_CONSTANT_CONVERSION = YES;+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;CLANG_WARN_DOCUMENTATION_COMMENTS = YES;CLANG_WARN_EMPTY_BODY = YES;@@ -271,6 +272,7 @@CLANG_WARN_INFINITE_RECURSION = YES;CLANG_WARN_INT_CONVERSION = YES;CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;@@ -321,6 +323,7 @@CLANG_WARN_BOOL_CONVERSION = YES;CLANG_WARN_COMMA = YES;CLANG_WARN_CONSTANT_CONVERSION = YES;+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;CLANG_WARN_DOCUMENTATION_COMMENTS = YES;CLANG_WARN_EMPTY_BODY = YES;@@ -328,6 +331,7 @@CLANG_WARN_INFINITE_RECURSION = YES;CLANG_WARN_INT_CONVERSION = YES;CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;@@ -360,6 +364,7 @@C6F99C4A204DE6BE0001F710 /* Debug */ = {isa = XCBuildConfiguration;buildSettings = {+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;CODE_SIGN_STYLE = Automatic;FRAMEWORK_SEARCH_PATHS = "../../node_modules/react-native-webrtc/ios";@@ -368,7 +373,7 @@LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";PRODUCT_BUNDLE_IDENTIFIER = "com.jitsi.example-pip-app";PRODUCT_NAME = "$(TARGET_NAME)";- SWIFT_VERSION = 4.0;+ SWIFT_VERSION = 5.0;TARGETED_DEVICE_FAMILY = "1,2";};name = Debug;@@ -376,6 +381,7 @@C6F99C4B204DE6BE0001F710 /* Release */ = {isa = XCBuildConfiguration;buildSettings = {+ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;CODE_SIGN_STYLE = Automatic;FRAMEWORK_SEARCH_PATHS = "../../node_modules/react-native-webrtc/ios";@@ -384,7 +390,7 @@LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";PRODUCT_BUNDLE_IDENTIFIER = "com.jitsi.example-pip-app";PRODUCT_NAME = "$(TARGET_NAME)";- SWIFT_VERSION = 4.0;+ SWIFT_VERSION = 5.0;TARGETED_DEVICE_FAMILY = "1,2";};name = Release;diff --git a/ios/example-pip-app/src/AppDelegate.swift b/ios/example-pip-app/src/AppDelegate.swiftindex c1203393b0..cb18da33f1 100644--- a/ios/example-pip-app/src/AppDelegate.swift+++ b/ios/example-pip-app/src/AppDelegate.swift@@ -22,20 +22,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate {var window: UIWindow?func application(_ application: UIApplication,- didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {guard let launchOptions = launchOptions else { return false }- return JitsiMeetView.application(application, didFinishLaunchingWithOptions: launchOptions)+ return JitsiMeet.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)}// MARK: - Linking delegate methodsfunc application(_ application: UIApplication,continue userActivity: NSUserActivity,- restorationHandler: @escaping ([Any]?) -> Void) -> Bool {- return JitsiMeetView.application(application, continue: userActivity, restorationHandler: restorationHandler)+ restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {+ return JitsiMeet.sharedInstance().application(application, continue: userActivity, restorationHandler: restorationHandler)}- func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {- return JitsiMeetView.application(application, open: url, sourceApplication: sourceApplication, annotation: annotation)+ func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {+ return JitsiMeet.sharedInstance().application(app, open: url, options: options)}}diff --git a/ios/example-pip-app/src/Info.plist b/ios/example-pip-app/src/Info.plistindex ff67a0ed65..5524b34f3a 100644--- a/ios/example-pip-app/src/Info.plist+++ b/ios/example-pip-app/src/Info.plist@@ -2,6 +2,10 @@<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>+ <key>NSMicrophoneUsageDescription</key>+ <string>The microphone is needed for making calls</string>+ <key>NSCameraUsageDescription</key>+ <string>The camera is needed for making calls</string><key>CFBundleDevelopmentRegion</key><string>$(DEVELOPMENT_LANGUAGE)</string><key>CFBundleExecutable</key>diff --git a/ios/example-pip-app/src/ViewController.swift b/ios/example-pip-app/src/ViewController.swiftindex fdef0e3033..9bd2c13b91 100644--- a/ios/example-pip-app/src/ViewController.swift+++ b/ios/example-pip-app/src/ViewController.swift@@ -1,5 +1,6 @@/*- * Copyright @ 2017-present Atlassian Pty Ltd+ * Copyright @ 2019-present 8x8, Inc.+ * Copyright @ 2017-2018 Atlassian Pty Ltd** Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.@@ -43,11 +44,12 @@ class ViewController: UIViewController {// create and configure jitsimeet viewlet jitsiMeetView = JitsiMeetView()- jitsiMeetView.welcomePageEnabled = true- jitsiMeetView.pictureInPictureEnabled = true- jitsiMeetView.load(nil)jitsiMeetView.delegate = selfself.jitsiMeetView = jitsiMeetView+ let options = JitsiMeetConferenceOptions.fromBuilder { (builder) in+ builder.welcomePageEnabled = true+ }+ jitsiMeetView.join(options)// Enable jitsimeet view to be a view that can be displayed// on top of all the things, and let the coordinator to manage@@ -68,26 +70,17 @@ class ViewController: UIViewController {}extension ViewController: JitsiMeetViewDelegate {-- func conferenceFailed(_ data: [AnyHashable : Any]!) {- hideJitsiMeetViewAndCleanUp()- }-- func conferenceLeft(_ data: [AnyHashable : Any]!) {- hideJitsiMeetViewAndCleanUp()- }-- func enterPicture(inPicture data: [AnyHashable : Any]!) {+ func conferenceTerminated(_ data: [AnyHashable : Any]!) {DispatchQueue.main.async {- self.pipViewCoordinator?.enterPictureInPicture()+ self.pipViewCoordinator?.hide() { _ in+ self.cleanUp()+ }}}- private func hideJitsiMeetViewAndCleanUp() {+ func enterPicture(inPicture data: [AnyHashable : Any]!) {DispatchQueue.main.async {- self.pipViewCoordinator?.hide() { _ in- self.cleanUp()- }+ self.pipViewCoordinator?.enterPictureInPicture()}}}