From b95a17c19a1ebffe3dfc87c3715f62f19cdce7b1 Mon Sep 17 00:00:00 2001 From: Josiah Campbell <9521010+jocmp@users.noreply.github.com> Date: Sat, 28 Dec 2024 21:43:32 -0600 Subject: [PATCH] Update CI steps (#6) * Use NNW matrix * Use xcodebuild * Only build * Update Package.swift * Update docs --- .github/workflows/CI.yml | 31 +++++++++++++++++-------- CHANGELOG.md | 14 ++++++++++-- Package.swift | 42 +++++++++------------------------- README.md | 49 ++++------------------------------------ 4 files changed, 50 insertions(+), 86 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 099f62e8..f9f04557 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,17 +1,30 @@ -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", + } + - { + scheme: "ImageViewer", + destination: "platform=iOS Simulator,OS=18.0,name=iPhone 16", + } 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: xcodebuild build -scheme ${scheme} -destination "${destination}" + env: + scheme: ${{ matrix.run-config['scheme'] }} + destination: ${{ matrix.run-config['destination'] }} 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/Package.swift b/Package.swift index 4d75165a..b0945012 100644 --- a/Package.swift +++ b/Package.swift @@ -1,33 +1,13 @@ -// 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. -// - +// swift-tools-version:5.9 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(.v16)], + products: [.library(name: "ImageViewer", targets: ["ImageViewer"])], + targets: [ + .target( + name: "ImageViewer", + path: "ImageViewer/Source") + ], + swiftLanguageVersions: [.v5]) 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