From fde0a8015913be31cdc6466871e895ca9a65d476 Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 10:46:16 -0800 Subject: [PATCH 01/11] Add SwiftPM package manifest. --- Package.swift | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 00000000..a5d142ac --- /dev/null +++ b/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version:5.1 +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"), + .testTarget( + name: "NYTPhotoViewerTests", + dependencies: ["NYTPhotoViewer"], + path: "NYTPhotoViewerTests"), + ] +) \ No newline at end of file From 01ec5b369bc348885e80c3773db258a48499cf9f Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 10:59:02 -0800 Subject: [PATCH 02/11] try public headers path --- Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index a5d142ac..133850e6 100644 --- a/Package.swift +++ b/Package.swift @@ -18,7 +18,8 @@ let package = Package( .target( name: "NYTPhotoViewer", dependencies: ["PINRemoteImage"], - path: "NYTPhotoViewer"), + path: "NYTPhotoViewer", + publicHeadersPath: "NYTPhotoViewer/Protocols"), .testTarget( name: "NYTPhotoViewerTests", dependencies: ["NYTPhotoViewer"], From dbb1550ecf5328e95ccc61cc232ffaf8faf3b488 Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 11:07:11 -0800 Subject: [PATCH 03/11] also try explicitly looking for C headers in correct directory. try as c setting in addition to public header path. switch to path-relative header search paths. not seeing headers I expect to see still. re-add public header path use relative path for public headers directive --- Package.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 133850e6..49079ac5 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,12 @@ let package = Package( name: "NYTPhotoViewer", dependencies: ["PINRemoteImage"], path: "NYTPhotoViewer", - publicHeadersPath: "NYTPhotoViewer/Protocols"), + publicHeadersPath: "./Protocols", + cSettings: [ + .headerSearchPath("./"), + .headerSearchPath("./Protocols"), + .headerSearchPath("./Resource Loading") + ]), .testTarget( name: "NYTPhotoViewerTests", dependencies: ["NYTPhotoViewer"], From bf13be581e3c56429a0eb1f8f70bdfe27a521b31 Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 13:22:16 -0800 Subject: [PATCH 04/11] switch from 1 public header path to instead symbolic linking all headers into include directory. --- NYTPhotoViewer/include/NYTInterstitialViewController.h | 1 + NYTPhotoViewer/include/NYTPhoto.h | 1 + NYTPhotoViewer/include/NYTPhotoCaptionView.h | 1 + NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h | 1 + NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h | 1 + NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h | 1 + NYTPhotoViewer/include/NYTPhotoTransitionController.h | 1 + NYTPhotoViewer/include/NYTPhotoViewController.h | 1 + NYTPhotoViewer/include/NYTPhotoViewer.h | 1 + NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h | 1 + NYTPhotoViewer/include/NYTPhotoViewerContainer.h | 1 + NYTPhotoViewer/include/NYTPhotoViewerCore.h | 1 + NYTPhotoViewer/include/NYTPhotoViewerDataSource.h | 1 + NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h | 1 + NYTPhotoViewer/include/NYTPhotosOverlayView.h | 1 + NYTPhotoViewer/include/NYTPhotosViewController.h | 1 + NYTPhotoViewer/include/NYTScalingImageView.h | 1 + Package.swift | 1 - 18 files changed, 17 insertions(+), 1 deletion(-) create mode 120000 NYTPhotoViewer/include/NYTInterstitialViewController.h create mode 120000 NYTPhotoViewer/include/NYTPhoto.h create mode 120000 NYTPhotoViewer/include/NYTPhotoCaptionView.h create mode 120000 NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h create mode 120000 NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h create mode 120000 NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h create mode 120000 NYTPhotoViewer/include/NYTPhotoTransitionController.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewController.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewer.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerContainer.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerCore.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerDataSource.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h create mode 120000 NYTPhotoViewer/include/NYTPhotosOverlayView.h create mode 120000 NYTPhotoViewer/include/NYTPhotosViewController.h create mode 120000 NYTPhotoViewer/include/NYTScalingImageView.h diff --git a/NYTPhotoViewer/include/NYTInterstitialViewController.h b/NYTPhotoViewer/include/NYTInterstitialViewController.h new file mode 120000 index 00000000..bf1e7dc7 --- /dev/null +++ b/NYTPhotoViewer/include/NYTInterstitialViewController.h @@ -0,0 +1 @@ +../NYTInterstitialViewController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhoto.h b/NYTPhotoViewer/include/NYTPhoto.h new file mode 120000 index 00000000..df44c70e --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhoto.h @@ -0,0 +1 @@ +../Protocols/NYTPhoto.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoCaptionView.h b/NYTPhotoViewer/include/NYTPhotoCaptionView.h new file mode 120000 index 00000000..eeab5d6b --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoCaptionView.h @@ -0,0 +1 @@ +../NYTPhotoCaptionView.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h b/NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h new file mode 120000 index 00000000..8c16d3cf --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h @@ -0,0 +1 @@ +../Protocols/NYTPhotoCaptionViewLayoutWidthHinting.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h b/NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h new file mode 120000 index 00000000..bef0edd6 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h @@ -0,0 +1 @@ +../NYTPhotoDismissalInteractionController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h b/NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h new file mode 120000 index 00000000..16bf84e7 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h @@ -0,0 +1 @@ +../NYTPhotoTransitionAnimator.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoTransitionController.h b/NYTPhotoViewer/include/NYTPhotoTransitionController.h new file mode 120000 index 00000000..5768d71d --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoTransitionController.h @@ -0,0 +1 @@ +../NYTPhotoTransitionController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewController.h b/NYTPhotoViewer/include/NYTPhotoViewController.h new file mode 120000 index 00000000..bbd14c86 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewController.h @@ -0,0 +1 @@ +../NYTPhotoViewController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewer.h b/NYTPhotoViewer/include/NYTPhotoViewer.h new file mode 120000 index 00000000..10c00008 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewer.h @@ -0,0 +1 @@ +../NYTPhotoViewer.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h b/NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h new file mode 120000 index 00000000..24d2ec42 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h @@ -0,0 +1 @@ +../NYTPhotoViewerArrayDataSource.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerContainer.h b/NYTPhotoViewer/include/NYTPhotoViewerContainer.h new file mode 120000 index 00000000..f4f78e59 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerContainer.h @@ -0,0 +1 @@ +../Protocols/NYTPhotoViewerContainer.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerCore.h b/NYTPhotoViewer/include/NYTPhotoViewerCore.h new file mode 120000 index 00000000..890b96ba --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerCore.h @@ -0,0 +1 @@ +../NYTPhotoViewerCore.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerDataSource.h b/NYTPhotoViewer/include/NYTPhotoViewerDataSource.h new file mode 120000 index 00000000..a48b5630 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerDataSource.h @@ -0,0 +1 @@ +../Protocols/NYTPhotoViewerDataSource.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h b/NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h new file mode 120000 index 00000000..c58d9746 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h @@ -0,0 +1 @@ +../NYTPhotoViewerSinglePhotoDataSource.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotosOverlayView.h b/NYTPhotoViewer/include/NYTPhotosOverlayView.h new file mode 120000 index 00000000..f0045836 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotosOverlayView.h @@ -0,0 +1 @@ +../NYTPhotosOverlayView.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotosViewController.h b/NYTPhotoViewer/include/NYTPhotosViewController.h new file mode 120000 index 00000000..2a64027b --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotosViewController.h @@ -0,0 +1 @@ +../NYTPhotosViewController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTScalingImageView.h b/NYTPhotoViewer/include/NYTScalingImageView.h new file mode 120000 index 00000000..2168666d --- /dev/null +++ b/NYTPhotoViewer/include/NYTScalingImageView.h @@ -0,0 +1 @@ +../NYTScalingImageView.h \ No newline at end of file diff --git a/Package.swift b/Package.swift index 49079ac5..608c59cc 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,6 @@ let package = Package( name: "NYTPhotoViewer", dependencies: ["PINRemoteImage"], path: "NYTPhotoViewer", - publicHeadersPath: "./Protocols", cSettings: [ .headerSearchPath("./"), .headerSearchPath("./Protocols"), From 283f030c14e55176506449aac2de60562b87d239 Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 13:30:27 -0800 Subject: [PATCH 05/11] delete all headers from include symlinks except for the umbrella header. try removing include directory workaround and switching back to public header directive but pointing at root of target. --- NYTPhotoViewer/include/NYTInterstitialViewController.h | 1 - NYTPhotoViewer/include/NYTPhoto.h | 1 - NYTPhotoViewer/include/NYTPhotoCaptionView.h | 1 - NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h | 1 - NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h | 1 - NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h | 1 - NYTPhotoViewer/include/NYTPhotoTransitionController.h | 1 - NYTPhotoViewer/include/NYTPhotoViewController.h | 1 - NYTPhotoViewer/include/NYTPhotoViewer.h | 1 - NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h | 1 - NYTPhotoViewer/include/NYTPhotoViewerContainer.h | 1 - NYTPhotoViewer/include/NYTPhotoViewerCore.h | 1 - NYTPhotoViewer/include/NYTPhotoViewerDataSource.h | 1 - NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h | 1 - NYTPhotoViewer/include/NYTPhotosOverlayView.h | 1 - NYTPhotoViewer/include/NYTPhotosViewController.h | 1 - NYTPhotoViewer/include/NYTScalingImageView.h | 1 - Package.swift | 1 + 18 files changed, 1 insertion(+), 17 deletions(-) delete mode 120000 NYTPhotoViewer/include/NYTInterstitialViewController.h delete mode 120000 NYTPhotoViewer/include/NYTPhoto.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoCaptionView.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoTransitionController.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoViewController.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoViewer.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoViewerContainer.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoViewerCore.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoViewerDataSource.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h delete mode 120000 NYTPhotoViewer/include/NYTPhotosOverlayView.h delete mode 120000 NYTPhotoViewer/include/NYTPhotosViewController.h delete mode 120000 NYTPhotoViewer/include/NYTScalingImageView.h diff --git a/NYTPhotoViewer/include/NYTInterstitialViewController.h b/NYTPhotoViewer/include/NYTInterstitialViewController.h deleted file mode 120000 index bf1e7dc7..00000000 --- a/NYTPhotoViewer/include/NYTInterstitialViewController.h +++ /dev/null @@ -1 +0,0 @@ -../NYTInterstitialViewController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhoto.h b/NYTPhotoViewer/include/NYTPhoto.h deleted file mode 120000 index df44c70e..00000000 --- a/NYTPhotoViewer/include/NYTPhoto.h +++ /dev/null @@ -1 +0,0 @@ -../Protocols/NYTPhoto.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoCaptionView.h b/NYTPhotoViewer/include/NYTPhotoCaptionView.h deleted file mode 120000 index eeab5d6b..00000000 --- a/NYTPhotoViewer/include/NYTPhotoCaptionView.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoCaptionView.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h b/NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h deleted file mode 120000 index 8c16d3cf..00000000 --- a/NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h +++ /dev/null @@ -1 +0,0 @@ -../Protocols/NYTPhotoCaptionViewLayoutWidthHinting.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h b/NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h deleted file mode 120000 index bef0edd6..00000000 --- a/NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoDismissalInteractionController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h b/NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h deleted file mode 120000 index 16bf84e7..00000000 --- a/NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoTransitionAnimator.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoTransitionController.h b/NYTPhotoViewer/include/NYTPhotoTransitionController.h deleted file mode 120000 index 5768d71d..00000000 --- a/NYTPhotoViewer/include/NYTPhotoTransitionController.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoTransitionController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewController.h b/NYTPhotoViewer/include/NYTPhotoViewController.h deleted file mode 120000 index bbd14c86..00000000 --- a/NYTPhotoViewer/include/NYTPhotoViewController.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoViewController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewer.h b/NYTPhotoViewer/include/NYTPhotoViewer.h deleted file mode 120000 index 10c00008..00000000 --- a/NYTPhotoViewer/include/NYTPhotoViewer.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoViewer.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h b/NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h deleted file mode 120000 index 24d2ec42..00000000 --- a/NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoViewerArrayDataSource.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerContainer.h b/NYTPhotoViewer/include/NYTPhotoViewerContainer.h deleted file mode 120000 index f4f78e59..00000000 --- a/NYTPhotoViewer/include/NYTPhotoViewerContainer.h +++ /dev/null @@ -1 +0,0 @@ -../Protocols/NYTPhotoViewerContainer.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerCore.h b/NYTPhotoViewer/include/NYTPhotoViewerCore.h deleted file mode 120000 index 890b96ba..00000000 --- a/NYTPhotoViewer/include/NYTPhotoViewerCore.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoViewerCore.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerDataSource.h b/NYTPhotoViewer/include/NYTPhotoViewerDataSource.h deleted file mode 120000 index a48b5630..00000000 --- a/NYTPhotoViewer/include/NYTPhotoViewerDataSource.h +++ /dev/null @@ -1 +0,0 @@ -../Protocols/NYTPhotoViewerDataSource.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h b/NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h deleted file mode 120000 index c58d9746..00000000 --- a/NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoViewerSinglePhotoDataSource.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotosOverlayView.h b/NYTPhotoViewer/include/NYTPhotosOverlayView.h deleted file mode 120000 index f0045836..00000000 --- a/NYTPhotoViewer/include/NYTPhotosOverlayView.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotosOverlayView.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotosViewController.h b/NYTPhotoViewer/include/NYTPhotosViewController.h deleted file mode 120000 index 2a64027b..00000000 --- a/NYTPhotoViewer/include/NYTPhotosViewController.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotosViewController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTScalingImageView.h b/NYTPhotoViewer/include/NYTScalingImageView.h deleted file mode 120000 index 2168666d..00000000 --- a/NYTPhotoViewer/include/NYTScalingImageView.h +++ /dev/null @@ -1 +0,0 @@ -../NYTScalingImageView.h \ No newline at end of file diff --git a/Package.swift b/Package.swift index 608c59cc..8dd69190 100644 --- a/Package.swift +++ b/Package.swift @@ -19,6 +19,7 @@ let package = Package( name: "NYTPhotoViewer", dependencies: ["PINRemoteImage"], path: "NYTPhotoViewer", + publicHeadersPath: "./", cSettings: [ .headerSearchPath("./"), .headerSearchPath("./Protocols"), From c41f8847ceff94d0ad15d89df6e36624f7d30bcb Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 13:42:33 -0800 Subject: [PATCH 06/11] and back again to include dir but without umbrella header in it try being exacting about where to locate the protocol headers from the umbrella header. switch back to original core header file. --- NYTPhotoViewer/include/NYTPhotoViewerCore.h | 1 + Package.swift | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerCore.h diff --git a/NYTPhotoViewer/include/NYTPhotoViewerCore.h b/NYTPhotoViewer/include/NYTPhotoViewerCore.h new file mode 120000 index 00000000..890b96ba --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerCore.h @@ -0,0 +1 @@ +../NYTPhotoViewerCore.h \ No newline at end of file diff --git a/Package.swift b/Package.swift index 8dd69190..608c59cc 100644 --- a/Package.swift +++ b/Package.swift @@ -19,7 +19,6 @@ let package = Package( name: "NYTPhotoViewer", dependencies: ["PINRemoteImage"], path: "NYTPhotoViewer", - publicHeadersPath: "./", cSettings: [ .headerSearchPath("./"), .headerSearchPath("./Protocols"), From 549442f0dabd3a6a59371a98978dd7910d029090 Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 14:13:21 -0800 Subject: [PATCH 07/11] ditch objc umbrella header and instead put all public headers into include folder via symlinks --- NYTPhotoViewer/include/NSBundle+NYTPhotoViewer.h | 1 + NYTPhotoViewer/include/NYTPhoto.h | 1 + NYTPhotoViewer/include/NYTPhotoCaptionView.h | 1 + NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h | 1 + NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h | 1 + NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h | 1 + NYTPhotoViewer/include/NYTPhotoTransitionController.h | 1 + NYTPhotoViewer/include/NYTPhotoViewController.h | 1 + NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h | 1 + NYTPhotoViewer/include/NYTPhotoViewerContainer.h | 1 + NYTPhotoViewer/include/NYTPhotoViewerCore.h | 1 - NYTPhotoViewer/include/NYTPhotoViewerDataSource.h | 1 + NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h | 1 + NYTPhotoViewer/include/NYTPhotosOverlayView.h | 1 + NYTPhotoViewer/include/NYTPhotosViewController.h | 1 + NYTPhotoViewer/include/NYTScalingImageView.h | 1 + 16 files changed, 15 insertions(+), 1 deletion(-) create mode 120000 NYTPhotoViewer/include/NSBundle+NYTPhotoViewer.h create mode 120000 NYTPhotoViewer/include/NYTPhoto.h create mode 120000 NYTPhotoViewer/include/NYTPhotoCaptionView.h create mode 120000 NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h create mode 120000 NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h create mode 120000 NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h create mode 120000 NYTPhotoViewer/include/NYTPhotoTransitionController.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewController.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerContainer.h delete mode 120000 NYTPhotoViewer/include/NYTPhotoViewerCore.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerDataSource.h create mode 120000 NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h create mode 120000 NYTPhotoViewer/include/NYTPhotosOverlayView.h create mode 120000 NYTPhotoViewer/include/NYTPhotosViewController.h create mode 120000 NYTPhotoViewer/include/NYTScalingImageView.h diff --git a/NYTPhotoViewer/include/NSBundle+NYTPhotoViewer.h b/NYTPhotoViewer/include/NSBundle+NYTPhotoViewer.h new file mode 120000 index 00000000..21e7cbc6 --- /dev/null +++ b/NYTPhotoViewer/include/NSBundle+NYTPhotoViewer.h @@ -0,0 +1 @@ +../Resource Loading/NSBundle+NYTPhotoViewer.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhoto.h b/NYTPhotoViewer/include/NYTPhoto.h new file mode 120000 index 00000000..df44c70e --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhoto.h @@ -0,0 +1 @@ +../Protocols/NYTPhoto.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoCaptionView.h b/NYTPhotoViewer/include/NYTPhotoCaptionView.h new file mode 120000 index 00000000..eeab5d6b --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoCaptionView.h @@ -0,0 +1 @@ +../NYTPhotoCaptionView.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h b/NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h new file mode 120000 index 00000000..8c16d3cf --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoCaptionViewLayoutWidthHinting.h @@ -0,0 +1 @@ +../Protocols/NYTPhotoCaptionViewLayoutWidthHinting.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h b/NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h new file mode 120000 index 00000000..bef0edd6 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoDismissalInteractionController.h @@ -0,0 +1 @@ +../NYTPhotoDismissalInteractionController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h b/NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h new file mode 120000 index 00000000..16bf84e7 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoTransitionAnimator.h @@ -0,0 +1 @@ +../NYTPhotoTransitionAnimator.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoTransitionController.h b/NYTPhotoViewer/include/NYTPhotoTransitionController.h new file mode 120000 index 00000000..5768d71d --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoTransitionController.h @@ -0,0 +1 @@ +../NYTPhotoTransitionController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewController.h b/NYTPhotoViewer/include/NYTPhotoViewController.h new file mode 120000 index 00000000..bbd14c86 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewController.h @@ -0,0 +1 @@ +../NYTPhotoViewController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h b/NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h new file mode 120000 index 00000000..24d2ec42 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerArrayDataSource.h @@ -0,0 +1 @@ +../NYTPhotoViewerArrayDataSource.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerContainer.h b/NYTPhotoViewer/include/NYTPhotoViewerContainer.h new file mode 120000 index 00000000..f4f78e59 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerContainer.h @@ -0,0 +1 @@ +../Protocols/NYTPhotoViewerContainer.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerCore.h b/NYTPhotoViewer/include/NYTPhotoViewerCore.h deleted file mode 120000 index 890b96ba..00000000 --- a/NYTPhotoViewer/include/NYTPhotoViewerCore.h +++ /dev/null @@ -1 +0,0 @@ -../NYTPhotoViewerCore.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerDataSource.h b/NYTPhotoViewer/include/NYTPhotoViewerDataSource.h new file mode 120000 index 00000000..a48b5630 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerDataSource.h @@ -0,0 +1 @@ +../Protocols/NYTPhotoViewerDataSource.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h b/NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h new file mode 120000 index 00000000..c58d9746 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotoViewerSinglePhotoDataSource.h @@ -0,0 +1 @@ +../NYTPhotoViewerSinglePhotoDataSource.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotosOverlayView.h b/NYTPhotoViewer/include/NYTPhotosOverlayView.h new file mode 120000 index 00000000..f0045836 --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotosOverlayView.h @@ -0,0 +1 @@ +../NYTPhotosOverlayView.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTPhotosViewController.h b/NYTPhotoViewer/include/NYTPhotosViewController.h new file mode 120000 index 00000000..2a64027b --- /dev/null +++ b/NYTPhotoViewer/include/NYTPhotosViewController.h @@ -0,0 +1 @@ +../NYTPhotosViewController.h \ No newline at end of file diff --git a/NYTPhotoViewer/include/NYTScalingImageView.h b/NYTPhotoViewer/include/NYTScalingImageView.h new file mode 120000 index 00000000..2168666d --- /dev/null +++ b/NYTPhotoViewer/include/NYTScalingImageView.h @@ -0,0 +1 @@ +../NYTScalingImageView.h \ No newline at end of file From 6a5a56daf1e7369c9275c6ca592d3ce2ed30d006 Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 14:56:59 -0800 Subject: [PATCH 08/11] symlink resources, copy to package bundle, support package bundle from existing bundle locator code. --- .../Resource Loading/NSBundle+NYTPhotoViewer.m | 3 +++ .../Resources/NYTPhotoViewerCloseButtonX.png | 1 + .../Resources/NYTPhotoViewerCloseButtonX@2x.png | 1 + .../Resources/NYTPhotoViewerCloseButtonX@3x.png | 1 + .../Resources/NYTPhotoViewerCloseButtonXLandscape.png | 1 + .../NYTPhotoViewerCloseButtonXLandscape@2x.png | 1 + .../NYTPhotoViewerCloseButtonXLandscape@3x.png | 1 + Package.swift | 10 +++++++++- 8 files changed, 18 insertions(+), 1 deletion(-) create mode 120000 NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX.png create mode 120000 NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX@2x.png create mode 120000 NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX@3x.png create mode 120000 NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape.png create mode 120000 NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape@2x.png create mode 120000 NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape@3x.png diff --git a/NYTPhotoViewer/Resource Loading/NSBundle+NYTPhotoViewer.m b/NYTPhotoViewer/Resource Loading/NSBundle+NYTPhotoViewer.m index 19d0c12c..1487c0e0 100644 --- a/NYTPhotoViewer/Resource Loading/NSBundle+NYTPhotoViewer.m +++ b/NYTPhotoViewer/Resource Loading/NSBundle+NYTPhotoViewer.m @@ -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, ^{ diff --git a/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX.png b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX.png new file mode 120000 index 00000000..5d2c81ac --- /dev/null +++ b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX.png @@ -0,0 +1 @@ +../NYTPhotoViewer.bundle/NYTPhotoViewerCloseButtonX.png \ No newline at end of file diff --git a/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX@2x.png b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX@2x.png new file mode 120000 index 00000000..b1b2d604 --- /dev/null +++ b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX@2x.png @@ -0,0 +1 @@ +../NYTPhotoViewer.bundle/NYTPhotoViewerCloseButtonX@2x.png \ No newline at end of file diff --git a/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX@3x.png b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX@3x.png new file mode 120000 index 00000000..41ab3f14 --- /dev/null +++ b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonX@3x.png @@ -0,0 +1 @@ +../NYTPhotoViewer.bundle/NYTPhotoViewerCloseButtonX@3x.png \ No newline at end of file diff --git a/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape.png b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape.png new file mode 120000 index 00000000..7d327172 --- /dev/null +++ b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape.png @@ -0,0 +1 @@ +../NYTPhotoViewer.bundle/NYTPhotoViewerCloseButtonXLandscape.png \ No newline at end of file diff --git a/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape@2x.png b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape@2x.png new file mode 120000 index 00000000..9d585160 --- /dev/null +++ b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape@2x.png @@ -0,0 +1 @@ +../NYTPhotoViewer.bundle/NYTPhotoViewerCloseButtonXLandscape@2x.png \ No newline at end of file diff --git a/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape@3x.png b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape@3x.png new file mode 120000 index 00000000..e6f6f0b2 --- /dev/null +++ b/NYTPhotoViewer/Resources/NYTPhotoViewerCloseButtonXLandscape@3x.png @@ -0,0 +1 @@ +../NYTPhotoViewer.bundle/NYTPhotoViewerCloseButtonXLandscape@3x.png \ No newline at end of file diff --git a/Package.swift b/Package.swift index 608c59cc..36e45915 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.1 +// swift-tools-version:5.3 import PackageDescription let package = Package( @@ -19,6 +19,14 @@ let package = Package( name: "NYTPhotoViewer", dependencies: ["PINRemoteImage"], path: "NYTPhotoViewer", + resources: [ + .copy("Resources/NYTPhotoViewerCloseButtonX.png"), + .copy("Resources/NYTPhotoViewerCloseButtonX@2x.png"), + .copy("Resources/NYTPhotoViewerCloseButtonX@3x.png"), + .copy("Resources/NYTPhotoViewerCloseButtonXLandscape.png"), + .copy("Resources/NYTPhotoViewerCloseButtonXLandscape@2x.png"), + .copy("Resources/NYTPhotoViewerCloseButtonXLandscape@3x.png"), + ], cSettings: [ .headerSearchPath("./"), .headerSearchPath("./Protocols"), From 7261f2a582390d05b98e6f2a4f0b3c648e884f51 Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 15:05:20 -0800 Subject: [PATCH 09/11] Add excludes to remediate warnings in package manifest --- Package.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 36e45915..1c5e8a53 100644 --- a/Package.swift +++ b/Package.swift @@ -19,6 +19,10 @@ let package = Package( name: "NYTPhotoViewer", dependencies: ["PINRemoteImage"], path: "NYTPhotoViewer", + exclude: [ + "NYTPhotoViewer.bundle", + "Info.plist" + ], resources: [ .copy("Resources/NYTPhotoViewerCloseButtonX.png"), .copy("Resources/NYTPhotoViewerCloseButtonX@2x.png"), @@ -35,6 +39,9 @@ let package = Package( .testTarget( name: "NYTPhotoViewerTests", dependencies: ["NYTPhotoViewer"], - path: "NYTPhotoViewerTests"), + path: "NYTPhotoViewerTests", + exclude: [ + "Info.plist" + ]) ] ) \ No newline at end of file From feef6b189ec4946bc5222e3d17fd1cf07847f09a Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Thu, 19 Nov 2020 15:16:29 -0800 Subject: [PATCH 10/11] Add note to changelog. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da0598e3..cc2a882f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ Changes for users of the library currently on `develop`: +- Add a SwiftPM package manifest. + ## [5.0.4](https://github.com/nytimes/NYTPhotoViewer/releases/tag/5.0.4) Changes for users of the library in 5.0.4: From 6c1726ba36a19c6330e827b5276ecec87e934fab Mon Sep 17 00:00:00 2001 From: Matt Polzin Date: Mon, 21 Dec 2020 15:45:10 -0800 Subject: [PATCH 11/11] Remove test target from Package.swift because it was not set up properly for building the Obj C test files anyway. --- Package.swift | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Package.swift b/Package.swift index 1c5e8a53..9a955122 100644 --- a/Package.swift +++ b/Package.swift @@ -35,13 +35,6 @@ let package = Package( .headerSearchPath("./"), .headerSearchPath("./Protocols"), .headerSearchPath("./Resource Loading") - ]), - .testTarget( - name: "NYTPhotoViewerTests", - dependencies: ["NYTPhotoViewer"], - path: "NYTPhotoViewerTests", - exclude: [ - "Info.plist" ]) ] -) \ No newline at end of file +)