Skip to content

Commit

Permalink
Merge pull request #137 from noreasonprojects/feature/spm
Browse files Browse the repository at this point in the history
Feature/spm
  • Loading branch information
raphrel authored Nov 6, 2019
2 parents c471de6 + 5b25355 commit 9d092d0
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.

---
## [X.X.X]
* Feature:
* Support SPM
* Fix:
* Seek available on stream media
* Break changes:
Expand Down
26 changes: 26 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// swift-tools-version:5.0
import PackageDescription

let package = Package(
name: "ModernAVPlayer",
platforms: [SupportedPlatform.iOS("10.0")],
products: [
.library(name: "ModernAVPlayer", targets: ["ModernAVPlayer"]),
.library(name: "RxModernAVPlayer", targets: ["RxModernAVPlayer"])
],
dependencies: [
.package(url: "https:/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.0.0"))
],
targets: [
.target(
name: "ModernAVPlayer",
path: "Sources/Core"
),
.target(
name: "RxModernAVPlayer",
dependencies: ["ModernAVPlayer", "RxSwift", "RxCocoa"],
path: "Sources/RxModernAVPlayer"
)
]
)

20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,26 @@

## Installation

### Swift Package Manager

Supported version: ``swift-tools-version:5.0``

```swift
// Package.swift

import PackageDescription

let package = Package(
name: "Sample",
dependencies: [
.package(url: "https:/noreasonprojects/ModernAVPlayer", from: "X.X.X")
],
targets: [
.target(name: "Sample", dependencies: ["ModernAVPlayer"])
]
)
```

### CocoaPods

[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
Expand Down
2 changes: 2 additions & 0 deletions Sources/Core/Components/ModernAVPlayerMedia.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation

public class ModernAVPlayerMedia: PlayerMedia {

// MARK: - Outputs
Expand Down
2 changes: 2 additions & 0 deletions Sources/Core/Components/ModernAVPlayerMediaMetadata.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation

public struct ModernAVPlayerMediaMetadata: PlayerMediaMetadata, Equatable {
public let title: String?
public let albumTitle: String?
Expand Down
1 change: 1 addition & 0 deletions Sources/Core/Components/PlayerContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
// THE SOFTWARE.

import AVFoundation
import UIKit

//sourcery: AutoMockable
protocol PlayerContextDelegate: class {
Expand Down
1 change: 1 addition & 0 deletions Sources/Core/State/LoadingMediaState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
// THE SOFTWARE.

import AVFoundation
import UIKit

final class LoadingMediaState: PlayerState {

Expand Down
2 changes: 2 additions & 0 deletions Sources/RxModernAVPlayer/ConcretePlayerContext+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

// Compilation failed from SPM without this import
import ModernAVPlayer
import RxCocoa
import RxSwift

Expand Down
2 changes: 2 additions & 0 deletions Sources/RxModernAVPlayer/PlayerContextDelegateProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

// Compilation failed from SPM without this import
import ModernAVPlayer
import RxCocoa
import RxSwift

Expand Down

0 comments on commit 9d092d0

Please sign in to comment.