From 181580871fef3c0450bf18a69a37e7855be4a1cf Mon Sep 17 00:00:00 2001 From: Daniel Ornelas Date: Mon, 5 Mar 2018 16:37:06 -0600 Subject: [PATCH] Initial work for testing PiP mode --- .../PiPApp.xcodeproj/project.pbxproj | 392 ++++++++++++++++++ ios/example-pip-app/src/AppDelegate.swift | 35 ++ .../AppIcon.appiconset/Contents.json | 98 +++++ .../src/Base.lproj/LaunchScreen.storyboard | 25 ++ .../src/Base.lproj/Main.storyboard | 60 +++ ios/example-pip-app/src/Info.plist | 45 ++ .../src/JitsiViewController.swift | 26 ++ ios/example-pip-app/src/ViewController.swift | 27 ++ .../contents.xcworkspacedata | 3 + ios/sdk/sdk.xcodeproj/project.pbxproj | 18 + ios/sdk/src/JitsiManager.swift | 17 + 11 files changed, 746 insertions(+) create mode 100644 ios/example-pip-app/PiPApp.xcodeproj/project.pbxproj create mode 100644 ios/example-pip-app/src/AppDelegate.swift create mode 100644 ios/example-pip-app/src/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 ios/example-pip-app/src/Base.lproj/LaunchScreen.storyboard create mode 100644 ios/example-pip-app/src/Base.lproj/Main.storyboard create mode 100644 ios/example-pip-app/src/Info.plist create mode 100644 ios/example-pip-app/src/JitsiViewController.swift create mode 100644 ios/example-pip-app/src/ViewController.swift create mode 100644 ios/sdk/src/JitsiManager.swift diff --git a/ios/example-pip-app/PiPApp.xcodeproj/project.pbxproj b/ios/example-pip-app/PiPApp.xcodeproj/project.pbxproj new file mode 100644 index 000000000..20c8c100b --- /dev/null +++ b/ios/example-pip-app/PiPApp.xcodeproj/project.pbxproj @@ -0,0 +1,392 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + C6A34249204DF18000E062DD /* WebRTC.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C6A34247204DF18000E062DD /* WebRTC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C6A3424C204DF98E00E062DD /* JitsiViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6A3424B204DF98E00E062DD /* JitsiViewController.swift */; }; + C6F99C3B204DE6BE0001F710 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6F99C3A204DE6BE0001F710 /* AppDelegate.swift */; }; + C6F99C3D204DE6BE0001F710 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6F99C3C204DE6BE0001F710 /* ViewController.swift */; }; + C6F99C40204DE6BE0001F710 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C6F99C3E204DE6BE0001F710 /* Main.storyboard */; }; + C6F99C42204DE6BE0001F710 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C6F99C41204DE6BE0001F710 /* Assets.xcassets */; }; + C6F99C45204DE6BE0001F710 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C6F99C43204DE6BE0001F710 /* LaunchScreen.storyboard */; }; + C6F99C60204DEDC10001F710 /* JitsiMeet.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C6F99C4F204DE79F0001F710 /* JitsiMeet.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + C6F99C61204DEDC20001F710 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + C6F99C60204DEDC10001F710 /* JitsiMeet.framework in Embed Frameworks */, + C6A34249204DF18000E062DD /* WebRTC.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + C6A34247204DF18000E062DD /* WebRTC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebRTC.framework; path = "../../node_modules/react-native-webrtc/ios/WebRTC.framework"; sourceTree = ""; }; + C6A3424B204DF98E00E062DD /* JitsiViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JitsiViewController.swift; sourceTree = ""; }; + C6F99C37204DE6BE0001F710 /* PiPApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PiPApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C6F99C3A204DE6BE0001F710 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + C6F99C3C204DE6BE0001F710 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + C6F99C3F204DE6BE0001F710 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + C6F99C41204DE6BE0001F710 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + C6F99C44204DE6BE0001F710 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + C6F99C46204DE6BE0001F710 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C6F99C4F204DE79F0001F710 /* JitsiMeet.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = JitsiMeet.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + C6F99C34204DE6BE0001F710 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + C6F99C2E204DE6BE0001F710 = { + isa = PBXGroup; + children = ( + C6F99C4D204DE79F0001F710 /* Frameworks */, + C6F99C38204DE6BE0001F710 /* Products */, + C6F99C4C204DE7230001F710 /* src */, + ); + sourceTree = ""; + }; + C6F99C38204DE6BE0001F710 /* Products */ = { + isa = PBXGroup; + children = ( + C6F99C37204DE6BE0001F710 /* PiPApp.app */, + ); + name = Products; + sourceTree = ""; + }; + C6F99C4C204DE7230001F710 /* src */ = { + isa = PBXGroup; + children = ( + C6F99C3A204DE6BE0001F710 /* AppDelegate.swift */, + C6F99C3C204DE6BE0001F710 /* ViewController.swift */, + C6A3424B204DF98E00E062DD /* JitsiViewController.swift */, + C6F99C3E204DE6BE0001F710 /* Main.storyboard */, + C6F99C41204DE6BE0001F710 /* Assets.xcassets */, + C6F99C43204DE6BE0001F710 /* LaunchScreen.storyboard */, + C6F99C46204DE6BE0001F710 /* Info.plist */, + ); + path = src; + sourceTree = ""; + }; + C6F99C4D204DE79F0001F710 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C6F99C4F204DE79F0001F710 /* JitsiMeet.framework */, + C6A34247204DF18000E062DD /* WebRTC.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C6F99C36204DE6BE0001F710 /* PiPApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = C6F99C49204DE6BE0001F710 /* Build configuration list for PBXNativeTarget "PiPApp" */; + buildPhases = ( + C6F99C33204DE6BE0001F710 /* Sources */, + C6F99C34204DE6BE0001F710 /* Frameworks */, + C6F99C61204DEDC20001F710 /* Embed Frameworks */, + C6F99C35204DE6BE0001F710 /* Resources */, + C6F99C62204DEFFE0001F710 /* Run React Packager */, + C6A3424A204DF91D00E062DD /* Run Adjust ATS for loading JS bundle */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PiPApp; + productName = ExampleAppUsingJitsiWithPiP; + productReference = C6F99C37204DE6BE0001F710 /* PiPApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + C6F99C2F204DE6BE0001F710 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 0920; + ORGANIZATIONNAME = "Atlassian Inc"; + TargetAttributes = { + C6F99C36204DE6BE0001F710 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = C6F99C32204DE6BE0001F710 /* Build configuration list for PBXProject "PiPApp" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = C6F99C2E204DE6BE0001F710; + productRefGroup = C6F99C38204DE6BE0001F710 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C6F99C36204DE6BE0001F710 /* PiPApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + C6F99C35204DE6BE0001F710 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C6F99C45204DE6BE0001F710 /* LaunchScreen.storyboard in Resources */, + C6F99C42204DE6BE0001F710 /* Assets.xcassets in Resources */, + C6F99C40204DE6BE0001F710 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + C6A3424A204DF91D00E062DD /* Run Adjust ATS for loading JS bundle */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Adjust ATS for loading JS bundle"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "../scripts/fixup-ats.sh"; + }; + C6F99C62204DEFFE0001F710 /* Run React Packager */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run React Packager"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "../scripts/run-packager.sh"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + C6F99C33204DE6BE0001F710 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C6F99C3D204DE6BE0001F710 /* ViewController.swift in Sources */, + C6F99C3B204DE6BE0001F710 /* AppDelegate.swift in Sources */, + C6A3424C204DF98E00E062DD /* JitsiViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + C6F99C3E204DE6BE0001F710 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + C6F99C3F204DE6BE0001F710 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + C6F99C43204DE6BE0001F710 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + C6F99C44204DE6BE0001F710 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C6F99C47204DE6BE0001F710 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + C6F99C48204DE6BE0001F710 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + C6F99C4A204DE6BE0001F710 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = src/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.jitsi.PiPApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + C6F99C4B204DE6BE0001F710 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = src/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.jitsi.PiPApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C6F99C32204DE6BE0001F710 /* Build configuration list for PBXProject "PiPApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C6F99C47204DE6BE0001F710 /* Debug */, + C6F99C48204DE6BE0001F710 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C6F99C49204DE6BE0001F710 /* Build configuration list for PBXNativeTarget "PiPApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C6F99C4A204DE6BE0001F710 /* Debug */, + C6F99C4B204DE6BE0001F710 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = C6F99C2F204DE6BE0001F710 /* Project object */; +} diff --git a/ios/example-pip-app/src/AppDelegate.swift b/ios/example-pip-app/src/AppDelegate.swift new file mode 100644 index 000000000..1f935761c --- /dev/null +++ b/ios/example-pip-app/src/AppDelegate.swift @@ -0,0 +1,35 @@ +// +// AppDelegate.swift +// ExampleAppUsingJitsiWithPiP +// +// Created by Daniel Ornelas on 3/5/18. +// Copyright © 2018 Atlassian Inc. All rights reserved. +// + +import JitsiMeet + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { + guard let launchOptions = launchOptions else { return false } + return JitsiMeetView.application(application, didFinishLaunchingWithOptions: launchOptions) + } + + // MARK: - Linking delegate methods + + func application(_ application: UIApplication, + continue userActivity: NSUserActivity, + restorationHandler: @escaping ([Any]?) -> Void) -> Bool { + return JitsiMeetView.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) + } + +} + diff --git a/ios/example-pip-app/src/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/example-pip-app/src/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..d8db8d65f --- /dev/null +++ b/ios/example-pip-app/src/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/example-pip-app/src/Base.lproj/LaunchScreen.storyboard b/ios/example-pip-app/src/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000..f83f6fd58 --- /dev/null +++ b/ios/example-pip-app/src/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/example-pip-app/src/Base.lproj/Main.storyboard b/ios/example-pip-app/src/Base.lproj/Main.storyboard new file mode 100644 index 000000000..b4d8793b0 --- /dev/null +++ b/ios/example-pip-app/src/Base.lproj/Main.storyboard @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/example-pip-app/src/Info.plist b/ios/example-pip-app/src/Info.plist new file mode 100644 index 000000000..16be3b681 --- /dev/null +++ b/ios/example-pip-app/src/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/ios/example-pip-app/src/JitsiViewController.swift b/ios/example-pip-app/src/JitsiViewController.swift new file mode 100644 index 000000000..8b41cdb92 --- /dev/null +++ b/ios/example-pip-app/src/JitsiViewController.swift @@ -0,0 +1,26 @@ +// +// JitsiViewController.swift +// PiPApp +// +// Created by Daniel Ornelas on 3/5/18. +// Copyright © 2018 Atlassian Inc. All rights reserved. +// + +import JitsiMeet +import UIKit + +final class JitsiViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + guard let jitsiView = self.view as? JitsiMeetView else { return } + + jitsiView.welcomePageEnabled = true + jitsiView.load(nil) + + // TODO: delete me, this is only testing access to swift object in SDK + let jitsiManager = JitsiManager() + jitsiManager.testMe() + } +} diff --git a/ios/example-pip-app/src/ViewController.swift b/ios/example-pip-app/src/ViewController.swift new file mode 100644 index 000000000..969114305 --- /dev/null +++ b/ios/example-pip-app/src/ViewController.swift @@ -0,0 +1,27 @@ +// +// ViewController.swift +// ExampleAppUsingJitsiWithPiP +// +// Created by Daniel Ornelas on 3/5/18. +// Copyright © 2018 Atlassian Inc. All rights reserved. +// + +import UIKit +import JitsiMeet + +class ViewController: UIViewController { + + @IBOutlet weak var videoButton: UIButton? + + override func viewDidLoad() { + super.viewDidLoad() + } + + // MARK: - Actions + + @IBAction func startMeeting(sender: Any?) { + print("test") + } + +} + diff --git a/ios/jitsi-meet.xcworkspace/contents.xcworkspacedata b/ios/jitsi-meet.xcworkspace/contents.xcworkspacedata index 8145e614e..ed0af25d3 100644 --- a/ios/jitsi-meet.xcworkspace/contents.xcworkspacedata +++ b/ios/jitsi-meet.xcworkspace/contents.xcworkspacedata @@ -1,6 +1,9 @@ + + diff --git a/ios/sdk/sdk.xcodeproj/project.pbxproj b/ios/sdk/sdk.xcodeproj/project.pbxproj index 71a23abff..7c48f91f2 100644 --- a/ios/sdk/sdk.xcodeproj/project.pbxproj +++ b/ios/sdk/sdk.xcodeproj/project.pbxproj @@ -27,6 +27,8 @@ 0BCA496C1EC4BBF900B793EE /* jitsi.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0BCA496B1EC4BBF900B793EE /* jitsi.ttf */; }; 0BD906EA1EC0C00300C8C18E /* JitsiMeet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0BD906E81EC0C00300C8C18E /* JitsiMeet.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0F65EECE1D95DA94561BB47E /* libPods-JitsiMeet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 03F2ADC957FF109849B7FCA1 /* libPods-JitsiMeet.a */; }; + C6F99C14204DB63E0001F710 /* JitsiManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6F99C12204DB63D0001F710 /* JitsiManager.swift */; }; + C6F99C15204DB63E0001F710 /* JitsiMeetView+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = C6F99C13204DB63D0001F710 /* JitsiMeetView+Private.h */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -55,6 +57,8 @@ 0BD906E91EC0C00300C8C18E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 98E09B5C73D9036B4ED252FC /* Pods-JitsiMeet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JitsiMeet.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-JitsiMeet/Pods-JitsiMeet.debug.xcconfig"; sourceTree = ""; }; 9C77CA3CC919B081F1A52982 /* Pods-JitsiMeet.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JitsiMeet.release.xcconfig"; path = "../Pods/Target Support Files/Pods-JitsiMeet/Pods-JitsiMeet.release.xcconfig"; sourceTree = ""; }; + C6F99C12204DB63D0001F710 /* JitsiManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JitsiManager.swift; sourceTree = ""; }; + C6F99C13204DB63D0001F710 /* JitsiMeetView+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JitsiMeetView+Private.h"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -109,9 +113,11 @@ 0BA13D301EE83FF8007BEF7F /* ExternalAPI.m */, 0BD906E91EC0C00300C8C18E /* Info.plist */, 0B7C2CFC200F51D60060D076 /* LaunchOptions.m */, + C6F99C12204DB63D0001F710 /* JitsiManager.swift */, 0BD906E81EC0C00300C8C18E /* JitsiMeet.h */, 0B412F161EDEC65D00B1A0A6 /* JitsiMeetView.h */, 0B412F171EDEC65D00B1A0A6 /* JitsiMeetView.m */, + C6F99C13204DB63D0001F710 /* JitsiMeetView+Private.h */, 0B412F1B1EDEC80100B1A0A6 /* JitsiMeetViewDelegate.h */, 0B44A0181F902126009D1D64 /* MPVolumeViewManager.m */, 0B93EF7C1EC9DDCD0030D24D /* RCTBridgeWrapper.h */, @@ -150,6 +156,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + C6F99C15204DB63E0001F710 /* JitsiMeetView+Private.h in Headers */, 0B412F181EDEC65D00B1A0A6 /* JitsiMeetView.h in Headers */, 0B93EF7E1EC9DDCD0030D24D /* RCTBridgeWrapper.h in Headers */, 0B412F221EDEF6EA00B1A0A6 /* JitsiMeetViewDelegate.h in Headers */, @@ -192,6 +199,7 @@ TargetAttributes = { 0BD906E41EC0C00300C8C18E = { CreatedOnToolsVersion = 8.3.2; + LastSwiftMigration = 0920; ProvisioningStyle = Automatic; }; }; @@ -309,6 +317,7 @@ 0BA13D311EE83FF8007BEF7F /* ExternalAPI.m in Sources */, 0BCA49601EC4B6C600B793EE /* POSIX.m in Sources */, 0B7C2CFD200F51D60060D076 /* LaunchOptions.m in Sources */, + C6F99C14204DB63E0001F710 /* JitsiManager.swift in Sources */, 0BCA495F1EC4B6C600B793EE /* AudioMode.m in Sources */, 0B44A0191F902126009D1D64 /* MPVolumeViewManager.m in Sources */, 0BCA49611EC4B6C600B793EE /* Proximity.m in Sources */, @@ -435,6 +444,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 98E09B5C73D9036B4ED252FC /* Pods-JitsiMeet.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; @@ -450,6 +461,9 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; + SWIFT_OBJC_BRIDGING_HEADER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -457,6 +471,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9C77CA3CC919B081F1A52982 /* Pods-JitsiMeet.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; @@ -472,6 +488,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; + SWIFT_OBJC_BRIDGING_HEADER = ""; + SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/ios/sdk/src/JitsiManager.swift b/ios/sdk/src/JitsiManager.swift new file mode 100644 index 000000000..50668273c --- /dev/null +++ b/ios/sdk/src/JitsiManager.swift @@ -0,0 +1,17 @@ +// +// JitsiManager.swift +// JitsiMeet +// +// Created by Daniel Ornelas on 3/5/18. +// Copyright © 2018 Jitsi. All rights reserved. +// + +import Foundation + +@objc(JitsiManager) +public class JitsiManager: NSObject { + + public func testMe() { + print("hi there") + } +}