Skip to content

Commit

Permalink
Release/4.0.0 (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
borut-t authored May 20, 2024
2 parents 95371ae + 97f83fd commit 96fa97c
Show file tree
Hide file tree
Showing 176 changed files with 1,394 additions and 319 deletions.
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: 4 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Migration Guides

### Migration from versions < 4.0.0
* [Core] If you have used any utilities referencing to PovioKitCore package, you'll need to replace it. They've been moved to PovioKitUtilities.
* [UI] PovioKitUI package has been replaced by PovioKitUIKit and/or PovioKitSwiftUI. Replace depending on the type of UI code you were depending on.

### Migration from versions < 3.0.0
* [Auth] All Auth products are removed from the PovioKit package and effectivelly moved to a standalone repo https://github.com/poviolabs/PovioKitAuth. In order to continue using Auth products, install the new package `PovioKitAuth` package from the given repo url.

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. |
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Logger

Simple console logger.
Simple, yet performant console logger built on top of [OSLog](https://developer.apple.com/documentation/os/logging) framework.

## Log Levels

There is 6 levels defined to choose from
There are 6 levels defined to choose from
* info
* warn
* debug
Expand All @@ -30,4 +30,4 @@ Logger.debug("Something went wrong", params: ["objectId": 1])
```

## Source code
You can find source code [here](/Sources/Core/Utilities/Logger/Logger.swift).
You can find source code [here](/Sources/Core/Logger/Logger.swift).
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.

Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ actionButton.titleRightImage = .init(image: Image(systemName: "arrow.right"), si
```

## Source code
You can find source code [here](/Sources/UI/ActionButton/ActionButton.swift).
You can find source code [here](/Sources/UI/SwiftUI/Views/ActionButton/ActionButton.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ profileImageView.set(<Picture URL>, placeholder: <Optional Placeholder>)
```

## Source code
You can find source code [here](/Sources/UI/ProfileImageView).
You can find source code [here](/Sources/UI/SwiftUI/Views/ProfileImageView).
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) | Generic and customizable CTA button |
| [PhotoPickerView](/Sources/UI/SwiftUI/Views/PhotoPickerView/PhotoPickerView.swift) | Photo and Camera picker view used in combination with `PhotoPickerModifier` |
| [ProfileImageView](ProfileImageView) | Generic and customizable profile image view component |
| [ProgressStyle](/Sources/UI/SwiftUI/Views/ProgressStyle/ProgressStyle.swift) | Customizable ProgressViewStyle |
| [RemoteImage](/Sources/UI/SwiftUI/Views/RemoteImage/RemoteImage.swift) | Fetching remote images using Kingfisher |
| [ScrollViewWithOffset](/Sources/UI/SwiftUI/Views/ScrollViewWithOffset/ScrollViewWithOffset.swift) | ScrollView that expose offset as we scroll |

| View Modifiers | |
| :--- | :--- |
| [MeasureSizeModifier](/Sources/UI/SwiftUI/View%20Modifiers/MeasureSizeModifier.swift) | A modifier to return size of the underlying view |
| [OnFirstAppearModifier](/Sources/UI/SwiftUI/View%20Modifiers/OnFirstAppearModifier.swift) | Similar to the `OnAppear` modifier, but only runs once per view lifecycle |
| [PhotoPickerModifier](/Sources/UI/SwiftUI/View%20Modifiers/PhotoPickerModifier.swift) | Easily add photo or camera picker to the view |
| [PinchToZoomModifier](/Sources/UI/SwiftUI/View%20Modifiers/PinchToZoomModifier.swift) | Pinching and zooming in/out with ease |
| [SquaredModifier](/Sources/UI/SwiftUI/View%20Modifiers/SquaredModifier.swift) | Make given view squared. This is mostly used with images to properly keep the aspect ratio |
| [TextFieldLimitModifer](/Sources/UI/SwiftUI/View%20Modifiers/TextFieldLimitModifer.swift) | This modifier adds an upper bound text length limitation to the TextField |

| 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) |
Loading

0 comments on commit 96fa97c

Please sign in to comment.