From b5ef3704fb9278ea5a59c1ed8ab99049edc4949d Mon Sep 17 00:00:00 2001 From: Josiah Campbell <9521010+jocmp@users.noreply.github.com> Date: Sat, 28 Dec 2024 21:27:34 -0600 Subject: [PATCH 1/5] Use NNW matrix --- .github/workflows/CI.yml | 26 +++++++++++++++++--------- Package.swift | 39 ++++++++++----------------------------- 2 files changed, 27 insertions(+), 38 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 099f62e8..12f53d37 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,17 +1,25 @@ -name: Test +name: CI on: push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] jobs: build: runs-on: macos-latest + strategy: + matrix: + run-config: + - { + scheme: "ImageViewer", + destination: "platform=iOS Simulator,OS=17.4,name=iPhone 15", + } steps: - - uses: actions/checkout@v4 - - name: Build - run: swift build -v - - name: Run tests - run: swift test -v + - uses: actions/checkout@v4 + - name: Show Available Destinations + env: + scheme: ${{ matrix.run-config['scheme'] }} + run: xcodebuild -scheme ${scheme} -showdestinations + - name: Build + run: swift build -v + - name: Run tests + run: swift test -v diff --git a/Package.swift b/Package.swift index 4d75165a..53003617 100644 --- a/Package.swift +++ b/Package.swift @@ -1,33 +1,14 @@ // swift-tools-version:5.1 -// -// Package.swift -// -// Copyright (c) 2020 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// import PackageDescription -let package = Package(name: "ImageViewer", - platforms: [.iOS(.v13)], - products: [.library(name: "ImageViewer", targets: ["ImageViewer"])], - targets: [.target(name: "ImageViewer", - path: "ImageViewer/Source")], - swiftLanguageVersions: [.v5]) +let package = Package( + name: "ImageViewer", + platforms: [.iOS(.v13)], + products: [.library(name: "ImageViewer", targets: ["ImageViewer"])], + targets: [ + .target( + name: "ImageViewer", + path: "ImageViewer/Source") + ], + swiftLanguageVersions: [.v5]) From 3338f1438be013700d96dfc4c1d4ee9b86e59367 Mon Sep 17 00:00:00 2001 From: Josiah Campbell <9521010+jocmp@users.noreply.github.com> Date: Sat, 28 Dec 2024 21:33:15 -0600 Subject: [PATCH 2/5] Use xcodebuild --- .github/workflows/CI.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 12f53d37..95bb875c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,6 +20,12 @@ jobs: scheme: ${{ matrix.run-config['scheme'] }} run: xcodebuild -scheme ${scheme} -showdestinations - name: Build - run: swift build -v + run: xcodebuild build -scheme ${scheme} -destination "${destination}" + env: + scheme: ${{ matrix.run-config['scheme'] }} + destination: ${{ matrix.run-config['destination'] }} - name: Run tests - run: swift test -v + run: xcodebuild test -scheme ${scheme} -destination "${destination}" + env: + scheme: ${{ matrix.run-config['scheme'] }} + destination: ${{ matrix.run-config['destination'] }} From 17a5167a86aeb38c0475b43d2eddee2408b8ef11 Mon Sep 17 00:00:00 2001 From: Josiah Campbell <9521010+jocmp@users.noreply.github.com> Date: Sat, 28 Dec 2024 21:35:08 -0600 Subject: [PATCH 3/5] Only build --- .github/workflows/CI.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 95bb875c..f9f04557 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,6 +13,10 @@ jobs: scheme: "ImageViewer", destination: "platform=iOS Simulator,OS=17.4,name=iPhone 15", } + - { + scheme: "ImageViewer", + destination: "platform=iOS Simulator,OS=18.0,name=iPhone 16", + } steps: - uses: actions/checkout@v4 - name: Show Available Destinations @@ -24,8 +28,3 @@ jobs: env: scheme: ${{ matrix.run-config['scheme'] }} destination: ${{ matrix.run-config['destination'] }} - - name: Run tests - run: xcodebuild test -scheme ${scheme} -destination "${destination}" - env: - scheme: ${{ matrix.run-config['scheme'] }} - destination: ${{ matrix.run-config['destination'] }} From c302be424d646e40bcf1ebd9bdfbf8a24526fe4d Mon Sep 17 00:00:00 2001 From: Josiah Campbell <9521010+jocmp@users.noreply.github.com> Date: Sat, 28 Dec 2024 21:37:03 -0600 Subject: [PATCH 4/5] Update Package.swift --- Package.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 53003617..b0945012 100644 --- a/Package.swift +++ b/Package.swift @@ -1,10 +1,9 @@ -// swift-tools-version:5.1 - +// swift-tools-version:5.9 import PackageDescription let package = Package( name: "ImageViewer", - platforms: [.iOS(.v13)], + platforms: [.iOS(.v16)], products: [.library(name: "ImageViewer", targets: ["ImageViewer"])], targets: [ .target( From b6279f8d5c36236d71c7ab2e6c2ed521165f3a96 Mon Sep 17 00:00:00 2001 From: Josiah Campbell <9521010+jocmp@users.noreply.github.com> Date: Sat, 28 Dec 2024 21:42:28 -0600 Subject: [PATCH 5/5] Update docs --- CHANGELOG.md | 14 ++++++++++++-- README.md | 49 +++++-------------------------------------------- 2 files changed, 17 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 132e8f7a..4fb9ade6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,20 @@ # ImageViewer +## Version 6.0.5 -## Version 6.0.1 +* Find first key window (#2) + +## Version 6.0.4 + +* Fix statusBarHidden setting -* Added support as Swift Package +## Version 6.0.3 + +* Ensure video scrubber takes up max width + +## Version 6.0.1 +* Added support as Swift Package ## Version 6.0.0 diff --git a/README.md b/README.md index bd2989f4..92e4614c 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,21 @@ +![Tests](https://github.com/jocmp/ImageViewer/actions/workflows/ci.yml/badge.svg) -[![CI Status](http://img.shields.io/travis/Krisiacik/ImageViewer.svg?style=flat)](https://travis-ci.org/Krisiacik/ImageViewer) -[![Swift 5.0](https://img.shields.io/badge/Swift-5.0-green.svg?style=flat)](https://developer.apple.com/swift/) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Version](https://img.shields.io/cocoapods/v/ImageViewer.svg?style=flat)](http://cocoadocs.org/docsets/ImageViewer) -[![Platforms iOS](https://img.shields.io/badge/Platforms-iOS-lightgray.svg?style=flat)](https://developer.apple.com/swift/) -[![License MIT](https://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat)](https://opensource.org/licenses/MIT) +![Single image view](https://github.com/jocmp/ImageViewer/blob/main/Documentation/single.gif) -![Single image view](https://github.com/Krisiacik/ImageViewer/blob/master/Documentation/single.gif) - -![Gallery](https://github.com/Krisiacik/ImageViewer/blob/master/Documentation/gallery.gif) +![Gallery](https://github.com/jocmp/ImageViewer/blob/main/Documentation/gallery.gif) For the latest changes see the [CHANGELOG](CHANGELOG.md) ## Install -### CocoaPods - -```ruby -pod 'ImageViewer' -``` - -### Carthage - -```ruby -github "Krisiacik/ImageViewer" -``` - -### Swiftpackage +### SwiftPM Just add the repository URL in Xcode. ## Sample Usage -For a detailed example, see the [Example](https://github.com/Krisiacik/ImageViewer/tree/master/Example)! +For a detailed example, see the [Example](https://github.com/jocmp/ImageViewer/tree/main/Example) ```swift // Show the ImageViewer with the first item @@ -49,25 +31,4 @@ extension ViewController: GalleryItemsDataSource { return items[index].galleryItem } } - ``` - -### ImageViewer version vs Swift version. - -ImageViewer 6.0+ is Swift 5 ready! 🎉 - -If you use earlier version of Swift - refer to the table below: - -| Swift version | ImageViewer version | -| ------------- | --------------------------------- | -| 5.x | >= 6.0 | -| 4.x | 5.0 | -| 3.x | 4.0 | -| 2.3 | 3.1 [⚠️](CHANGELOG.md#version-31) | -| 2.2 | <= 2.1 | - -## License - -ImageViewer is licensed under the MIT License, Version 2.0. See the [LICENSE](LICENSE) file for more info. - -Copyright (c) 2016 MailOnline