From c742d9edcc28cdaf209fc6bd2dbad5e5de6dccaf Mon Sep 17 00:00:00 2001 From: Israel Berezin Date: Wed, 8 May 2024 10:50:41 +0300 Subject: [PATCH] update player to support minimum version 15 (#478) * update player to support minimum version 15 * Update pr.yml - update release test destination ios version and devices * update newAccessLogEntryNotification notification name (need --- .github/workflows/ci.yml | 10 +++++----- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 12 ++++++------ .../FPSContentKeySessionDelegate.swift | 2 +- Classes/FairPlayDRM/FPSLicenseHelper.swift | 2 +- .../AVPlayerEngine+Observation.swift | 2 +- Classes/Player/Media/PKMediaEntry.swift | 2 +- Classes/Player/Media/PKMediaSource.swift | 2 +- Classes/Player/Playlist/PKPlaylist.swift | 2 +- Classes/Providers/Mock/MockMediaProvider.swift | 2 +- .../Tests/Analytics/OTTAnalyticsPluginTest.swift | 2 +- Example/Tests/Basic/MessageBusTest.swift | 2 +- Example/Tests/Basic/PlayerControllerTest.swift | 2 +- Example/Tests/Basic/PlayerCreator.swift | 2 +- Example/Tests/Basic/TracksTest.swift | 2 +- .../MockMediaProviderTest.swift | 2 +- .../KalturaRequestBuilderTest.swift | 2 +- Package.swift | 10 +++++----- PlayKit.podspec | 16 ++++++++-------- 19 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3f5c8dd..b27008c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ concurrency: jobs: build: name: "CocoaPods linting" - runs-on: macOS-12 + runs-on: macOS-13 steps: - uses: actions/checkout@v3 @@ -35,20 +35,20 @@ jobs: SPM: name: "Build SPM" - runs-on: macOS-12 + runs-on: macOS-13 strategy: fail-fast: false matrix: include: - - destination: "OS=16.2,name=iPhone 14 Pro" + - destination: "OS=17.2,name=iPhone 15" name: "iOS" scheme: "PlayKit-Package" - - destination: "OS=16.0,name=Apple TV" + - destination: "OS=17.2,name=Apple TV" name: "tvOS" scheme: "PlayKit-Package" steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} - run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean test | xcpretty + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild docbuild -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean test | xcpretty diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6d616fe6..96d90640 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -42,7 +42,7 @@ jobs: fail-fast: false matrix: include: - - destination: "OS=17.0,name=iPhone 14 Pro" + - destination: "OS=17.2,name=iPhone 15" name: "iOS" scheme: "PlayKit-Package" - destination: "OS=17.0,name=Apple TV" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b49fda79..e6cc56cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,26 +8,26 @@ jobs: SPM: name: "Build SPM" environment: Tag - runs-on: macOS-12 + runs-on: macos-latest strategy: fail-fast: false matrix: include: - - destination: "OS=16.2,name=iPhone 14 Pro" + - destination: "OS=17.2,name=iPhone 15" name: "iOS" scheme: "PlayKit-Package" - - destination: "OS=16.0,name=Apple TV" + - destination: "OS=17.2,name=Apple TV" name: "tvOS" scheme: "PlayKit-Package" steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} - run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean test | xcpretty + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild docbuild -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean test | xcpretty TAGGING: name: "Add Git Tag" - runs-on: macOS-12 + runs-on: macos-latest environment: Tag needs: SPM @@ -48,7 +48,7 @@ jobs: PODS_PUSH: name: "CocoaPods push" - runs-on: macOS-12 + runs-on: macos-latest environment: CocoaPods needs: TAGGING diff --git a/Classes/FairPlayDRM/FPSContentKeySessionDelegate.swift b/Classes/FairPlayDRM/FPSContentKeySessionDelegate.swift index 38169b08..6c694b79 100644 --- a/Classes/FairPlayDRM/FPSContentKeySessionDelegate.swift +++ b/Classes/FairPlayDRM/FPSContentKeySessionDelegate.swift @@ -9,7 +9,7 @@ // =================================================================================================== import AVFoundation -import SwiftyJSON +import kSwiftyJSON #if os(iOS) @available(iOS 10.3, *) diff --git a/Classes/FairPlayDRM/FPSLicenseHelper.swift b/Classes/FairPlayDRM/FPSLicenseHelper.swift index 77f0a59b..f7dc3d4d 100644 --- a/Classes/FairPlayDRM/FPSLicenseHelper.swift +++ b/Classes/FairPlayDRM/FPSLicenseHelper.swift @@ -11,7 +11,7 @@ import Foundation import AVFoundation -import SwiftyJSON +import kSwiftyJSON import PlayKitUtils diff --git a/Classes/Player/AVPlayerEngine/AVPlayerEngine+Observation.swift b/Classes/Player/AVPlayerEngine/AVPlayerEngine+Observation.swift index e7bd72dd..1b1ea5b9 100644 --- a/Classes/Player/AVPlayerEngine/AVPlayerEngine+Observation.swift +++ b/Classes/Player/AVPlayerEngine/AVPlayerEngine+Observation.swift @@ -43,7 +43,7 @@ extension AVPlayerEngine { NotificationCenter.default.addObserver(self, selector: #selector(self.didFailToPlayToEndTime(_:)), name: .AVPlayerItemFailedToPlayToEndTime, object: self.currentItem) NotificationCenter.default.addObserver(self, selector: #selector(self.didPlayToEndTime(_:)), name: .AVPlayerItemDidPlayToEndTime, object: self.currentItem) NotificationCenter.default.addObserver(self, selector: #selector(self.onAccessLogEntryNotification), name: .AVPlayerItemNewAccessLogEntry, object: self.currentItem) - NotificationCenter.default.addObserver(self, selector: #selector(self.onErrorLogEntryNotification), name: .AVPlayerItemNewErrorLogEntry, object: self.currentItem) + NotificationCenter.default.addObserver(self, selector: #selector(self.onErrorLogEntryNotification), name: AVPlayerItem.newAccessLogEntryNotification, object: self.currentItem) NotificationCenter.default.addObserver(self, selector: #selector(self.onPlaybackStalledNotification), name: .AVPlayerItemPlaybackStalled, object: self.currentItem) NotificationCenter.default.addObserver(self, selector: #selector(self.timebaseChanged), name: Notification.Name(kCMTimebaseNotification_EffectiveRateChanged as String), object: nil) } diff --git a/Classes/Player/Media/PKMediaEntry.swift b/Classes/Player/Media/PKMediaEntry.swift index 15d35569..e4351c6a 100644 --- a/Classes/Player/Media/PKMediaEntry.swift +++ b/Classes/Player/Media/PKMediaEntry.swift @@ -9,7 +9,7 @@ // =================================================================================================== import UIKit -import SwiftyJSON +import kSwiftyJSON @objc public enum MediaType: Int, CustomStringConvertible { case dvrLive diff --git a/Classes/Player/Media/PKMediaSource.swift b/Classes/Player/Media/PKMediaSource.swift index 5429583f..f9e696cd 100644 --- a/Classes/Player/Media/PKMediaSource.swift +++ b/Classes/Player/Media/PKMediaSource.swift @@ -9,7 +9,7 @@ // =================================================================================================== import Foundation -import SwiftyJSON +import kSwiftyJSON fileprivate let idKey: String = "id" fileprivate let contentUrlKey: String = "url" diff --git a/Classes/Player/Playlist/PKPlaylist.swift b/Classes/Player/Playlist/PKPlaylist.swift index 328c9d2d..8c086fab 100644 --- a/Classes/Player/Playlist/PKPlaylist.swift +++ b/Classes/Player/Playlist/PKPlaylist.swift @@ -10,7 +10,7 @@ // import Foundation -import SwiftyJSON +import kSwiftyJSON fileprivate let idKey = "id" fileprivate let nameKey = "name" diff --git a/Classes/Providers/Mock/MockMediaProvider.swift b/Classes/Providers/Mock/MockMediaProvider.swift index 6a902b05..1c2e3504 100644 --- a/Classes/Providers/Mock/MockMediaProvider.swift +++ b/Classes/Providers/Mock/MockMediaProvider.swift @@ -9,7 +9,7 @@ // =================================================================================================== import UIKit -import SwiftyJSON +import kSwiftyJSON @objc public class MockMediaEntryProvider: NSObject, MediaEntryProvider { diff --git a/Example/Tests/Analytics/OTTAnalyticsPluginTest.swift b/Example/Tests/Analytics/OTTAnalyticsPluginTest.swift index bda1524d..144c3eda 100644 --- a/Example/Tests/Analytics/OTTAnalyticsPluginTest.swift +++ b/Example/Tests/Analytics/OTTAnalyticsPluginTest.swift @@ -11,7 +11,7 @@ import Foundation import Quick import Nimble -import SwiftyJSON +import kSwiftyJSON import CoreMedia @testable import PlayKit diff --git a/Example/Tests/Basic/MessageBusTest.swift b/Example/Tests/Basic/MessageBusTest.swift index 381370dd..e212f387 100644 --- a/Example/Tests/Basic/MessageBusTest.swift +++ b/Example/Tests/Basic/MessageBusTest.swift @@ -10,7 +10,7 @@ import XCTest import PlayKit -import SwiftyJSON +import kSwiftyJSON import AVFoundation class MessageBusTest: XCTestCase { diff --git a/Example/Tests/Basic/PlayerControllerTest.swift b/Example/Tests/Basic/PlayerControllerTest.swift index a719d0e9..dd578374 100644 --- a/Example/Tests/Basic/PlayerControllerTest.swift +++ b/Example/Tests/Basic/PlayerControllerTest.swift @@ -10,7 +10,7 @@ import XCTest import PlayKit -import SwiftyJSON +import kSwiftyJSON import CoreMedia //Unit test to check the player controller diff --git a/Example/Tests/Basic/PlayerCreator.swift b/Example/Tests/Basic/PlayerCreator.swift index df3f36f2..c06e2271 100644 --- a/Example/Tests/Basic/PlayerCreator.swift +++ b/Example/Tests/Basic/PlayerCreator.swift @@ -11,7 +11,7 @@ import XCTest import Foundation import Quick -import SwiftyJSON +import kSwiftyJSON @testable import PlayKit enum PlayerCreationError: Error { diff --git a/Example/Tests/Basic/TracksTest.swift b/Example/Tests/Basic/TracksTest.swift index 58766259..9dea80bc 100644 --- a/Example/Tests/Basic/TracksTest.swift +++ b/Example/Tests/Basic/TracksTest.swift @@ -10,7 +10,7 @@ import XCTest import PlayKit -import SwiftyJSON +import kSwiftyJSON class TracksTest: XCTestCase { var player : Player! diff --git a/Example/Tests/MediaEntryProvider/MockMediaProviderTest.swift b/Example/Tests/MediaEntryProvider/MockMediaProviderTest.swift index 988f317a..dc6e5223 100644 --- a/Example/Tests/MediaEntryProvider/MockMediaProviderTest.swift +++ b/Example/Tests/MediaEntryProvider/MockMediaProviderTest.swift @@ -10,7 +10,7 @@ import UIKit import XCTest import PlayKit -import SwiftyJSON +import kSwiftyJSON class MockMediaProviderTest: XCTestCase { diff --git a/Example/Tests/MediaEntryProvider/RequestBuilder/KalturaRequestBuilderTest.swift b/Example/Tests/MediaEntryProvider/RequestBuilder/KalturaRequestBuilderTest.swift index 96a83373..2d5c1cd9 100644 --- a/Example/Tests/MediaEntryProvider/RequestBuilder/KalturaRequestBuilderTest.swift +++ b/Example/Tests/MediaEntryProvider/RequestBuilder/KalturaRequestBuilderTest.swift @@ -13,7 +13,7 @@ import Quick import Nimble @testable import PlayKit @testable import KalturaNetKit -import SwiftyJSON +import kSwiftyJSON class KalturaRequestBuilderTest: QuickSpec { diff --git a/Package.swift b/Package.swift index ceedf925..3f5576d1 100644 --- a/Package.swift +++ b/Package.swift @@ -11,21 +11,21 @@ let package = Package( .library(name: "AnalyticsCommon", targets: ["AnalyticsCommon"])], dependencies: [ - .package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", .upToNextMajor(from: "5.0.0")), - .package(url: "https://github.com/DaveWoodCom/XCGLogger.git", .upToNextMajor(from: "7.0.0")), + .package(url: "https://github.com/imberezin/kSwiftyJSON.git", .upToNextMajor(from: "5.0.8")), + .package(url: "https://github.com/DaveWoodCom/XCGLogger.git", .upToNextMajor(from: "7.1.5")), .package(name: "PlayKitUtils", url: "https://github.com/kaltura/playkit-ios-utils.git", - .upToNextMinor(from: "0.5.1")), + .upToNextMinor(from: "0.7.0")), .package(name: "KalturaNetKit", url: "https://github.com/kaltura/netkit-ios.git", - .upToNextMinor(from: "1.6.1")), + .upToNextMinor(from: "1.7.0")), .package(url: "https://github.com/Quick/Quick.git", .upToNextMajor(from: "5.0.0")), .package(url: "https://github.com/Quick/Nimble.git", .upToNextMajor(from: "9.0.0")), ], targets: [.target(name: "PlayKit", dependencies: [ - "SwiftyJSON", + "kSwiftyJSON", "XCGLogger", .product(name: "PlayKitUtils", package: "PlayKitUtils"), .product(name: "KalturaNetKit", package: "KalturaNetKit"), diff --git a/PlayKit.podspec b/PlayKit.podspec index 5443b1e1..b989865d 100644 --- a/PlayKit.podspec +++ b/PlayKit.podspec @@ -4,7 +4,7 @@ suffix = '.0000' # Dev mode Pod::Spec.new do |s| s.name = 'PlayKit' -s.version = '3.28.0' + suffix +s.version = '3.30.0' + suffix s.summary = 'PlayKit: Kaltura Mobile Player SDK - iOS' s.homepage = 'https://github.com/kaltura/playkit-ios' s.license = { :type => 'AGPLv3', :text => 'AGPLv3' } @@ -12,19 +12,19 @@ s.author = { 'Kaltura' => 'community@kaltura.com' } s.source = { :git => 'https://github.com/kaltura/playkit-ios.git', :tag => 'v' + s.version.to_s } s.swift_version = '5.0' -s.ios.deployment_target = '9.0' -s.tvos.deployment_target = '9.0' +s.ios.deployment_target = '15.0' +s.tvos.deployment_target = '15.0' s.subspec 'Core' do |sp| sp.source_files = 'Classes/**/*' - sp.dependency 'SwiftyJSON', '5.0.0' - sp.dependency 'XCGLogger', '7.0.0' - sp.dependency 'KalturaNetKit', '~> 1.6.1' - sp.dependency 'PlayKitUtils', '~> 0.5' + sp.dependency 'kSwiftyJSON', '5.0.8' + sp.dependency 'XCGLogger', '7.1.5' + sp.dependency 'KalturaNetKit', '~> 1.7.0' + sp.dependency 'PlayKitUtils', '~> 0.7' end s.subspec 'WidevineClassic' do |ssp| - ssp.ios.deployment_target = '9.0' + ssp.ios.deployment_target = '15.0' ssp.source_files = 'Widevine' ssp.dependency 'PlayKit/Core' #ssp.dependency 'PlayKitWV'