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

Release/4.0.0 #321

Merged
merged 19 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 16 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
17 changes: 9 additions & 8 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ name: Tests
on:
push:
pull_request:
types: [opened]
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Tests:
runs-on: macos-13
runs-on: macos-14-xlarge
steps:
- name: Cancel previous jobs
uses: styfle/[email protected]

- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Load Latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Build project
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcbeautify --renderer github-actions

- name: Run tests
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcpretty
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -destination 'name=iPhone 14 Pro' -scheme 'PovioKit-Package' | xcbeautify --renderer github-actions

42 changes: 42 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/PovioKit-Package.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,20 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PovioKitAsync"
BuildableName = "PovioKitAsync"
BlueprintName = "PovioKitAsync"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
Expand All @@ -160,6 +174,34 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PovioKitSwiftUI"
BuildableName = "PovioKitSwiftUI"
BlueprintName = "PovioKitSwiftUI"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "PovioKitUIKit"
BuildableName = "PovioKitUIKit"
BlueprintName = "PovioKitUIKit"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2023 Povio Inc. <[email protected]>
Copyright (c) 2024 Povio Inc. <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire",
"state" : {
"revision" : "3dc6a42c7727c49bf26508e29b0a0b35f9c7e1ad",
"version" : "5.8.1"
"revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a",
"version" : "5.9.1"
}
}
],
Expand Down
77 changes: 60 additions & 17 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,43 @@ import PackageDescription
let package = Package(
name: "PovioKit",
platforms: [
.iOS(.v13)
.iOS(.v13), .macOS(.v13)
],
products: [
.library(name: "PovioKitCore", targets: ["PovioKitCore"]),
.library(name: "PovioKitNetworking", targets: ["PovioKitNetworking"]),
.library(name: "PovioKitPromise", targets: ["PovioKitPromise"]),
.library(name: "PovioKitUI", targets: ["PovioKitUI"]),
.library(name: "PovioKitAsync", targets: ["PovioKitAsync"]),
.library(
name: "PovioKitCore",
targets: ["PovioKitCore"]
),
.library(
name: "PovioKitUtilities",
targets: ["PovioKitUtilities"]
),
.library(
name: "PovioKitNetworking",
targets: ["PovioKitNetworking"]
),
.library(
name: "PovioKitPromise",
targets: ["PovioKitPromise"]
),
.library(
name: "PovioKitUIKit",
targets: ["PovioKitUIKit"]
),
.library(
name: "PovioKitSwiftUI",
targets: ["PovioKitSwiftUI"]
),
.library(
name: "PovioKitAsync",
targets: ["PovioKitAsync"]
),
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.0.0"))
.package(
url: "https://github.com/Alamofire/Alamofire",
.upToNextMajor(from: "5.0.0")
)
],
targets: [
.target(
Expand All @@ -25,7 +51,6 @@ let package = Package(
.target(
name: "PovioKitNetworking",
dependencies: [
"PovioKitCore",
"Alamofire",
"PovioKitPromise",
],
Expand All @@ -39,27 +64,45 @@ let package = Package(
resources: [.copy("../../Resources/PrivacyInfo.xcprivacy")]
),
.target(
name: "PovioKitUI",
name: "PovioKitUIKit",
dependencies: [
"PovioKitCore",
"PovioKitUtilities",
],
path: "Sources/UI/UIKit",
resources: [.copy("../../../Resources/PrivacyInfo.xcprivacy")]
),
.target(
name: "PovioKitSwiftUI",
dependencies: [
"PovioKitCore"
"PovioKitCore",
],
path: "Sources/UI",
path: "Sources/UI/SwiftUI",
resources: [.copy("../../../Resources/PrivacyInfo.xcprivacy")]
),
.target(
name: "PovioKitAsync",
dependencies: [
],
path: "Sources/Async",
resources: [.copy("../../../Resources/PrivacyInfo.xcprivacy")]
name: "PovioKitUtilities",
dependencies: [
"PovioKitCore",
],
path: "Sources/Utilities",
resources: [.copy("../../Resources/PrivacyInfo.xcprivacy")]
),
.target(
name: "PovioKitAsync",
dependencies: [],
path: "Sources/Async",
resources: [.copy("../../Resources/PrivacyInfo.xcprivacy")]
),
.testTarget(
name: "Tests",
dependencies: [
"PovioKitCore",
"PovioKitPromise",
"PovioKitNetworking",
"PovioKitUI",
"PovioKitUIKit",
"PovioKitSwiftUI",
"PovioKitUtilities",
"PovioKitAsync",
]
),
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,23 @@

## Packages

| [Core](Resources/Core) | [UI](Resources/UI) | [Networking](Resources/Networking) | [PromiseKit](Resources/PromiseKit) |
| :-: | :-: | :-: | :-: |
| [Core](Resources/Core) | [Networking](Resources/Networking) | [PromiseKit](Resources/PromiseKit) | [Utilities](Resources/Utilities) | [Async](Resources/Async) | [UIKit](Resources/UI/UIKit) | [SwiftUI](Resources/UI/SwiftUI) |
| :-: | :-: | :-: | :-: | :-: | :-: | :-: |

## Installation

### Swift Package Manager
- In Xcode, click `File` -> `Add Package Dependencies...`
- Insert `https://github.com/poviolabs/PovioKit` in the Search field.
- Select a desired `Dependency Rule`. Usually "Up to Next Major Version" with "3.0.0".
- Select a desired `Dependency Rule`. Usually "Up to Next Major Version" with "4.0.0".
- Select "Add Package" button and check one or all given products from the list:
- *PovioKitCore* (core library)
- *PovioKitNetworking* (networking library, depends on `core` and `promise` package)
- *PovioKitNetworking* (networking library built on top of Alamofire, has dependency on `PovioKitPromise` package)
- *PovioKitPromise* (lightweight promises library)
- *PovioKitUI* (UI components)
- *PovioKitUtilities* (utility components, has dependency on `PovioKitCore` package)
- *PovioKitAsync* (async/await components)
- *PovioKitUIKit* (UIKit components, has dependency on `PovioKitCore` and `PovioKitUtilities` package)
- *PovioKitSwiftUI* (SwiftUI components, has dependency on `PovioKitCore` package)
- Select "Add Package" again and you are done.

### Migration
Expand Down
8 changes: 8 additions & 0 deletions Resources/Async/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# PovioKit: Async

A package that includes async components and tools.

### Components
| Component | Description |
| :--- | :--- |
| [AsyncThrottleSequence](/Sources/Async/AsyncThrottleSequence.swift) | A wrapper around an `AsyncSequence` that introduces a delay between tasks to control the rate at which elements are emitted. |
27 changes: 5 additions & 22 deletions Resources/Core/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
# PovioKit: Core

Core package including essentials needed for development and other packages.
Core package includes essentials needed for the development and for other packages.

### Utilities

| Utilities |
### Essentials
| Components |
| :--- |
| [AppVersionValidator](/Sources/Core/Utilities/AppVersionValidator/AppVersionValidator.swift) |
| [AttributedStringBuilder](Utilities/AttributedStringBuilder) |
| [Broadcast](Utilities/Broadcast) |
| [BundleReader](/Sources/Core/Utilities/BundleReader/BundleReader.swift) |
| [ColorInterpolator](Utilities/ColorInterpolator) |
| [Delegated](Utilities/Delegated) |
| [DispatchTimer](Utilities/DispatchTimer) |
| [ImageSource](/Sources/Core/Utilities/ImageSource/ImageSource.swift) |
| [Logger](Utilities/Logger) |
| [Money](Utilities/Money) |
| [StartupService](Utilities/StartupService) |
| [Throttler](Utilities/Throttler) |
| [UserDefaults](Utilities/PropertyWrapper/UserDefaults) |
| [XCConfigValue](Utilities/PropertyWrapper/XCConfigValue) |
| [Logger](Logger) |


### Extensions

Expand All @@ -39,7 +26,3 @@ Core package including essentials needed for development and other packages.
| [UITableViewHeaderFooterView](/Sources/Core/Extensions/UIKit/UITableViewHeaderFooterView+PovioKit.swift) | | |
| [UIView](/Sources/Core/Extensions/UIKit/UIView+PovioKit.swift) | | |
| [UIViewController](/Sources/Core/Extensions/UIKit/UIViewController+PovioKit.swift) | | |




1 change: 0 additions & 1 deletion Resources/Networking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

High-level network client abstraction based on [Alamofire](https://github.com/Alamofire/Alamofire).


## Usage

#### Retreiving JSON object from an endpoint
Expand Down
15 changes: 0 additions & 15 deletions Resources/UI/README.md

This file was deleted.

31 changes: 31 additions & 0 deletions Resources/UI/SwiftUI/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# PovioKit: SwiftUI

A package including components to help you out developing for SwiftUI framework.

### Components

| Views |
| :--- |
| [ActionButton](ActionButton) |
| [PhotoPickerView](/Sources/UI/SwiftUI/Views/PhotoPickerView/PhotoPickerView.swift) |
| [ProfileImageView](ProfileImageView) |
| [ProgressStyle](/Sources/UI/SwiftUI/Views/ProgressStyle/ProgressStyle.swift) |
| [RemoteImage](/Sources/UI/SwiftUI/Views/RemoteImage/RemoteImage.swift) |
| [ScrollViewWithOffset](/Sources/UI/SwiftUI/Views/ScrollViewWithOffset/ScrollViewWithOffset.swift) |

| View Modifiers |
| :--- |
| [MeasureSizeModifier](/Sources/UI/SwiftUI/View%20Modifiers/MeasureSizeModifier.swift) |
| [OnFirstAppearModifier](/Sources/UI/SwiftUI/View%20Modifiers/OnFirstAppearModifier.swift) |
| [PhotoPickerModifier](/Sources/UI/SwiftUI/View%20Modifiers/PhotoPickerModifier.swift) |
| [PinchToZoomModifier](/Sources/UI/SwiftUI/View%20Modifiers/PinchToZoomModifier.swift) |
| [SquaredModifier](/Sources/UI/SwiftUI/View%20Modifiers/SquaredModifier.swift) |
| [TextFieldLimitModifer](/Sources/UI/SwiftUI/View%20Modifiers/TextFieldLimitModifer.swift) |

| Extensions |
| :--- |
| [AnyTransition](/Sources/UI/SwiftUI/Extensions/AnyTransition+PovioKit.swift) |
| [Color](/Sources/UI/SwiftUI/Extensions/Color+PovioKit.swift) |
| [Image](/Sources/UI/SwiftUI/Extensions/Image+PovioKit.swift) |
| [Text](/Sources/UI/SwiftUI/Extensions/Text+PovioKit.swift) |
| [View](/Sources/UI/SwiftUI/Extensions/View+PovioKit.swift) |
File renamed without changes.
12 changes: 12 additions & 0 deletions Resources/UI/UIKit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# PovioKit: UIKit

A package including components to help you out developing for UIKit framework.

### Components

| Views |
| :--- |
| [DynamicCollectionCell](DynamicCollectionCell) |
| [GradientView](GradientView) |
| [PaddingLabel](PaddingLabel) |
| [TextField](TextField) |
25 changes: 25 additions & 0 deletions Resources/Utilities/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# PovioKit: Utilities

Core package including utility tools.

### Utilities

| Available Utilities |
| :--- |
| [AppVersionValidator](/Sources/Utilities/AppVersionValidator/AppVersionValidator.swift) |
| [AttributedStringBuilder](AttributedStringBuilder) |
| [Broadcast](Broadcast) |
| [BundleReader](/Sources/Utilities/BundleReader/BundleReader.swift) |
| [Camera](/Sources/Utilities/Camera) |
| [ColorInterpolator](ColorInterpolator) |
| [Delegated](Delegated) |
| [DispatchTimer](DispatchTimer) |
| [Exif](Exif) |
| [ImageSource](/Sources/Utilities/ImageSource/ImageSource.swift) |
| [InAppPurchase](InAppPurchase) |
| [MediaPlayer](/Sources/Utilities/MediaPlayer) |
| [Money](Money) |
| [Property wrapper: UserDefaults](PropertyWrapper/UserDefaults) |
| [Property wrapper: XCConfigValue](PropertyWrapper/XCConfigValue) |
| [StartupService](StartupService) |
| [Throttler](Throttler) |
Loading