Skip to content

Commit

Permalink
Merge branch 'release/2022.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
miosakuma committed Jun 29, 2022
2 parents 77f481a + 4f315f7 commit d3184d9
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ theme: apple
min_acl: public
sdk: iphoneos
module: Sora
module_version: 2022.3.0
module_version: 2022.4.0
swift_version: 5.6.1
xcodebuild_arguments:
- -parallelizeTargets
- -sdk
- iphoneos15.2
- iphoneos15.5
- -workspace
- Sora.xcworkspace
- -scheme
Expand Down
19 changes: 18 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@

## develop

## 2022.4.0

- [UPDATE] システム条件を変更する
- macOS 12.3 以降
- WebRTC SFU Sora 2022.1 以降
- @miosakuma
- [UPDATE] WebRTC 103.5060.4.0 に上げる
- @miosakuma
- [ADD] Sora の bundle_id に対応する
- `Configuration.bundleId` を追加する
- @enm10k
- [CHANGE] mid を必須にする
- この修正の結果、 type: offer に mid が含まれない場合は、エラーになります
- @enm10k
- [CHANGE] `Configuration.spotlightEnabled == .enabled` の際に、自動的にサイマルキャストを有効化しない
- サイマルキャストを有効化する場合は明示的に `Configuration.simulcastEnabled == true` を設定してください
- @enm10k

## 2022.3.0

- [UPDATE] システム条件を変更する
Expand All @@ -20,7 +38,6 @@
- [UPDATE] WebRTC 102.5005.7.6 に上げる
- @miosakuma
- [UPDATE] mid に対応する
- @enm10k

## 2022.2.1

Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Foundation
import PackageDescription

let file = "WebRTC-102.5005.7.6/WebRTC.xcframework.zip"
let file = "WebRTC-103.5060.4.0/WebRTC.xcframework.zip"

