From 8a3ebeb32781865c7b76418b79f22d813097667e Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Tue, 2 Nov 2021 17:02:33 +0900 Subject: [PATCH 01/21] =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB?= =?UTF-8?q?=E3=81=AA=E8=A8=AD=E5=AE=9A=E3=82=92=20Environment.swift=20?= =?UTF-8?q?=E3=81=AB=E3=81=BE=E3=81=A8=E3=82=81=E3=82=8B=E3=80=82=20Enviro?= =?UTF-8?q?nment.swift=20=E3=81=AF=E3=83=AA=E3=83=9D=E3=82=B8=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=81=AB=E5=90=AB=E3=82=81=E3=81=9A=E3=80=81=20Enviro?= =?UTF-8?q?nment.swift.example=20=E3=82=92=E3=82=B3=E3=83=94=E3=83=BC?= =?UTF-8?q?=E3=81=97=E3=81=A6=E4=BD=BF=E3=81=86=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + SoraQuickStart.xcodeproj/project.pbxproj | 4 ++++ SoraQuickStart/Environment.swift.example | 11 +++++++++++ SoraQuickStart/ViewController.swift | 12 +++--------- 4 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 SoraQuickStart/Environment.swift.example diff --git a/.gitignore b/.gitignore index 68b7148..5a9b36e 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ fastlane/screenshots *.swp doc *.xcworkspace +Environment.swift diff --git a/SoraQuickStart.xcodeproj/project.pbxproj b/SoraQuickStart.xcodeproj/project.pbxproj index a1294d0..87d7bea 100644 --- a/SoraQuickStart.xcodeproj/project.pbxproj +++ b/SoraQuickStart.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 91169197273126A80098FBFF /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91169196273126A80098FBFF /* Environment.swift */; }; 91A4844226F9BB5100C18B76 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A4844126F9BB5100C18B76 /* AppDelegate.swift */; }; 91A4844426F9BB5100C18B76 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A4844326F9BB5100C18B76 /* SceneDelegate.swift */; }; 91A4844626F9BB5100C18B76 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91A4844526F9BB5100C18B76 /* ViewController.swift */; }; @@ -16,6 +17,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 91169196273126A80098FBFF /* Environment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Environment.swift; sourceTree = ""; }; 91A4843E26F9BB5100C18B76 /* SoraQuickStart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SoraQuickStart.app; sourceTree = BUILT_PRODUCTS_DIR; }; 91A4844126F9BB5100C18B76 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 91A4844326F9BB5100C18B76 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -63,6 +65,7 @@ 91A4844A26F9BB5100C18B76 /* Assets.xcassets */, 91A4844C26F9BB5100C18B76 /* LaunchScreen.storyboard */, 91A4844F26F9BB5100C18B76 /* Info.plist */, + 91169196273126A80098FBFF /* Environment.swift */, ); path = SoraQuickStart; sourceTree = ""; @@ -138,6 +141,7 @@ buildActionMask = 2147483647; files = ( 91A4844626F9BB5100C18B76 /* ViewController.swift in Sources */, + 91169197273126A80098FBFF /* Environment.swift in Sources */, 91A4844226F9BB5100C18B76 /* AppDelegate.swift in Sources */, 91A4844426F9BB5100C18B76 /* SceneDelegate.swift in Sources */, ); diff --git a/SoraQuickStart/Environment.swift.example b/SoraQuickStart/Environment.swift.example new file mode 100644 index 0000000..71f8a24 --- /dev/null +++ b/SoraQuickStart/Environment.swift.example @@ -0,0 +1,11 @@ +import Foundation + +enum Environment { + + // 接続するサーバーのシグナリング URL + static let url = URL(string: "wss://sora.example.com/signaling")! + + // チャネル ID + static let channelId = "sora" + +} diff --git a/SoraQuickStart/ViewController.swift b/SoraQuickStart/ViewController.swift index 660a4fc..497b6d7 100644 --- a/SoraQuickStart/ViewController.swift +++ b/SoraQuickStart/ViewController.swift @@ -1,12 +1,6 @@ import UIKit import Sora -// 接続するサーバーのシグナリング URL -let soraURL = URL(string: "wss://sora.example.com/signaling")! - -// チャネル ID -let soraChannelId = "sora" - class ViewController: UIViewController { @IBOutlet weak var senderVideoView: VideoView! @@ -28,7 +22,7 @@ class ViewController: UIViewController { super.viewDidLoad() Logger.shared.level = .debug - navigationItem.title = "\(soraChannelId)" + navigationItem.title = "\(Environment.channelId)" } // 接続ボタンの UI を更新します。 @@ -66,8 +60,8 @@ class ViewController: UIViewController { func connect() { // 接続の設定を行います。 - let config = Configuration(url: soraURL, - channelId: soraChannelId, + let config = Configuration(url: Environment.url, + channelId: Environment.channelId, role: .sendrecv, multistreamEnabled: true) From 7a8b8177f6b7d1bb256f8ec1ccf06011fc05e666 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Fri, 26 Nov 2021 14:55:20 +0900 Subject: [PATCH 02/21] =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=82=AF=E3=83=95?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0a5fce6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,60 @@ +name: Build + +on: + push: + paths-ignore: + - 'README.md' + - 'CHANGES.md' + - 'LICENSE' + schedule: + - cron: "0 0 * * *" + +jobs: + build: + runs-on: macOS-latest + env: + XCODE: /Applications/Xcode_12.4.app + XCODE_SDK: iphoneos14.4 + steps: + - uses: actions/checkout@v2 + - name: Select Xcode Version + run: sudo xcode-select -s '${{ env.XCODE }}/Contents/Developer' + - name: Show Xcode Version + run: xcodebuild -version + - name: Show CocoaPods Version + run: pod --version + - name: Install Dependences + run: | + pod repo update + pod install + - name: Build Xcode Project + run: | + set -o pipefail && \ + xcodebuild \ + -workspace 'SoraQuickStart.xcworkspace' \ + -scheme 'SoraQuickStart' \ + -sdk ${{ env.XCODE_SDK }} \ + -configuration Release \ + -derivedDataPath build \ + clean build \ + CODE_SIGNING_REQUIRED=NO \ + CODE_SIGN_IDENTITY= \ + PROVISIONING_PROFILE= + release: + if: contains(github.ref, 'tags/v') + needs: [build] + runs-on: macOS-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Create Release + id: create_release + uses: actions/create-release@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + From 55f5da759ce368b779092454bdad15dab085ae8a Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Fri, 26 Nov 2021 15:01:39 +0900 Subject: [PATCH 03/21] =?UTF-8?q?SwiftLint=20=E3=81=A8=20SwiftFormat=20?= =?UTF-8?q?=E3=82=92=E5=B0=8E=E5=85=A5=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 3 ++ SoraQuickStart.xcodeproj/project.pbxproj | 41 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/Podfile b/Podfile index e17a4fd..2253a3d 100644 --- a/Podfile +++ b/Podfile @@ -7,6 +7,9 @@ target 'SoraQuickStart' do use_frameworks! pod 'Sora', '2021.2.1' + pod 'SwiftLint' + pod 'SwiftFormat/CLI' + # シミュレーターのビルド用の設定です。 arm64 を除いてビルドします。 # Sora iOS SDK はシミュレーターでのビルドと動作をサポートしませんので、 # あくまで参考例としてご利用ください。 diff --git a/SoraQuickStart.xcodeproj/project.pbxproj b/SoraQuickStart.xcodeproj/project.pbxproj index cb3f9e5..0b97c3d 100644 --- a/SoraQuickStart.xcodeproj/project.pbxproj +++ b/SoraQuickStart.xcodeproj/project.pbxproj @@ -74,6 +74,8 @@ isa = PBXNativeTarget; buildConfigurationList = 91A4845226F9BB5100C18B76 /* Build configuration list for PBXNativeTarget "SoraQuickStart" */; buildPhases = ( + 915772F6274E183500A17984 /* Run SwiftFormat */, + 915772F7274E184100A17984 /* Run SwiftLint */, 91A4843A26F9BB5100C18B76 /* Sources */, 91A4843B26F9BB5100C18B76 /* Frameworks */, 91A4843C26F9BB5100C18B76 /* Resources */, @@ -132,6 +134,45 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 915772F6274E183500A17984 /* Run SwiftFormat */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Run SwiftFormat"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if which \"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" >/dev/null; then\n \"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat\" \"$SRCROOT\"\nelse\n echo \"warning: SwiftFormat not installed, download from https://github.com/nicklockwood/SwiftFormat\"\nfi\n"; + }; + 915772F7274E184100A17984 /* Run SwiftLint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Run SwiftLint"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if which \"${PODS_ROOT}/SwiftLint/swiftlint\" >/dev/null; then\n ${PODS_ROOT}/SwiftLint/swiftlint --fix\n ${PODS_ROOT}/SwiftLint/swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 91A4843A26F9BB5100C18B76 /* Sources */ = { isa = PBXSourcesBuildPhase; From 08654a25b3896f92c6716b6026c29b06785eddc0 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Fri, 26 Nov 2021 15:04:07 +0900 Subject: [PATCH 04/21] =?UTF-8?q?SwiftLint,=20SwiftFormat=20=E3=81=AE?= =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=AB=E3=82=92=E8=A8=AD=E5=AE=9A=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .swift-version | 1 + .swiftformat | 8 ++++++++ .swiftlint.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 .swift-version create mode 100644 .swiftformat create mode 100644 .swiftlint.yml diff --git a/.swift-version b/.swift-version new file mode 100644 index 0000000..7acd1cb --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +5.5.1 diff --git a/.swiftformat b/.swiftformat new file mode 100644 index 0000000..2c72698 --- /dev/null +++ b/.swiftformat @@ -0,0 +1,8 @@ +--exclude Pods +--indent 4 +--semicolons inline +--trailingclosures +--wrapparameters after-first +--header strip + +--disable redundantInit,sortedSwitchCases,strongOutlets,unusedArguments,wrapSwitchCases diff --git a/.swiftlint.yml b/.swiftlint.yml new file mode 100644 index 0000000..7510890 --- /dev/null +++ b/.swiftlint.yml @@ -0,0 +1,41 @@ +included: + - Sora +excluded: + - Pods +disabled_rules: + - identifier_name + - force_cast + - force_try + - cyclomatic_complexity + - function_body_length + - file_length + - line_length + - type_body_length + - weak_delegate + - opening_brace + - closing_brace + - anonymous_argument_in_multiline_closure + - conditional_returns_on_newline + - multiline_arguments + - multiline_arguments_brackets + - multiline_literal_brackets + - multiline_parameters + - multiline_parameters_brackets + - vertical_parameter_alignment + - vertical_parameter_alignment_on_call + - vertical_whitespace + - vertical_whitespace_between_cases + - vertical_whitespace_closing_braces + - vertical_whitespace_opening_braces + - colon + - comma + - comment_spacing + - trailing_comma + - trailing_newline + - trailing_whitespace + - closure_parameter_position + - closure_end_indentation + - closure_spacing + - for_where + - large_tuple + - todo \ No newline at end of file From 96513a41afe3397455135deea4733fb552eda1d8 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Fri, 26 Nov 2021 16:09:48 +0900 Subject: [PATCH 05/21] =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB?= =?UTF-8?q?=E3=81=A7=20lint/formatter=20=E3=82=92=E5=AE=9F=E8=A1=8C?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=B9=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=80=81=E3=83=AF=E3=83=BC?= =?UTF-8?q?=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC=E3=81=A7=E3=82=82=E5=AE=9F?= =?UTF-8?q?=E8=A1=8C=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 3 +++ lint-format.sh | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100755 lint-format.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a5fce6..f1551a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,6 +40,9 @@ jobs: CODE_SIGNING_REQUIRED=NO \ CODE_SIGN_IDENTITY= \ PROVISIONING_PROFILE= + - name: Check uncommitted unformatted code + run: | + ./lint-format.sh release: if: contains(github.ref, 'tags/v') needs: [build] diff --git a/lint-format.sh b/lint-format.sh new file mode 100755 index 0000000..d2ea53b --- /dev/null +++ b/lint-format.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# ローカルで lint と formatter を実行するスクリプト +# 未フォーマットか lint でルール違反を検出したら終了ステータス 1 を返す +# GitHub Actions では未フォーマット箇所の有無の確認に使う + +PODS_ROOT=Pods +SRCROOT=. +FORMAT=${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat +LINT=${PODS_ROOT}/SwiftLint/swiftlint + +# フォーマットの必要性を確認する +$FORMAT --lint $SRCROOT +format=$? + +$FORMAT $SRCROOT +$LINT --fix $SRCROOT +$LINT --strict $SRCROOT +lint=$? + +test $format -eq 0 -a $lint -eq 0 +exit $? \ No newline at end of file From 61ab1e7894ed4f104de1cdafb5b00c352a0d068b Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Fri, 26 Nov 2021 16:09:59 +0900 Subject: [PATCH 06/21] =?UTF-8?q?CocoaPods=20=E3=81=AE=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=83=96=E3=83=A9=E3=83=AA=E3=82=92=E3=82=AD=E3=83=A3=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A5=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1551a7..6964a2e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,13 @@ jobs: run: xcodebuild -version - name: Show CocoaPods Version run: pod --version + - name: Restore Pods + uses: actions/cache@v2 + with: + path: Pods + key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- - name: Install Dependences run: | pod repo update From 7f3e8c7a9b2d331fd614aaba134ba6194fb8575b Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Fri, 26 Nov 2021 16:52:05 +0900 Subject: [PATCH 07/21] =?UTF-8?q?=E7=BD=B2=E5=90=8D=E3=81=AA=E3=81=97?= =?UTF-8?q?=E3=81=A7=E3=81=AE=E3=83=93=E3=83=AB=E3=83=89=E3=82=92=E8=A8=B1?= =?UTF-8?q?=E5=8F=AF=E3=81=99=E3=82=8B=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=99=E3=82=8B=20(Xcode?= =?UTF-8?q?=2011=20=E4=BB=A5=E9=99=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6964a2e..1a7da08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,7 @@ jobs: -derivedDataPath build \ clean build \ CODE_SIGNING_REQUIRED=NO \ + CODE_SIGNING_ALLOWED=NO \ CODE_SIGN_IDENTITY= \ PROVISIONING_PROFILE= - name: Check uncommitted unformatted code From deb86f04beef9f1a3a5b0f9bbca177c3611b2d72 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Fri, 26 Nov 2021 16:53:16 +0900 Subject: [PATCH 08/21] =?UTF-8?q?CocoaPods=20=E3=81=AE=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=83=96=E3=83=A9=E3=83=AA=E3=81=AE=20iOS=20=E9=81=8B=E7=94=A8?= =?UTF-8?q?=E3=82=BF=E3=83=BC=E3=82=B2=E3=83=83=E3=83=88=E3=82=92=2010.0?= =?UTF-8?q?=20=E3=81=AB=E3=81=99=E3=82=8B=E3=80=82=E3=83=87=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=AB=E3=83=88=E3=81=AE=208.0=20=E3=81=A0=E3=81=A8?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB=E3=81=AE=20xcodebuild=20?= =?UTF-8?q?=E3=81=A7=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Podfile b/Podfile index 2253a3d..f599456 100644 --- a/Podfile +++ b/Podfile @@ -9,7 +9,15 @@ target 'SoraQuickStart' do pod 'SwiftLint' pod 'SwiftFormat/CLI' - + + post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' + end + end + end + # シミュレーターのビルド用の設定です。 arm64 を除いてビルドします。 # Sora iOS SDK はシミュレーターでのビルドと動作をサポートしませんので、 # あくまで参考例としてご利用ください。 From 7ac62975b8caed4f6fd5ba98d2a7bc90d42aa337 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Mon, 29 Nov 2021 15:47:02 +0900 Subject: [PATCH 09/21] =?UTF-8?q?lint=20=E5=AF=BE=E8=B1=A1=E3=81=AE?= =?UTF-8?q?=E3=83=91=E3=82=B9=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .swiftlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 7510890..fd1e8a3 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -1,5 +1,5 @@ included: - - Sora + - SoraQuickStart excluded: - Pods disabled_rules: From 6a0289aab62726ee0cf3f0fe4c533686b0bad235 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Mon, 29 Nov 2021 17:15:55 +0900 Subject: [PATCH 10/21] =?UTF-8?q?[GitHub=20Actions]=20=E3=82=A2=E3=83=BC?= =?UTF-8?q?=E3=82=AD=E3=83=86=E3=82=AF=E3=83=81=E3=83=A3=E3=82=92=20arm64?= =?UTF-8?q?=20=E3=81=AE=E3=81=BF=E3=81=AB=E6=8C=87=E5=AE=9A=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a7da08..0645f92 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,7 @@ jobs: -workspace 'SoraQuickStart.xcworkspace' \ -scheme 'SoraQuickStart' \ -sdk ${{ env.XCODE_SDK }} \ + -arch arm64 \ -configuration Release \ -derivedDataPath build \ clean build \ From c7ee7ceb2277e47e6024c0b18ba5c070caaba1ff Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Tue, 30 Nov 2021 15:33:41 +0900 Subject: [PATCH 11/21] =?UTF-8?q?lint,formatter=20=E3=82=92=E9=81=A9?= =?UTF-8?q?=E7=94=A8=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SoraQuickStart/AppDelegate.swift | 10 ++-------- SoraQuickStart/SceneDelegate.swift | 5 ----- SoraQuickStart/ViewController.swift | 9 +++------ 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/SoraQuickStart/AppDelegate.swift b/SoraQuickStart/AppDelegate.swift index 34ca27d..0954a6f 100644 --- a/SoraQuickStart/AppDelegate.swift +++ b/SoraQuickStart/AppDelegate.swift @@ -2,12 +2,9 @@ import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { - - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. - return true + true } // MARK: UISceneSession Lifecycle @@ -15,7 +12,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { // Called when a new scene session is being created. // Use this method to select a configuration to create the new scene with. - return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) } func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { @@ -23,7 +20,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. // Use this method to release any resources that were specific to the discarded scenes, as they will not return. } - - } - diff --git a/SoraQuickStart/SceneDelegate.swift b/SoraQuickStart/SceneDelegate.swift index 8778aa8..44a4ad5 100644 --- a/SoraQuickStart/SceneDelegate.swift +++ b/SoraQuickStart/SceneDelegate.swift @@ -1,10 +1,8 @@ import UIKit class SceneDelegate: UIResponder, UIWindowSceneDelegate { - var window: UIWindow? - func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. @@ -39,7 +37,4 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { // Use this method to save data, release shared resources, and store enough scene-specific state information // to restore the scene back to its current state. } - - } - diff --git a/SoraQuickStart/ViewController.swift b/SoraQuickStart/ViewController.swift index 30fe354..b9ecfb0 100644 --- a/SoraQuickStart/ViewController.swift +++ b/SoraQuickStart/ViewController.swift @@ -1,5 +1,5 @@ -import UIKit import Sora +import UIKit // 接続するサーバーのシグナリング URL let soraURL = URL(string: "wss://sora.example.com/signaling")! @@ -8,7 +8,6 @@ let soraURL = URL(string: "wss://sora.example.com/signaling")! let soraChannelId = "sora" class ViewController: UIViewController { - @IBOutlet weak var senderVideoView: VideoView! @IBOutlet weak var receiverVideoView: VideoView! @IBOutlet weak var connectImageView: UIImageView! @@ -27,7 +26,7 @@ class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() Logger.shared.level = .debug - + navigationItem.title = "\(soraChannelId)" } @@ -70,7 +69,7 @@ class ViewController: UIViewController { channelId: soraChannelId, role: .sendrecv, multistreamEnabled: true) - + // ストリームが追加されたら受信用の VideoView をストリームにセットします。 // このアプリでは、複数のユーザーが接続した場合は最後のユーザーの映像のみ描画します。 let publisherStreamId = config.publisherStreamId @@ -113,6 +112,4 @@ class ViewController: UIViewController { } } } - } - From 2ee56042cc53f8d38b5482f7bf549747668ddd1c Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Tue, 30 Nov 2021 15:51:33 +0900 Subject: [PATCH 12/21] =?UTF-8?q?lint=20=E3=81=AE=E7=B5=90=E6=9E=9C?= =?UTF-8?q?=E3=82=92=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=A7=E3=81=AF=E3=81=AA?= =?UTF-8?q?=E3=81=8F=E8=AD=A6=E5=91=8A=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lint-format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lint-format.sh b/lint-format.sh index d2ea53b..834377c 100755 --- a/lint-format.sh +++ b/lint-format.sh @@ -15,7 +15,7 @@ format=$? $FORMAT $SRCROOT $LINT --fix $SRCROOT -$LINT --strict $SRCROOT +$LINT $SRCROOT lint=$? test $format -eq 0 -a $lint -eq 0 From 6d1c18f1047149418c32a4f7b6920df079e698be Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Tue, 30 Nov 2021 16:01:29 +0900 Subject: [PATCH 13/21] =?UTF-8?q?CocoaPods=20CDN=20=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=86?= 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 f599456..d522aa2 100644 --- a/Podfile +++ b/Podfile @@ -1,4 +1,4 @@ -source 'https://github.com/shiguredo/sora-ios-sdk-specs.git' +source 'https://cdn.cocoapods.org/' source 'https://github.com/CocoaPods/Specs.git' platform :ios, '12.1' From 5ee55ebfd12ef93980f45e89b7d08b3c4dfa5112 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Tue, 30 Nov 2021 16:16:30 +0900 Subject: [PATCH 14/21] =?UTF-8?q?=E9=96=93=E9=81=95=E3=81=88=E3=81=A6=20so?= =?UTF-8?q?ra-ios-sdk-specs=20=E3=82=92=E6=B6=88=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=81=97=E3=81=BE=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE?= =?UTF-8?q?=E3=81=A7=E6=88=BB=E3=81=99?= 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 d522aa2..9f1a4c3 100644 --- a/Podfile +++ b/Podfile @@ -1,5 +1,5 @@ source 'https://cdn.cocoapods.org/' -source 'https://github.com/CocoaPods/Specs.git' +source 'https://github.com/shiguredo/sora-ios-sdk-specs.git' platform :ios, '12.1' From 100210aa8e22c86cb770305a784f75e25f8512f8 Mon Sep 17 00:00:00 2001 From: enm10k Date: Wed, 12 Jan 2022 20:51:53 +0900 Subject: [PATCH 15/21] =?UTF-8?q?=E3=82=B5=E3=83=9D=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=99=E3=82=8B=20iOS=20=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=9213=E4=BB=A5=E4=B8=8A=E3=81=AB?= =?UTF-8?q?=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 | 3 +-- README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Podfile b/Podfile index 4a4871f..3064252 100644 --- a/Podfile +++ b/Podfile @@ -1,10 +1,9 @@ source 'https://github.com/shiguredo/sora-ios-sdk-specs.git' source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '12.1' +platform :ios, '13.0' target 'SoraQuickStart' do use_frameworks! pod 'Sora', '2021.3.0' - end diff --git a/README.md b/README.md index 8939e88..3901cf1 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Please read https://github.com/shiguredo/oss before use. ## システム条件 -- iOS 12.1 以降 +- iOS 13 以降 - アーキテクチャ arm64, x86_64 (シミュレーターの動作は未保証) - macOS 12.0 以降 - Xcode 13.1 From f7d8bfa284de2065d5826a2c79bc54bb7629b420 Mon Sep 17 00:00:00 2001 From: miosakuma Date: Thu, 27 Jan 2022 10:44:15 +0900 Subject: [PATCH 16/21] =?UTF-8?q?develop=20=E3=83=96=E3=83=A9=E3=83=B3?= =?UTF-8?q?=E3=83=81=E3=81=AE=E5=A0=B4=E5=90=88=E3=81=AF=20Environment.swi?= =?UTF-8?q?ft=20=E3=82=92=E4=BD=BF=E3=81=86=E3=82=88=E3=81=86=E6=B3=A8?= =?UTF-8?q?=E8=A8=98=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3901cf1..fe347be 100644 --- a/README.md +++ b/README.md @@ -34,4 +34,6 @@ Xcode と Swift のバージョンによっては、 Carthage と CocoaPods で $ pod install ``` -2. ``SoraQuickStart.xcworkspace`` を Xcode で開いてビルドします。 +2. (develop ブランチの場合) ``SoraQuickStart/Environment.swift.example`` のファイル名を ``SoraQuickStart/Environment.swift`` に変更し、接続情報を設定します。 + +3. ``SoraQuickStart.xcworkspace`` を Xcode で開いてビルドします。 From effcd5d02fd7d39700adf257c8e405b018b37ad0 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Thu, 27 Jan 2022 16:03:26 +0900 Subject: [PATCH 17/21] =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E5=90=8D=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{Environment.swift.example => Environment.example.swift} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename SoraQuickStart/{Environment.swift.example => Environment.example.swift} (100%) diff --git a/SoraQuickStart/Environment.swift.example b/SoraQuickStart/Environment.example.swift similarity index 100% rename from SoraQuickStart/Environment.swift.example rename to SoraQuickStart/Environment.example.swift From 957bde593e1399de1932732303510c5313de67a9 Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Thu, 27 Jan 2022 16:07:54 +0900 Subject: [PATCH 18/21] =?UTF-8?q?[CI]=20Environment.swift=20=E3=82=92?= =?UTF-8?q?=E7=94=9F=E6=88=90=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0645f92..3e8f379 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,8 @@ jobs: run: | pod repo update pod install + - name: Create Environment.swift + run: cp SoraQuickStart/Environment.example.swift SoraQuickStart/Environment.swift - name: Build Xcode Project run: | set -o pipefail && \ From 7745edaa9c7d2775d22755e88e31eb0f1f6cd64d Mon Sep 17 00:00:00 2001 From: SUZUKI Tetsuya Date: Thu, 27 Jan 2022 16:09:49 +0900 Subject: [PATCH 19/21] =?UTF-8?q?Environment.swift=20=E3=81=AB=E3=81=A4?= =?UTF-8?q?=E3=81=84=E3=81=A6=E3=81=AE=E8=AA=AC=E6=98=8E=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fe347be..47b5668 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,6 @@ Xcode と Swift のバージョンによっては、 Carthage と CocoaPods で $ pod install ``` -2. (develop ブランチの場合) ``SoraQuickStart/Environment.swift.example`` のファイル名を ``SoraQuickStart/Environment.swift`` に変更し、接続情報を設定します。 +2. (develop ブランチの場合) ``SoraQuickStart/Environment.example.swift`` のファイル名を ``SoraQuickStart/Environment.swift`` に変更し、接続情報を設定します。 3. ``SoraQuickStart.xcworkspace`` を Xcode で開いてビルドします。 From c6e768b7aad4414eeba149af512395b014df746c Mon Sep 17 00:00:00 2001 From: miosakuma Date: Tue, 1 Feb 2022 15:24:24 +0900 Subject: [PATCH 20/21] =?UTF-8?q?Podfile=20=E3=81=8B=E3=82=89=20IPHONEOS?= =?UTF-8?q?=5FDEPLOYMENT=5FTARGET=E3=81=AE=E6=8C=87=E5=AE=9A=E3=82=92?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/Podfile b/Podfile index f7c7c9c..d4aa8e2 100644 --- a/Podfile +++ b/Podfile @@ -10,21 +10,4 @@ target 'SoraQuickStart' do pod 'SwiftLint' pod 'SwiftFormat/CLI' - post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' - end - end - end - -# シミュレーターのビルド用の設定です。 arm64 を除いてビルドします。 -# Sora iOS SDK はシミュレーターでのビルドと動作をサポートしませんので、 -# あくまで参考例としてご利用ください。 -# -# post_install do |installer| -# installer.pods_project.build_configurations.each do |config| -# config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" -# end - end From 31aac9577f4bcd82cfbf8c63be720d47c25487d7 Mon Sep 17 00:00:00 2001 From: miosakuma Date: Thu, 3 Feb 2022 15:14:27 +0900 Subject: [PATCH 21/21] =?UTF-8?q?iOS=20SDK=202022.1.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 --- Podfile | 2 +- README.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Podfile b/Podfile index d4aa8e2..d35aa83 100644 --- a/Podfile +++ b/Podfile @@ -5,7 +5,7 @@ platform :ios, '13.0' target 'SoraQuickStart' do use_frameworks! - pod 'Sora', '2021.3.1' + pod 'Sora', '2022.1.0' pod 'SwiftLint' pod 'SwiftFormat/CLI' diff --git a/README.md b/README.md index 47b5668..98c7568 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,11 @@ Please read https://github.com/shiguredo/oss before use. - iOS 13 以降 - アーキテクチャ arm64, x86_64 (シミュレーターの動作は未保証) -- macOS 12.0 以降 -- Xcode 13.1 -- Swift 5.5 +- macOS 12.2 以降 +- Xcode 13.2 +- Swift 5.5.2 - CocoaPods 1.11.2 以降 -- WebRTC SFU Sora 2021.1 以降 +- WebRTC SFU Sora 2021.2 以降 Xcode と Swift のバージョンによっては、 Carthage と CocoaPods で取得できるバイナリに互換性がない可能性があります。詳しくは[ Sora iOS SDK ドキュメント](https://sora-ios-sdk.shiguredo.jp/) を参照してください。 @@ -34,6 +34,6 @@ Xcode と Swift のバージョンによっては、 Carthage と CocoaPods で $ pod install ``` -2. (develop ブランチの場合) ``SoraQuickStart/Environment.example.swift`` のファイル名を ``SoraQuickStart/Environment.swift`` に変更し、接続情報を設定します。 +2. ``SoraQuickStart/Environment.example.swift`` のファイル名を ``SoraQuickStart/Environment.swift`` に変更し、接続情報を設定します。 -3. ``SoraQuickStart.xcworkspace`` を Xcode で開いてビルドします。 +3. ``SoraQuickStart.xcworkspace`` を Xcode で開いてビルドします。