Skip to content

Commit

Permalink
Add Swift Package Manager Support (#411)
Browse files Browse the repository at this point in the history
* Add support for Swift Package Manager

- Add support for Swift Package Manager (SPM 5.3 required)
- Fix failing unit tests
- Remove redudant unit tests due to public API changes
- Fix warnings for test target

* Fix broken paths in youtube-ios-player-helper.xcodeproj

* Add Swift Package Installation instruction to README.md
  • Loading branch information
Ivan Lisovyi committed Dec 10, 2021
1 parent ff5991e commit cebd3ae
Show file tree
Hide file tree
Showing 13 changed files with 366 additions and 241 deletions.
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.3

import PackageDescription

let package = Package(
name: "YouTubeiOSPlayerHelper",
platforms: [
.iOS(.v10)
],
products: [
.library(
name: "YouTubeiOSPlayerHelper",
targets: ["YouTubeiOSPlayerHelper"]
)
],
targets: [
.target(
name: "YouTubeiOSPlayerHelper",
path: "Sources",
resources: [
.process("Assets")
],
publicHeadersPath: "."
)
]
)
2 changes: 1 addition & 1 deletion Project/youtube-player-ios-example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ target "youtube-player-ios-example" do
pod "youtube-ios-player-helper", :path => "../../youtube-ios-player-helper.podspec"

target "youtube-player-ios-exampleTests" do
pod "OCMock", "3.1.2"
pod "OCMock", "3.7.1"
end
end

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,52 @@
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.youtube.demo.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.youtube.demo.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down

0 comments on commit cebd3ae

Please sign in to comment.