let package = Package(
name: "Sora",
Expand All @@ -16,7 +16,7 @@ let package = Package(
.binaryTarget(
name: "WebRTC",
url: "https://github.com/shiguredo/sora-ios-sdk-specs/releases/download/\(file)",
checksum: "5554e0bb76ee56584d2e3a317dd01a27804dc6411c7ae163cec525c668262a44"
checksum: "237dcac806176bf46db759b8dd2b9d39542ad71414dd07c26a492cdeae91fd19"
),
.target(
name: "Sora",
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ platform :ios, '13.0'

target 'Sora' do
use_frameworks!
pod 'WebRTC', '102.5005.7.6'
pod 'WebRTC', '103.5060.4.0'
end
2 changes: 1 addition & 1 deletion Podfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ platform :ios, '13.0'

target 'Sora' do
use_frameworks!
pod 'WebRTC', '102.5005.7.6'
pod 'WebRTC', '103.5060.4.0'
pod 'SwiftLint', '0.45.1'
pod 'SwiftFormat/CLI', '0.49.0'
end
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sora iOS SDK

[![libwebrtc](https://img.shields.io/badge/libwebrtc-102.5005.7.6-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/5005
[![libwebrtc](https://img.shields.io/badge/libwebrtc-103.5060-blue.svg)](https://chromium.googlesource.com/external/webrtc/+/branch-heads/5060
[![GitHub tag](https://img.shields.io/github/tag/shiguredo/sora-ios-sdk.svg)](https://github.com/shiguredo/sora-ios-sdk)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Expand All @@ -20,11 +20,11 @@ Please read https://github.com/shiguredo/oss before use.

- iOS 13 以降
- アーキテクチャ arm64, x86_64 (シミュレーターの動作は未保証)
- macOS 12.2 以降
- macOS 12.3 以降
- Xcode 13.4
- Swift 5.6.1
- CocoaPods 1.11.2 以降
- WebRTC SFU Sora 2021.2 以降
- WebRTC SFU Sora 2022.1 以降

Xcode と Swift のバージョンによっては、 CocoaPods で取得できるバイナリに互換性がない可能性があります。詳しくはドキュメントを参照してください。

Expand Down
4 changes: 2 additions & 2 deletions Sora.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Sora"
s.version = "2022.3.0"
s.version = "2022.4.0"
s.summary = "Sora iOS SDK"
s.description = <<-DESC
A library to develop Sora client applications.
Expand All @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
}
s.source_files = "Sora/**/*.swift"
s.resources = ['Sora/*.xib']
s.dependency "WebRTC", '102.5005.7.6'
s.dependency "WebRTC", '103.5060.4.0'
s.pod_target_xcconfig = {
'ARCHS' => 'arm64',
'ARCHS[config=Debug]' => '$(ARCHS_STANDARD)'
Expand Down
4 changes: 2 additions & 2 deletions Sora.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2022.3.0;
MARKETING_VERSION = 2022.4.0;
PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.sora.ios.sdk.Sora;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand Down Expand Up @@ -625,7 +625,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2022.3.0;
MARKETING_VERSION = 2022.4.0;
PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.sora.ios.sdk.Sora;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand Down
2 changes: 2 additions & 0 deletions Sora/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public struct Configuration {
/// クライアント ID
public var clientId: String?

/// バンドル ID
public var bundleId: String?
/// ロール
public var role: Role

Expand Down
7 changes: 7 additions & 0 deletions Sora/MediaChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ public final class MediaChannel {
peerChannel.clientId
}

/**
バンドル ID 。接続後にセットされます。
*/
public var bundleId: String? {
peerChannel.bundleId
}

/**
接続 ID 。接続後にセットされます。
*/
Expand Down
10 changes: 5 additions & 5 deletions Sora/PackageInfo.swift
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/// :nodoc:
public enum SDKInfo {
// Sora iOS SDK のバージョンを定義する
public static let version = "2022.3.0"
public static let version = "2022.4.0"
}

/**
WebRTC フレームワークの情報を表します。
*/
public enum WebRTCInfo {
/// WebRTC フレームワークのバージョン
public static let version = "M102"
public static let version = "M103"

/// WebRTC フレームワークのコミットポジション
public static let commitPosition = "7"
public static let commitPosition = "4"

/// WebRTC フレームワークのメンテナンスバージョン
public static let maintenanceVersion = "6"
public static let maintenanceVersion = "0"

/// WebRTC フレームワークのソースコードのリビジョン
public static let revision = "6ff73180ad01aca444c9856f91148eb2b948ce63"
public static let revision = "cd3ae79bce5516336481fd0a689499601b57d1bc"

/// WebRTC フレームワークのソースコードのリビジョン (短縮版)
public static var shortRevision: String {
Expand Down
19 changes: 9 additions & 10 deletions Sora/PeerChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {

var webRTCConfiguration: WebRTCConfiguration
var clientId: String?
var bundleId: String?
var connectionId: String?

var onConnectHandler: ((Error?) -> Void)?
Expand Down Expand Up @@ -288,11 +289,12 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {

let webRTCVersion = "Shiguredo-build \(WebRTCInfo.version) (\(WebRTCInfo.version).\(WebRTCInfo.commitPosition).\(WebRTCInfo.maintenanceVersion) \(WebRTCInfo.shortRevision))"

let simulcast = configuration.simulcastEnabled || configuration.spotlightEnabled == .enabled
let simulcast = configuration.simulcastEnabled
let connect = SignalingConnect(
role: role,
channelId: configuration.channelId,
clientId: configuration.clientId,
bundleId: configuration.bundleId,
metadata: configuration.signalingConnectMetadata,
notifyMetadata: configuration.signalingConnectNotifyMetadata,
sdp: sdp,
Expand Down Expand Up @@ -385,15 +387,11 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
}
}
} else {
// mid なし
if let track = stream.nativeVideoTrack {
nativeChannel.add(track,
streamIds: [stream.nativeStream.streamId])
}
if let track = stream.nativeAudioTrack {
nativeChannel.add(track,
streamIds: [stream.nativeStream.streamId])
}
// mid なしの場合はエラーにする
Logger.error(type: .peerChannel, message: "mid not found")
disconnect(error: SoraError.peerChannelError(reason: "mid not found"),
reason: .signalingFailure)
return
}

// マイクの初期化
Expand Down Expand Up @@ -786,6 +784,7 @@ class PeerChannel: NSObject, RTCPeerConnectionDelegate {
signalingChannel.setConnectedUrl()

clientId = offer.clientId
bundleId = offer.bundleId
connectionId = offer.connectionId
if let dataChannels = offer.dataChannels {
signalingChannel.dataChannelSignaling = true
Expand Down
Loading

0 comments on commit d3184d9

Please sign in to comment.