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

Add support for Swift Package Manager v. 5.3 #333

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## `develop`

Changes for users of the library currently on `develop`:
- fixed a NaN when setting `zoomScale` in `NYTScalingImageView` when `ANIMATED_GIF_SUPPORT=1`
- fixed a NaN when setting `zoomScale` in `NYTScalingImageView` when `ANIMATED_GIF_SUPPORT=1`
- Add a SwiftPM package manifest.

## [5.0.5](https://github.com/nytimes/NYTPhotoViewer/releases/tag/5.0.5)

Expand Down
3 changes: 3 additions & 0 deletions NYTPhotoViewer/Resource Loading/NSBundle+NYTPhotoViewer.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
@implementation NSBundle (NYTPhotoViewer)

+ (instancetype)nyt_photoViewerResourceBundle {
#if SWIFT_PACKAGE
return SWIFTPM_MODULE_BUNDLE;
#endif
static NSBundle *resourceBundle = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Expand Down
1 change: 1 addition & 0 deletions NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX.png
1 change: 1 addition & 0 deletions NYTPhotoViewer/Resources/[email protected]
1 change: 1 addition & 0 deletions NYTPhotoViewer/Resources/[email protected]
1 change: 1 addition & 0 deletions NYTPhotoViewer/Resources/[email protected]
1 change: 1 addition & 0 deletions NYTPhotoViewer/Resources/[email protected]
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NSBundle+NYTPhotoViewer.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhoto.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhotoCaptionView.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhotoTransitionController.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhotoViewController.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhotoViewerContainer.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhotoViewerDataSource.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhotosOverlayView.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTPhotosViewController.h
1 change: 1 addition & 0 deletions NYTPhotoViewer/include/NYTScalingImageView.h
40 changes: 40 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// swift-tools-version:5.3
import PackageDescription

let package = Package(
name: "NYTPhotoViewer",
platforms: [
.iOS(.v9)
],
products: [
.library(
name: "NYTPhotoViewer",
targets: ["NYTPhotoViewer"]),
],
dependencies: [
.package(url: "https://github.com/pinterest/PINRemoteImage.git", from: "3.0.1")
],
targets: [
.target(
name: "NYTPhotoViewer",
dependencies: ["PINRemoteImage"],
path: "NYTPhotoViewer",
exclude: [
"NYTPhotoViewer.bundle",
"Info.plist"
],
resources: [
.copy("Resources/NYTPhotoViewerCloseButtonX.png"),
.copy("Resources/[email protected]"),
.copy("Resources/[email protected]"),
.copy("Resources/NYTPhotoViewerCloseButtonXLandscape.png"),
.copy("Resources/[email protected]"),
.copy("Resources/[email protected]"),
],
cSettings: [
.headerSearchPath("./"),
.headerSearchPath("./Protocols"),
.headerSearchPath("./Resource Loading")
])
]
)