From 22c1e927ef7e453e3ef3be5f957f33eddb62f087 Mon Sep 17 00:00:00 2001 From: miosakuma Date: Fri, 11 Mar 2022 11:18:55 +0900 Subject: [PATCH 01/10] =?UTF-8?q?Podfile=20=E3=81=AE=20SDK=20=E5=8F=82?= =?UTF-8?q?=E7=85=A7=E5=85=88=E3=82=92=20develop=20=E3=83=96=E3=83=A9?= =?UTF-8?q?=E3=83=B3=E3=83=81=E3=81=AB=E5=A4=89=E6=9B=B4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Podfile b/Podfile index b229b02..dcf10ea 100644 --- a/Podfile +++ b/Podfile @@ -5,7 +5,7 @@ platform :ios, '13.0' target 'SoraQuickStart' do use_frameworks! - pod 'Sora', '2022.2.0' + pod 'Sora', :git => 'https://github.com/shiguredo/sora-ios-sdk.git', :branch => 'develop' pod 'SwiftLint' pod 'SwiftFormat/CLI' From 46f406225787ed8b6f55550c8dce82db8a140877 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Fri, 22 Apr 2022 16:47:51 +0900 Subject: [PATCH 02/10] =?UTF-8?q?=E6=8E=A5=E7=B6=9A=E5=A4=B1=E6=95=97?= =?UTF-8?q?=E6=99=82=E3=81=A8=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC=E3=81=AB?= =?UTF-8?q?=E3=82=88=E3=82=8B=E5=88=87=E6=96=AD=E6=99=82=E3=81=AB=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E5=86=85=E5=AE=B9=E3=82=92=E3=82=A2=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=A7=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SoraQuickStart/ViewController.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SoraQuickStart/ViewController.swift b/SoraQuickStart/ViewController.swift index f22464f..f5596d6 100644 --- a/SoraQuickStart/ViewController.swift +++ b/SoraQuickStart/ViewController.swift @@ -85,6 +85,13 @@ class ViewController: UIViewController { } if let error = error { NSLog(error.localizedDescription) + DispatchQueue.main.async { + let alertController = UIAlertController(title: "接続に失敗しました", + message: error.localizedDescription, + preferredStyle: .alert) + alertController.addAction(UIAlertAction(title: "OK", style: .cancel, handler: nil)) + self?.present(alertController, animated: true, completion: nil) + } } strongSelf.updateUI(false) } @@ -96,6 +103,13 @@ class ViewController: UIViewController { // 接続に失敗するとエラーが渡されます。 if let error = error { NSLog(error.localizedDescription) + DispatchQueue.main.async { [weak self] in + let alertController = UIAlertController(title: "接続に失敗しました", + message: error.localizedDescription, + preferredStyle: .alert) + alertController.addAction(UIAlertAction(title: "OK", style: .cancel, handler: nil)) + self?.present(alertController, animated: true, completion: nil) + } self.updateUI(false) return } From a314ca8357a8b5d7565d7d313153ca9bbfeb05da Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Wed, 27 Apr 2022 14:23:01 +0900 Subject: [PATCH 03/10] =?UTF-8?q?=E3=83=97=E3=83=AD=E3=82=B8=E3=82=A7?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=82=92=E4=BD=9C=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SoraQuickStart.xcodeproj/project.pbxproj | 344 ++++++++++++++++++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 93 +++++ .../Assets.xcassets/Contents.json | 6 + SwiftUI/SoraQuickStart/ContentView.swift | 14 + .../Preview Assets.xcassets/Contents.json | 6 + .../SoraQuickStart/SoraQuickStartApp.swift | 10 + 7 files changed, 484 insertions(+) create mode 100644 SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj create mode 100644 SwiftUI/SoraQuickStart/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 SwiftUI/SoraQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 SwiftUI/SoraQuickStart/Assets.xcassets/Contents.json create mode 100644 SwiftUI/SoraQuickStart/ContentView.swift create mode 100644 SwiftUI/SoraQuickStart/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 SwiftUI/SoraQuickStart/SoraQuickStartApp.swift diff --git a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj new file mode 100644 index 0000000..42c35b2 --- /dev/null +++ b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj @@ -0,0 +1,344 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 916439A32819095600A062E9 /* SoraQuickStartApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439A22819095600A062E9 /* SoraQuickStartApp.swift */; }; + 916439A52819095600A062E9 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439A42819095600A062E9 /* ContentView.swift */; }; + 916439A72819095700A062E9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 916439A62819095700A062E9 /* Assets.xcassets */; }; + 916439AA2819095700A062E9 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 916439A92819095700A062E9 /* Preview Assets.xcassets */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 9164399F2819095600A062E9 /* SoraQuickStart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SoraQuickStart.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 916439A22819095600A062E9 /* SoraQuickStartApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoraQuickStartApp.swift; sourceTree = ""; }; + 916439A42819095600A062E9 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 916439A62819095700A062E9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 916439A92819095700A062E9 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9164399C2819095600A062E9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 916439962819095600A062E9 = { + isa = PBXGroup; + children = ( + 916439A12819095600A062E9 /* SoraQuickStart */, + 916439A02819095600A062E9 /* Products */, + ); + sourceTree = ""; + }; + 916439A02819095600A062E9 /* Products */ = { + isa = PBXGroup; + children = ( + 9164399F2819095600A062E9 /* SoraQuickStart.app */, + ); + name = Products; + sourceTree = ""; + }; + 916439A12819095600A062E9 /* SoraQuickStart */ = { + isa = PBXGroup; + children = ( + 916439A22819095600A062E9 /* SoraQuickStartApp.swift */, + 916439A42819095600A062E9 /* ContentView.swift */, + 916439A62819095700A062E9 /* Assets.xcassets */, + 916439A82819095700A062E9 /* Preview Content */, + ); + path = SoraQuickStart; + sourceTree = ""; + }; + 916439A82819095700A062E9 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 916439A92819095700A062E9 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 9164399E2819095600A062E9 /* SoraQuickStart */ = { + isa = PBXNativeTarget; + buildConfigurationList = 916439AD2819095700A062E9 /* Build configuration list for PBXNativeTarget "SoraQuickStart" */; + buildPhases = ( + 9164399B2819095600A062E9 /* Sources */, + 9164399C2819095600A062E9 /* Frameworks */, + 9164399D2819095600A062E9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SoraQuickStart; + productName = SoraQuickStart; + productReference = 9164399F2819095600A062E9 /* SoraQuickStart.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 916439972819095600A062E9 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1330; + LastUpgradeCheck = 1330; + TargetAttributes = { + 9164399E2819095600A062E9 = { + CreatedOnToolsVersion = 13.3.1; + }; + }; + }; + buildConfigurationList = 9164399A2819095600A062E9 /* Build configuration list for PBXProject "SoraQuickStart" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 916439962819095600A062E9; + productRefGroup = 916439A02819095600A062E9 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9164399E2819095600A062E9 /* SoraQuickStart */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 9164399D2819095600A062E9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 916439AA2819095700A062E9 /* Preview Assets.xcassets in Resources */, + 916439A72819095700A062E9 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 9164399B2819095600A062E9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 916439A52819095600A062E9 /* ContentView.swift in Sources */, + 916439A32819095600A062E9 /* SoraQuickStartApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 916439AB2819095700A062E9 /* 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++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + 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; + 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + 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 = 14.1; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 916439AC2819095700A062E9 /* 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++17"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + 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; + 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_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + 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; + 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 = 14.1; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 916439AE2819095700A062E9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"SoraQuickStart/Preview Content\""; + DEVELOPMENT_TEAM = 6J8QF53ZZX; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.SoraQuickStart; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 916439AF2819095700A062E9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"SoraQuickStart/Preview Content\""; + DEVELOPMENT_TEAM = 6J8QF53ZZX; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.SoraQuickStart; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 9164399A2819095600A062E9 /* Build configuration list for PBXProject "SoraQuickStart" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 916439AB2819095700A062E9 /* Debug */, + 916439AC2819095700A062E9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 916439AD2819095700A062E9 /* Build configuration list for PBXNativeTarget "SoraQuickStart" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 916439AE2819095700A062E9 /* Debug */, + 916439AF2819095700A062E9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 916439972819095600A062E9 /* Project object */; +} diff --git a/SwiftUI/SoraQuickStart/Assets.xcassets/AccentColor.colorset/Contents.json b/SwiftUI/SoraQuickStart/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/SwiftUI/SoraQuickStart/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftUI/SoraQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json b/SwiftUI/SoraQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..5a3257a --- /dev/null +++ b/SwiftUI/SoraQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftUI/SoraQuickStart/Assets.xcassets/Contents.json b/SwiftUI/SoraQuickStart/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SwiftUI/SoraQuickStart/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftUI/SoraQuickStart/ContentView.swift b/SwiftUI/SoraQuickStart/ContentView.swift new file mode 100644 index 0000000..0ec9f8a --- /dev/null +++ b/SwiftUI/SoraQuickStart/ContentView.swift @@ -0,0 +1,14 @@ +import SwiftUI + +struct ContentView: View { + var body: some View { + Text("Hello, world!") + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/SwiftUI/SoraQuickStart/Preview Content/Preview Assets.xcassets/Contents.json b/SwiftUI/SoraQuickStart/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SwiftUI/SoraQuickStart/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftUI/SoraQuickStart/SoraQuickStartApp.swift b/SwiftUI/SoraQuickStart/SoraQuickStartApp.swift new file mode 100644 index 0000000..276edf4 --- /dev/null +++ b/SwiftUI/SoraQuickStart/SoraQuickStartApp.swift @@ -0,0 +1,10 @@ +import SwiftUI + +@main +struct SoraQuickStartApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} From a6fce01f84db564052759b9e9ffabfdec5f07c57 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Wed, 27 Apr 2022 14:57:51 +0900 Subject: [PATCH 04/10] =?UTF-8?q?Environment=20=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj | 4 ++++ SwiftUI/SoraQuickStart/Environment.example.swift | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 SwiftUI/SoraQuickStart/Environment.example.swift diff --git a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj index 42c35b2..d1aff99 100644 --- a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj +++ b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 916439A52819095600A062E9 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439A42819095600A062E9 /* ContentView.swift */; }; 916439A72819095700A062E9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 916439A62819095700A062E9 /* Assets.xcassets */; }; 916439AA2819095700A062E9 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 916439A92819095700A062E9 /* Preview Assets.xcassets */; }; + 916439B128190CE000A062E9 /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439B028190CE000A062E9 /* Environment.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -19,6 +20,7 @@ 916439A42819095600A062E9 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 916439A62819095700A062E9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 916439A92819095700A062E9 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 916439B028190CE000A062E9 /* Environment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Environment.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -53,6 +55,7 @@ children = ( 916439A22819095600A062E9 /* SoraQuickStartApp.swift */, 916439A42819095600A062E9 /* ContentView.swift */, + 916439B028190CE000A062E9 /* Environment.swift */, 916439A62819095700A062E9 /* Assets.xcassets */, 916439A82819095700A062E9 /* Preview Content */, ); @@ -138,6 +141,7 @@ buildActionMask = 2147483647; files = ( 916439A52819095600A062E9 /* ContentView.swift in Sources */, + 916439B128190CE000A062E9 /* Environment.swift in Sources */, 916439A32819095600A062E9 /* SoraQuickStartApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/SwiftUI/SoraQuickStart/Environment.example.swift b/SwiftUI/SoraQuickStart/Environment.example.swift new file mode 100644 index 0000000..64b9dc5 --- /dev/null +++ b/SwiftUI/SoraQuickStart/Environment.example.swift @@ -0,0 +1,12 @@ +import Foundation + +enum Environment { + // 接続するサーバーのシグナリング URL + static let url = URL(string: "wss://sora.example.com/signaling")! + + // チャネル ID + static let channelId = "sora" + + // type: connect に含めるメタデータ + static let signalingConnectMetadata: Encodable? = nil +} From f46d98e03efbb4873df367b7b1e9bfe8d8f78a40 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Wed, 27 Apr 2022 14:58:49 +0900 Subject: [PATCH 05/10] =?UTF-8?q?SDK=20=E3=81=AE=E3=83=91=E3=83=83?= =?UTF-8?q?=E3=82=B1=E3=83=BC=E3=82=B8=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SoraQuickStart.xcodeproj/project.pbxproj | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj index d1aff99..18fa3cb 100644 --- a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj +++ b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 916439A72819095700A062E9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 916439A62819095700A062E9 /* Assets.xcassets */; }; 916439AA2819095700A062E9 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 916439A92819095700A062E9 /* Preview Assets.xcassets */; }; 916439B128190CE000A062E9 /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439B028190CE000A062E9 /* Environment.swift */; }; + 916439B42819125900A062E9 /* Sora in Frameworks */ = {isa = PBXBuildFile; productRef = 916439B32819125900A062E9 /* Sora */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -28,6 +29,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 916439B42819125900A062E9 /* Sora in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -53,9 +55,9 @@ 916439A12819095600A062E9 /* SoraQuickStart */ = { isa = PBXGroup; children = ( - 916439A22819095600A062E9 /* SoraQuickStartApp.swift */, 916439A42819095600A062E9 /* ContentView.swift */, 916439B028190CE000A062E9 /* Environment.swift */, + 916439A22819095600A062E9 /* SoraQuickStartApp.swift */, 916439A62819095700A062E9 /* Assets.xcassets */, 916439A82819095700A062E9 /* Preview Content */, ); @@ -86,6 +88,9 @@ dependencies = ( ); name = SoraQuickStart; + packageProductDependencies = ( + 916439B32819125900A062E9 /* Sora */, + ); productName = SoraQuickStart; productReference = 9164399F2819095600A062E9 /* SoraQuickStart.app */; productType = "com.apple.product-type.application"; @@ -114,6 +119,9 @@ Base, ); mainGroup = 916439962819095600A062E9; + packageReferences = ( + 916439B22819125900A062E9 /* XCRemoteSwiftPackageReference "sora-ios-sdk" */, + ); productRefGroup = 916439A02819095600A062E9 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -343,6 +351,25 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 916439B22819125900A062E9 /* XCRemoteSwiftPackageReference "sora-ios-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/shiguredo/sora-ios-sdk.git"; + requirement = { + branch = feature/swiftui; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 916439B32819125900A062E9 /* Sora */ = { + isa = XCSwiftPackageProductDependency; + package = 916439B22819125900A062E9 /* XCRemoteSwiftPackageReference "sora-ios-sdk" */; + productName = Sora; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 916439972819095600A062E9 /* Project object */; } From 5c6f3a42940b1ad1fd7b37171cabdbd250d7030e Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Wed, 27 Apr 2022 14:59:13 +0900 Subject: [PATCH 06/10] =?UTF-8?q?=E6=97=A2=E5=AD=98=E3=81=AE=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=A8=E3=81=8B=E3=81=B6=E3=82=89=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=20Bundle=20Identifier=20?= =?UTF-8?q?=E3=82=92=E5=A4=89=E6=9B=B4=E3=81=97=E3=81=A6=E3=81=8A=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj index 18fa3cb..8385dc2 100644 --- a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj +++ b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj @@ -292,7 +292,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.SoraQuickStart; + PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.SoraQuickStartUI; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; From 9c723b7362b1ef896aaffebacafadd1953ee4deb Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Wed, 27 Apr 2022 16:36:30 +0900 Subject: [PATCH 07/10] =?UTF-8?q?=E9=85=8D=E4=BF=A1=E7=94=BB=E9=9D=A2?= =?UTF-8?q?=E3=81=AE=E6=8F=8F=E7=94=BB=E3=81=BE=E3=81=A7=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SoraQuickStart.xcodeproj/project.pbxproj | 10 +- SwiftUI/SoraQuickStart/ContentView.swift | 114 +++++++++++++++++- SwiftUI/SoraQuickStart/Video.swift | 49 ++++++++ 3 files changed, 170 insertions(+), 3 deletions(-) create mode 100644 SwiftUI/SoraQuickStart/Video.swift diff --git a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj index 8385dc2..b872f9d 100644 --- a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj +++ b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 916439AA2819095700A062E9 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 916439A92819095700A062E9 /* Preview Assets.xcassets */; }; 916439B128190CE000A062E9 /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439B028190CE000A062E9 /* Environment.swift */; }; 916439B42819125900A062E9 /* Sora in Frameworks */ = {isa = PBXBuildFile; productRef = 916439B32819125900A062E9 /* Sora */; }; + 916439B62819137300A062E9 /* Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439B52819137300A062E9 /* Video.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -22,6 +23,7 @@ 916439A62819095700A062E9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 916439A92819095700A062E9 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 916439B028190CE000A062E9 /* Environment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Environment.swift; sourceTree = ""; }; + 916439B52819137300A062E9 /* Video.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Video.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -60,6 +62,7 @@ 916439A22819095600A062E9 /* SoraQuickStartApp.swift */, 916439A62819095700A062E9 /* Assets.xcassets */, 916439A82819095700A062E9 /* Preview Content */, + 916439B52819137300A062E9 /* Video.swift */, ); path = SoraQuickStart; sourceTree = ""; @@ -149,6 +152,7 @@ buildActionMask = 2147483647; files = ( 916439A52819095600A062E9 /* ContentView.swift in Sources */, + 916439B62819137300A062E9 /* Video.swift in Sources */, 916439B128190CE000A062E9 /* Environment.swift in Sources */, 916439A32819095600A062E9 /* SoraQuickStartApp.swift in Sources */, ); @@ -279,9 +283,11 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"SoraQuickStart/Preview Content\""; - DEVELOPMENT_TEAM = 6J8QF53ZZX; + DEVELOPMENT_TEAM = DQ232CBKHS; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSCameraUsageDescription = WebRTC; + INFOPLIST_KEY_NSMicrophoneUsageDescription = WebRTC; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; @@ -311,6 +317,8 @@ DEVELOPMENT_TEAM = 6J8QF53ZZX; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSCameraUsageDescription = WebRTC; + INFOPLIST_KEY_NSMicrophoneUsageDescription = WebRTC; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; diff --git a/SwiftUI/SoraQuickStart/ContentView.swift b/SwiftUI/SoraQuickStart/ContentView.swift index 0ec9f8a..038be5a 100644 --- a/SwiftUI/SoraQuickStart/ContentView.swift +++ b/SwiftUI/SoraQuickStart/ContentView.swift @@ -1,9 +1,119 @@ +import Sora import SwiftUI struct ContentView: View { + // 接続済みの MediaChannel です。 + @State private var mediaChannel: MediaChannel? + + // 接続試行中にキャンセルするためのオブジェクトです。 + @State private var connectionTask: ConnectionTask? + + @State private var senderStream: MediaStream? + @State private var senderRendering = true + + // 接続済みであれば true を返します。 + var connecting: Bool { + mediaChannel?.isAvailable == true + } + var body: some View { - Text("Hello, world!") - .padding() + VStack { + Video(stream: $senderStream, rendering: $senderRendering) + + HStack { + // ボタンを中央に配置するため、前後にスペースを入れます。 + Spacer() + + Button(action: { + connect() + }, label: { + Circle() + .foregroundColor(.green) + .overlay( + Image(systemName: "play.fill") + .scaleEffect(2.5) + .frame(width: 100, height: 100) + .foregroundColor(.white)) + }) + .frame(width: 100, height: 100) + + Spacer() + } + } + } + + /* + func connect() { + // 接続試行中のタスクが残っていればキャンセルします。 + connectionTask?.cancel() + + if connecting { + // 接続済みであれば接続を解除します。 + if mediaChannel?.isAvailable == true { + mediaChannel?.disconnect(error: nil) + } + mediaChannel = nil + updateUI(false) + } else { + // 未接続なら接続します。 + connect() + updateUI(true) + } + } + */ + + func connect() { + // 接続試行中のタスクが残っていればキャンセルします。 + connectionTask?.cancel() + + // 接続の設定を行います。 + var config = Configuration(urlCandidates: Environment.urls, + channelId: Environment.channelId, + role: .sendrecv, + multistreamEnabled: true) + + // 接続時に指定したいオプションを以下のように設定します。 + config.signalingConnectMetadata = Environment.signalingConnectMetadata + + /* + // ストリームが追加されたら受信用の VideoView をストリームにセットします。 + // このアプリでは、複数のユーザーが接続した場合は最後のユーザーの映像のみ描画します。 + let senderStreamId = config.publisherStreamId + config.mediaChannelHandlers.onAddStream = { stream in + if stream.streamId != senderStreamId { + self.receiverStream = stream + } + } + // 接続先から接続を解除されたときに行う処理です。 + config.mediaChannelHandlers.onDisconnect = { error in + if let error = error { + NSLog(error.localizedDescription) + } + self.receiverStream = nil + } + */ + + // 接続します。 + // connect() の戻り値 ConnectionTask を使うと + // 接続試行中の状態を強制的に終了させることができます。 + connectionTask = Sora.shared.connect(configuration: config) { mediaChannel, error in + // 接続に失敗するとエラーが渡されます。 + if let error = error { + NSLog(error.localizedDescription) + // TODO: 画面更新 + return + } + + // 接続に成功した MediaChannel を保持しておきます。 + self.mediaChannel = mediaChannel + + // 接続できたら配信用の VideoView をストリームにセットします。 + if let stream = mediaChannel!.senderStream { + self.senderStream = stream + NSLog("set sender stream => \(senderStream), \(self.senderStream)") + self.senderRendering = false + } + } } } diff --git a/SwiftUI/SoraQuickStart/Video.swift b/SwiftUI/SoraQuickStart/Video.swift new file mode 100644 index 0000000..586b7f7 --- /dev/null +++ b/SwiftUI/SoraQuickStart/Video.swift @@ -0,0 +1,49 @@ +import Foundation +import Sora +import SwiftUI + +struct Video: UIViewRepresentable { + typealias UIViewType = VideoView + + @Binding var stream: MediaStream? + @Binding var rendering: Bool + + func makeUIView(context: Context) -> VideoView { + NSLog("\(#function)") + let view = VideoView() + view.start() + return view + } + + func updateUIView(_ uiView: VideoView, context: Context) { + NSLog("\(#function)") + + // TODO: これだと毎度 renderer がセットされてしまって無駄? + if let stream = stream { + stream.videoRenderer = uiView + } + + if rendering { + if uiView.isRendering { + uiView.stop() + } + } else if !uiView.isRendering { + uiView.start() + } + } + + // TODO: 不要? + /* + func makeCoordinator() -> Coordinator { + Coordinator(self) + } + + final class Coordinator { + var video: Video + + init(_ video: Video) { + self.video = video + } + } + */ +} From 0b061c354bd9fc85df3e7f92597b743fb4aeb4a5 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Wed, 27 Apr 2022 16:47:44 +0900 Subject: [PATCH 08/10] =?UTF-8?q?SwiftUI=20=E3=81=AE=E3=82=B3=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=82=92=E9=96=93=E9=81=95=E3=81=88=E3=81=A6=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E3=81=97=E3=81=A6=E3=81=97=E3=81=BE=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E6=B6=88=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SoraQuickStart.xcodeproj/project.pbxproj | 383 ------------------ .../AccentColor.colorset/Contents.json | 11 - .../AppIcon.appiconset/Contents.json | 93 ----- .../Assets.xcassets/Contents.json | 6 - SwiftUI/SoraQuickStart/ContentView.swift | 124 ------ .../SoraQuickStart/Environment.example.swift | 12 - .../Preview Assets.xcassets/Contents.json | 6 - .../SoraQuickStart/SoraQuickStartApp.swift | 10 - SwiftUI/SoraQuickStart/Video.swift | 49 --- 9 files changed, 694 deletions(-) delete mode 100644 SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj delete mode 100644 SwiftUI/SoraQuickStart/Assets.xcassets/AccentColor.colorset/Contents.json delete mode 100644 SwiftUI/SoraQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 SwiftUI/SoraQuickStart/Assets.xcassets/Contents.json delete mode 100644 SwiftUI/SoraQuickStart/ContentView.swift delete mode 100644 SwiftUI/SoraQuickStart/Environment.example.swift delete mode 100644 SwiftUI/SoraQuickStart/Preview Content/Preview Assets.xcassets/Contents.json delete mode 100644 SwiftUI/SoraQuickStart/SoraQuickStartApp.swift delete mode 100644 SwiftUI/SoraQuickStart/Video.swift diff --git a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj b/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj deleted file mode 100644 index b872f9d..0000000 --- a/SwiftUI/SoraQuickStart.xcodeproj/project.pbxproj +++ /dev/null @@ -1,383 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 55; - objects = { - -/* Begin PBXBuildFile section */ - 916439A32819095600A062E9 /* SoraQuickStartApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439A22819095600A062E9 /* SoraQuickStartApp.swift */; }; - 916439A52819095600A062E9 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439A42819095600A062E9 /* ContentView.swift */; }; - 916439A72819095700A062E9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 916439A62819095700A062E9 /* Assets.xcassets */; }; - 916439AA2819095700A062E9 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 916439A92819095700A062E9 /* Preview Assets.xcassets */; }; - 916439B128190CE000A062E9 /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439B028190CE000A062E9 /* Environment.swift */; }; - 916439B42819125900A062E9 /* Sora in Frameworks */ = {isa = PBXBuildFile; productRef = 916439B32819125900A062E9 /* Sora */; }; - 916439B62819137300A062E9 /* Video.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916439B52819137300A062E9 /* Video.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 9164399F2819095600A062E9 /* SoraQuickStart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SoraQuickStart.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 916439A22819095600A062E9 /* SoraQuickStartApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SoraQuickStartApp.swift; sourceTree = ""; }; - 916439A42819095600A062E9 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 916439A62819095700A062E9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 916439A92819095700A062E9 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 916439B028190CE000A062E9 /* Environment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Environment.swift; sourceTree = ""; }; - 916439B52819137300A062E9 /* Video.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Video.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 9164399C2819095600A062E9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 916439B42819125900A062E9 /* Sora in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 916439962819095600A062E9 = { - isa = PBXGroup; - children = ( - 916439A12819095600A062E9 /* SoraQuickStart */, - 916439A02819095600A062E9 /* Products */, - ); - sourceTree = ""; - }; - 916439A02819095600A062E9 /* Products */ = { - isa = PBXGroup; - children = ( - 9164399F2819095600A062E9 /* SoraQuickStart.app */, - ); - name = Products; - sourceTree = ""; - }; - 916439A12819095600A062E9 /* SoraQuickStart */ = { - isa = PBXGroup; - children = ( - 916439A42819095600A062E9 /* ContentView.swift */, - 916439B028190CE000A062E9 /* Environment.swift */, - 916439A22819095600A062E9 /* SoraQuickStartApp.swift */, - 916439A62819095700A062E9 /* Assets.xcassets */, - 916439A82819095700A062E9 /* Preview Content */, - 916439B52819137300A062E9 /* Video.swift */, - ); - path = SoraQuickStart; - sourceTree = ""; - }; - 916439A82819095700A062E9 /* Preview Content */ = { - isa = PBXGroup; - children = ( - 916439A92819095700A062E9 /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 9164399E2819095600A062E9 /* SoraQuickStart */ = { - isa = PBXNativeTarget; - buildConfigurationList = 916439AD2819095700A062E9 /* Build configuration list for PBXNativeTarget "SoraQuickStart" */; - buildPhases = ( - 9164399B2819095600A062E9 /* Sources */, - 9164399C2819095600A062E9 /* Frameworks */, - 9164399D2819095600A062E9 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SoraQuickStart; - packageProductDependencies = ( - 916439B32819125900A062E9 /* Sora */, - ); - productName = SoraQuickStart; - productReference = 9164399F2819095600A062E9 /* SoraQuickStart.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 916439972819095600A062E9 /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1330; - LastUpgradeCheck = 1330; - TargetAttributes = { - 9164399E2819095600A062E9 = { - CreatedOnToolsVersion = 13.3.1; - }; - }; - }; - buildConfigurationList = 9164399A2819095600A062E9 /* Build configuration list for PBXProject "SoraQuickStart" */; - compatibilityVersion = "Xcode 13.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 916439962819095600A062E9; - packageReferences = ( - 916439B22819125900A062E9 /* XCRemoteSwiftPackageReference "sora-ios-sdk" */, - ); - productRefGroup = 916439A02819095600A062E9 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 9164399E2819095600A062E9 /* SoraQuickStart */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 9164399D2819095600A062E9 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 916439AA2819095700A062E9 /* Preview Assets.xcassets in Resources */, - 916439A72819095700A062E9 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 9164399B2819095600A062E9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 916439A52819095600A062E9 /* ContentView.swift in Sources */, - 916439B62819137300A062E9 /* Video.swift in Sources */, - 916439B128190CE000A062E9 /* Environment.swift in Sources */, - 916439A32819095600A062E9 /* SoraQuickStartApp.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 916439AB2819095700A062E9 /* 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++17"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - 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; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - 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; - 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 = 14.1; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 916439AC2819095700A062E9 /* 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++17"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - 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; - 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_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - 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; - 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 = 14.1; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 916439AE2819095700A062E9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"SoraQuickStart/Preview Content\""; - DEVELOPMENT_TEAM = DQ232CBKHS; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSCameraUsageDescription = WebRTC; - INFOPLIST_KEY_NSMicrophoneUsageDescription = WebRTC; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.SoraQuickStartUI; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 916439AF2819095700A062E9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = "\"SoraQuickStart/Preview Content\""; - DEVELOPMENT_TEAM = 6J8QF53ZZX; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_NSCameraUsageDescription = WebRTC; - INFOPLIST_KEY_NSMicrophoneUsageDescription = WebRTC; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.SoraQuickStart; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 9164399A2819095600A062E9 /* Build configuration list for PBXProject "SoraQuickStart" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 916439AB2819095700A062E9 /* Debug */, - 916439AC2819095700A062E9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 916439AD2819095700A062E9 /* Build configuration list for PBXNativeTarget "SoraQuickStart" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 916439AE2819095700A062E9 /* Debug */, - 916439AF2819095700A062E9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCRemoteSwiftPackageReference section */ - 916439B22819125900A062E9 /* XCRemoteSwiftPackageReference "sora-ios-sdk" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/shiguredo/sora-ios-sdk.git"; - requirement = { - branch = feature/swiftui; - kind = branch; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 916439B32819125900A062E9 /* Sora */ = { - isa = XCSwiftPackageProductDependency; - package = 916439B22819125900A062E9 /* XCRemoteSwiftPackageReference "sora-ios-sdk" */; - productName = Sora; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 916439972819095600A062E9 /* Project object */; -} diff --git a/SwiftUI/SoraQuickStart/Assets.xcassets/AccentColor.colorset/Contents.json b/SwiftUI/SoraQuickStart/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb87897..0000000 --- a/SwiftUI/SoraQuickStart/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/SwiftUI/SoraQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json b/SwiftUI/SoraQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 5a3257a..0000000 --- a/SwiftUI/SoraQuickStart/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/SwiftUI/SoraQuickStart/Assets.xcassets/Contents.json b/SwiftUI/SoraQuickStart/Assets.xcassets/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/SwiftUI/SoraQuickStart/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/SwiftUI/SoraQuickStart/ContentView.swift b/SwiftUI/SoraQuickStart/ContentView.swift deleted file mode 100644 index 038be5a..0000000 --- a/SwiftUI/SoraQuickStart/ContentView.swift +++ /dev/null @@ -1,124 +0,0 @@ -import Sora -import SwiftUI - -struct ContentView: View { - // 接続済みの MediaChannel です。 - @State private var mediaChannel: MediaChannel? - - // 接続試行中にキャンセルするためのオブジェクトです。 - @State private var connectionTask: ConnectionTask? - - @State private var senderStream: MediaStream? - @State private var senderRendering = true - - // 接続済みであれば true を返します。 - var connecting: Bool { - mediaChannel?.isAvailable == true - } - - var body: some View { - VStack { - Video(stream: $senderStream, rendering: $senderRendering) - - HStack { - // ボタンを中央に配置するため、前後にスペースを入れます。 - Spacer() - - Button(action: { - connect() - }, label: { - Circle() - .foregroundColor(.green) - .overlay( - Image(systemName: "play.fill") - .scaleEffect(2.5) - .frame(width: 100, height: 100) - .foregroundColor(.white)) - }) - .frame(width: 100, height: 100) - - Spacer() - } - } - } - - /* - func connect() { - // 接続試行中のタスクが残っていればキャンセルします。 - connectionTask?.cancel() - - if connecting { - // 接続済みであれば接続を解除します。 - if mediaChannel?.isAvailable == true { - mediaChannel?.disconnect(error: nil) - } - mediaChannel = nil - updateUI(false) - } else { - // 未接続なら接続します。 - connect() - updateUI(true) - } - } - */ - - func connect() { - // 接続試行中のタスクが残っていればキャンセルします。 - connectionTask?.cancel() - - // 接続の設定を行います。 - var config = Configuration(urlCandidates: Environment.urls, - channelId: Environment.channelId, - role: .sendrecv, - multistreamEnabled: true) - - // 接続時に指定したいオプションを以下のように設定します。 - config.signalingConnectMetadata = Environment.signalingConnectMetadata - - /* - // ストリームが追加されたら受信用の VideoView をストリームにセットします。 - // このアプリでは、複数のユーザーが接続した場合は最後のユーザーの映像のみ描画します。 - let senderStreamId = config.publisherStreamId - config.mediaChannelHandlers.onAddStream = { stream in - if stream.streamId != senderStreamId { - self.receiverStream = stream - } - } - // 接続先から接続を解除されたときに行う処理です。 - config.mediaChannelHandlers.onDisconnect = { error in - if let error = error { - NSLog(error.localizedDescription) - } - self.receiverStream = nil - } - */ - - // 接続します。 - // connect() の戻り値 ConnectionTask を使うと - // 接続試行中の状態を強制的に終了させることができます。 - connectionTask = Sora.shared.connect(configuration: config) { mediaChannel, error in - // 接続に失敗するとエラーが渡されます。 - if let error = error { - NSLog(error.localizedDescription) - // TODO: 画面更新 - return - } - - // 接続に成功した MediaChannel を保持しておきます。 - self.mediaChannel = mediaChannel - - // 接続できたら配信用の VideoView をストリームにセットします。 - if let stream = mediaChannel!.senderStream { - self.senderStream = stream - NSLog("set sender stream => \(senderStream), \(self.senderStream)") - self.senderRendering = false - } - } - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -} diff --git a/SwiftUI/SoraQuickStart/Environment.example.swift b/SwiftUI/SoraQuickStart/Environment.example.swift deleted file mode 100644 index 64b9dc5..0000000 --- a/SwiftUI/SoraQuickStart/Environment.example.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -enum Environment { - // 接続するサーバーのシグナリング URL - static let url = URL(string: "wss://sora.example.com/signaling")! - - // チャネル ID - static let channelId = "sora" - - // type: connect に含めるメタデータ - static let signalingConnectMetadata: Encodable? = nil -} diff --git a/SwiftUI/SoraQuickStart/Preview Content/Preview Assets.xcassets/Contents.json b/SwiftUI/SoraQuickStart/Preview Content/Preview Assets.xcassets/Contents.json deleted file mode 100644 index 73c0059..0000000 --- a/SwiftUI/SoraQuickStart/Preview Content/Preview Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/SwiftUI/SoraQuickStart/SoraQuickStartApp.swift b/SwiftUI/SoraQuickStart/SoraQuickStartApp.swift deleted file mode 100644 index 276edf4..0000000 --- a/SwiftUI/SoraQuickStart/SoraQuickStartApp.swift +++ /dev/null @@ -1,10 +0,0 @@ -import SwiftUI - -@main -struct SoraQuickStartApp: App { - var body: some Scene { - WindowGroup { - ContentView() - } - } -} diff --git a/SwiftUI/SoraQuickStart/Video.swift b/SwiftUI/SoraQuickStart/Video.swift deleted file mode 100644 index 586b7f7..0000000 --- a/SwiftUI/SoraQuickStart/Video.swift +++ /dev/null @@ -1,49 +0,0 @@ -import Foundation -import Sora -import SwiftUI - -struct Video: UIViewRepresentable { - typealias UIViewType = VideoView - - @Binding var stream: MediaStream? - @Binding var rendering: Bool - - func makeUIView(context: Context) -> VideoView { - NSLog("\(#function)") - let view = VideoView() - view.start() - return view - } - - func updateUIView(_ uiView: VideoView, context: Context) { - NSLog("\(#function)") - - // TODO: これだと毎度 renderer がセットされてしまって無駄? - if let stream = stream { - stream.videoRenderer = uiView - } - - if rendering { - if uiView.isRendering { - uiView.stop() - } - } else if !uiView.isRendering { - uiView.start() - } - } - - // TODO: 不要? - /* - func makeCoordinator() -> Coordinator { - Coordinator(self) - } - - final class Coordinator { - var video: Video - - init(_ video: Video) { - self.video = video - } - } - */ -} From 0ddaccc5b7fd29e9e4646b399db3dbf21039237e Mon Sep 17 00:00:00 2001 From: miosakuma Date: Thu, 19 May 2022 15:48:38 +0900 Subject: [PATCH 09/10] =?UTF-8?q?=E5=A4=89=E6=9B=B4=E5=B1=A5=E6=AD=B4?= =?UTF-8?q?=E3=81=AE=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index e2f1607..25d5a40 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,9 @@ ## develop +- [ADD] 接続失敗時とサーバーによる切断時にエラー内容をアラートで表示する + - @szktty + ## sora-ios-sdk-2022.2.0 - [UPDATE] Environment.example.swift に signalingConnectMetadata を追加する From 43ed6615da10ca20d3ee536d0d9407931412065a Mon Sep 17 00:00:00 2001 From: miosakuma Date: Fri, 10 Jun 2022 14:56:31 +0900 Subject: [PATCH 10/10] =?UTF-8?q?iOS=20SDK=202022.3.0=20=E3=83=AA=E3=83=AA?= =?UTF-8?q?=E3=83=BC=E3=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 2 ++ Podfile | 2 +- README.md | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 25d5a40..2b27c5d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,8 @@ ## develop +## sora-ios-sdk-2022.3.0 + - [ADD] 接続失敗時とサーバーによる切断時にエラー内容をアラートで表示する - @szktty diff --git a/Podfile b/Podfile index dcf10ea..8962440 100644 --- a/Podfile +++ b/Podfile @@ -5,7 +5,7 @@ platform :ios, '13.0' target 'SoraQuickStart' do use_frameworks! - pod 'Sora', :git => 'https://github.com/shiguredo/sora-ios-sdk.git', :branch => 'develop' + pod 'Sora', '2022.3.0' pod 'SwiftLint' pod 'SwiftFormat/CLI' diff --git a/README.md b/README.md index 4bf25d3..842d19e 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ Please read https://github.com/shiguredo/oss before use. - iOS 13 以降 - アーキテクチャ arm64, x86_64 (シミュレーターの動作は未保証) - macOS 12.2 以降 -- Xcode 13.2 -- Swift 5.5.2 +- Xcode 13.4 +- Swift 5.6.1 - CocoaPods 1.11.2 以降 - WebRTC SFU Sora 2021.2 以降