Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEM-2467 Swift 4.2 #32

Merged
merged 5 commits into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode9.4
osx_image: xcode10.1

before_install:
- gem install cocoapods # Since Travis is not always on latest version
Expand Down
12 changes: 7 additions & 5 deletions AdsEnabledPlayerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,16 @@ extension AdsEnabledPlayerController: AppStateObservable {

var observations: Set<NotificationObservation> {
return [
NotificationObservation(name: .UIApplicationDidEnterBackground) { [weak self] in
NotificationObservation(name: UIApplication.didEnterBackgroundNotification) { [weak self] in
guard let strongSelf = self else { return }
// when we enter background make sure to pause if we were playing.
self?.pause()
strongSelf.pause()
// notify the ads plugin we are entering to the background.
self?.adsPlugin.didEnterBackground()
strongSelf.adsPlugin.didEnterBackground()
},
NotificationObservation(name: .UIApplicationWillEnterForeground) { [weak self] in
self?.adsPlugin.willEnterForeground()
NotificationObservation(name: UIApplication.willEnterForegroundNotification) { [weak self] in
guard let strongSelf = self else { return }
strongSelf.adsPlugin.willEnterForeground()
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions IMAPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@ enum IMAState: Int, StateProtocol {
}

@available(iOS 9.0, *)
@objc public func picture(_ pictureInPictureController: AVPictureInPictureController, failedToStartPictureInPictureWithError error: Error) {
self.pipDelegate?.picture?(pictureInPictureController, failedToStartPictureInPictureWithError: error)
@objc public func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, failedToStartPictureInPictureWithError error: Error) {
self.pipDelegate?.pictureInPictureController?(pictureInPictureController, failedToStartPictureInPictureWithError: error)
}

@available(iOS 9.0, *)
Expand All @@ -610,8 +610,8 @@ enum IMAState: Int, StateProtocol {
}

@available(iOS 9.0, *)
@objc public func picture(_ pictureInPictureController: AVPictureInPictureController, restoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler: @escaping (Bool) -> Void) {
self.pipDelegate?.picture?(pictureInPictureController, restoreUserInterfaceForPictureInPictureStopWithCompletionHandler: completionHandler)
@objc public func pictureInPictureController(_ pictureInPictureController: AVPictureInPictureController, restoreUserInterfaceForPictureInPictureStopWithCompletionHandler completionHandler: @escaping (Bool) -> Void) {
self.pipDelegate?.pictureInPictureController?(pictureInPictureController, restoreUserInterfaceForPictureInPictureStopWithCompletionHandler: completionHandler)
}

/************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion PlayKit_IMA.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.summary = 'PlayKit IMA Plugin'
s.homepage = 'https://github.com/kaltura/playkit-ios-ima'
s.source = { :git => 'https://github.com/kaltura/playkit-ios-ima.git', :tag => 'v' + s.version.to_s }
s.swift_version = '4.0'
s.swift_version = '4.2'

s.source_files = '**/*.swift'

Expand Down