Skip to content

Commit

Permalink
Merge branch 'hotfix/2.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
SUZUKI Tetsuya committed Apr 16, 2019
2 parents 9d30813 + 11d937a commit d4c6eb1
Show file tree
Hide file tree
Showing 22 changed files with 160 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
macos:
xcode: "10.0.0"
xcode: "10.2.0"
working_directory: ~/sora-ios-sdk
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
Expand Down
2 changes: 1 addition & 1 deletion .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ min_acl: public
sdk: iphoneos
module: Sora
module_version: 2.2.1
swift_version: 4.2.1
swift_version: 5.0
xcodebuild_arguments:
- -parallelizeTargets
- -scheme
Expand Down
24 changes: 24 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,30 @@
- FIX
- バグ修正

## 2.3.0

### CHANGE

- システム条件を更新した

- WebRTC SFU Sora 19.04.0 以降

- macOS 10.14.4 以降

- Xcode 10.2

- Swift 5

- マルチストリーム時に強制的に Plan B に設定していたのを止めた

- 未知のシグナリングメッセージを受信したら例外を発生するように変更した

- シグナリング "notify" の次のイベントに対応した

- "spotlight.changed"

- "network.status"

## 2.2.1

### CHANGE
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Sora iOS SDK に対する有償のサポートについては現在提供して

- iOS 10.0 以降
- アーキテクチャ arm64, armv7 (シミュレーターは非対応)
- macOS 10.14 以降
- Xcode 10.1
- Swift 4.2.1
- Carthage 0.29.0 以降、または CocoaPods 1.5.2 以降
- WebRTC SFU Sora 18.10.0 以降
- macOS 10.14.4 以降
- Xcode 10.2
- Swift 5.0
- Carthage 0.33.0 以降、または CocoaPods 1.6.1 以降
- WebRTC SFU Sora 19.04.0 以降

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

Expand All @@ -51,4 +51,4 @@ Xcode と Swift のバージョンによっては、 Carthage と CocoaPods で

# Copyright

Copyright 2017-2018, Shiguredo Inc. and Masashi Ono (akisute)
Copyright 2017-2019, Shiguredo Inc. and Masashi Ono (akisute)
2 changes: 1 addition & 1 deletion 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 = "2.2.1"
s.version = "2.3.0"
s.summary = "Sora iOS SDK"
s.description = <<-DESC
A library to develop Sora client applications.
Expand Down
14 changes: 8 additions & 6 deletions Sora.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Shiguredo Inc.";
TargetAttributes = {
91C7B0881D54636A006F5FA2 = {
Expand All @@ -326,7 +326,7 @@
};
buildConfigurationList = 91C7B0831D54636A006F5FA2 /* Build configuration list for PBXProject "Sora" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -444,6 +444,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -506,6 +507,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -589,7 +591,7 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VALID_ARCHS = "arm64 armv7";
};
name = Debug;
Expand Down Expand Up @@ -623,7 +625,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VALID_ARCHS = "arm64 armv7";
};
name = Release;
Expand All @@ -645,7 +647,7 @@
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -666,7 +668,7 @@
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Sora.xcodeproj/xcshareddata/xcschemes/Sora.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Sora/CameraVideoCapturer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public extension CameraVideoCapturer {
/**
`CameraVideoCapturer` の設定を表すオブジェクトです。
*/
public struct Settings: CustomStringConvertible {
struct Settings: CustomStringConvertible {

/** デフォルトの設定。 */
public static let `default` = Settings(
Expand Down
10 changes: 9 additions & 1 deletion Sora/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,15 @@ extension Configuration: Codable {
maxNumberOfSpeakers = try container.decode(Int.self,
forKey: .maxNumberOfSpeakers)
}
// TODO: others
webRTCConfiguration = try container.decode(WebRTCConfiguration.self,
forKey: .webRTCConfiguration)
publisherStreamId = try container.decode(String.self,
forKey: .publisherStreamId)
publisherVideoTrackId = try container.decode(String.self,
forKey: .publisherVideoTrackId)
publisherAudioTrackId = try container.decode(String.self,
forKey: .publisherAudioTrackId)
// TODO: channel types
}

public func encode(to encoder: Encoder) throws {
Expand Down
2 changes: 1 addition & 1 deletion Sora/ConnectionTimer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ConnectionTimer {
}
Logger.debug(type: .connectionTimer, message: "all OK")
}
RunLoop.main.add(timer!, forMode: .commonModes)
RunLoop.main.add(timer!, forMode: RunLoop.Mode.common)
isRunning = true
}

Expand Down
6 changes: 6 additions & 0 deletions Sora/Extensions/RTC+Description.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ extension RTCSignalingState: CustomStringConvertible {
case .haveRemoteOffer: return "haveRemoteOffer"
case .haveRemotePrAnswer: return "haveRemotePrAnswer"
case .closed: return "closed"
@unknown default:
fatalError("unknown state")
}
}
}
Expand All @@ -33,6 +35,8 @@ extension RTCIceConnectionState: CustomStringConvertible {
case .disconnected: return "disconnected"
case .closed: return "closed"
case .count: return "count"
@unknown default:
fatalError("unknown state")
}
}
}
Expand All @@ -48,6 +52,8 @@ extension RTCIceGatheringState: CustomStringConvertible {
case .new: return "new"
case .gathering: return "gathering"
case .complete: return "complete"
@unknown default:
fatalError("unknown state")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sora/ICEServerInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ extension ICEServerInfo: Codable {
public convenience init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
let urls = try container.decode([URL].self, forKey: .urls)
let userName = try container.decode(String.self, forKey: .userName)
let credential = try container.decode(String.self, forKey: .credential)
let userName = try container.decodeIfPresent(String.self, forKey: .userName)
let credential = try container.decodeIfPresent(String.self, forKey: .credential)
self.init(urls: urls,
userName: userName,
credential: credential,
Expand Down
2 changes: 1 addition & 1 deletion Sora/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.2.1</string>
<string>2.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
18 changes: 17 additions & 1 deletion Sora/NativePeerChannelFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,23 @@ class NativePeerChannelFactory {

init() {
Logger.debug(type: .peerChannel, message: "create native peer channel factory")
nativeFactory = RTCPeerConnectionFactory()

// 映像コーデックのエンコーダーとデコーダーを用意する
// Sora iOS SDK では VP8, VP9, H.264 が有効
let encoder = RTCDefaultVideoEncoderFactory()
let decoder = RTCDefaultVideoDecoderFactory()
nativeFactory =
RTCPeerConnectionFactory(encoderFactory: encoder,
decoderFactory: decoder)

for info in encoder.supportedCodecs() {
Logger.debug(type: .peerChannel,
message: "supported video encoder: \(info.name) \(info.parameters)")
}
for info in decoder.supportedCodecs() {
Logger.debug(type: .peerChannel,
message: "supported video decoder: \(info.name) \(info.parameters)")
}
}

func createNativePeerChannel(configuration: WebRTCConfiguration,
Expand Down
1 change: 1 addition & 0 deletions Sora/PeerChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ class BasicPeerChannelContext: NSObject, RTCPeerConnectionDelegate {
metadata: configuration.metadata,
sdp: sdp,
multistreamEnabled: multistream,
planBEnabled: webRTCConfiguration.sdpSemantics == .planB,
videoEnabled: configuration.videoEnabled,
videoCodec: configuration.videoCodec,
videoBitRate: configuration.videoBitRate,
Expand Down
3 changes: 1 addition & 2 deletions Sora/SignalingChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ class BasicSignalingChannel: SignalingChannel {
} catch {
Logger.debug(type: .signalingChannel,
message: "JSON encoding failed")
fatalError()
}
}

Expand Down Expand Up @@ -245,7 +244,7 @@ class BasicSignalingChannel: SignalingChannel {
sigMessage = try SignalingMessage.decode(from: data)
} catch let error {
Logger.error(type: .signalingChannel,
message: "decode failed (\(error.localizedDescription))")
message: "decode failed (\(error.localizedDescription)) => \(text)")
}

Logger.debug(type: .signalingChannel, message: "call onMessageHandler")
Expand Down
Loading

0 comments on commit d4c6eb1

Please sign in to comment.