Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	Sources/UI/SwiftUI/Views/RemoteImage/RemoteImage.swift
  • Loading branch information
borut-t committed May 20, 2024
2 parents 5f333ee + 96fa97c commit 3799751
Show file tree
Hide file tree
Showing 156 changed files with 361 additions and 195 deletions.
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
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) |
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ class ViewController: UIViewController {
```

## Source code
You can find source code [here](/Sources/UI/DynamicCollectionCell/DynamicCollectionCell.swift).
You can find source code [here](/Sources/UI/UIKit/DynamicCollectionCell/DynamicCollectionCell.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ A `UIView` subclass providing interface for managing gradient. Adding gradient b
TODO: usage through examples

## Source code
You can find source code [here](/Sources/UI/GradientView/GradientView.swift).
You can find source code [here](/Sources/UI/UIKit/GradientView/GradientView.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ label.contentInset = .init(all: 10) // added 10pt padding on all edges
```

## Source code
You can find source code [here](/Sources/UI/PaddingLabel/PaddingLabel.swift).
You can find source code [here](/Sources/UI/UIKit/PaddingLabel/PaddingLabel.swift).
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) |
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ guard validatableTextField.isValid else { return }
Validation will be triggered when `validatableTextField.isValid` is called. If validation doesn't pass, the error message will automatically display under the textfield.

## Source code
You can find source code [here](/Sources/UI/TextField/TextField.swift).
You can find source code [here](/Sources/UI/UIKit/TextField/TextField.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ We've shown how we can configure a couple of attributed parameters, like color,
The methods shown through examples above are actually just convenience methods calling generic `addAttribute(key: NSAttributedString.Key, object: Any?)` method. We can use this method instead to configure any other attributes we'd like.

## Source code
You can find source code [here](/Sources/Core/Utilities/AttributedStringBuilder).
You can find source code [here](/Sources/Utilities/AttributedStringBuilder).
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ class ViewController: UIViewController, AppEventObserver {
```

## Source code
You can find source code [here](/Sources/Core/Utilities/Broadcast/Broadcast.swift).
You can find source code [here](/Sources/Utilities/Broadcast/Broadcast.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ func prepareQRCodeSCanner() {
`func scanFailure()`

## Source code
You can find source code [here](/Sources/UI/Camera).
You can find source code [here](/Sources/Utilities/Camera).
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ try? colorInterpolator.interpolate(colorPoints: colors, percentage: percentage)
```

## Source code
You can find source code [here](/Sources/Core/Utilities/ColorInterpolator/ColorInterpolator.swift).
You can find source code [here](/Sources/Utilities/ColorInterpolator/ColorInterpolator.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ class Controller: UIViewController, UITableViewDataSource {
https://medium.com/anysuggestion/preventing-memory-leaks-with-swift-compile-time-safety-49b845df4dc6

## Source code
You can find source code [here](/Sources/Core/Utilities/Delegated/Delegated.swift).
You can find source code [here](/Sources/Utilities/Delegated/Delegated.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ myTimer.stop() // you could eventually just nillify reference and the timer is t
```

## Source code
You can find source code [here](/Sources/Core/Utilities/DispatchTimer/DispatchTimer.swift).
You can find source code [here](/Sources/Utilities/DispatchTimer/DispatchTimer.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ do {
```

## Source code
You can find source code [here](/Sources/Core/Utilities/Exif/Exif.swift).
You can find source code [here](/Sources/Utilities/Exif/Exif.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ Task {
```

## Source code
You can find source code [here](/Sources/Core/Utilities/InAppPurchase).
You can find source code [here](/Sources/Utilities/InAppPurchase).
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ print(money2 < money3) // true
```

## Source code
You can find source code [here](/Sources/Core/Utilities/Money).
You can find source code [here](/Sources/Utilities/Money).
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ extension UserDefault {
```

## Source code
You can find source code [here](/Sources/Core/Utilities/PropertyWrapper/UserDefault.swift).
You can find source code [here](/Sources/Utilities/PropertyWrapper/UserDefault.swift).
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ enum Environment {
```

## Source code
You can find source code [here](/Sources/Core/Utilities/PropertyWrapper/XCConfigValue.swift).
You can find source code [here](/Sources/Utilities/PropertyWrapper/XCConfigValue.swift).
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](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) |
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ public final class FacebookSetupProcess: StartupProcess {
```

## Source code
You can find source code [here](/Sources/Core/Utilities/StartupService).
You can find source code [here](/Sources/Utilities/StartupService).
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ class SearchWorker {
```

## Source code
You can find source code [here](/Sources/Core/Utilities/Throttler/Throttler.swift).
You can find source code [here](/Sources/Utilities/Throttler/Throttler.swift).
2 changes: 1 addition & 1 deletion Sources/Async/AsyncThrottleSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// PovioKit
//
// Created by Toni K. Turk on 22/08/2023.
// Copyright © 2023 Povio Inc. All rights reserved.
// Copyright © 2024 Povio Inc. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// PovioKit
//
// Created by Povio Team on 26/04/2019.
// Copyright © 2023 Povio Inc. All rights reserved.
// Copyright © 2024 Povio Inc. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/Extensions/Foundation/Data+PovioKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// PovioKit
//
// Created by Povio Team on 21/08/2020.
// Copyright © 2023 Povio Inc. All rights reserved.
// Copyright © 2024 Povio Inc. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// PovioKit
//
// Created by Borut Tomažin on 11/11/2020.
// Copyright © 2023 Povio Inc. All rights reserved.
// Copyright © 2024 Povio Inc. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// PovioKit
//
// Created by Borut Tomažin on 11/11/2020.
// Copyright © 2023 Povio Inc. All rights reserved.
// Copyright © 2024 Povio Inc. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/Extensions/Foundation/Double+PovioKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// PovioKit
//
// Created by Borut Tomažin on 02/09/2022.
// Copyright © 2023 Povio Inc. All rights reserved.
// Copyright © 2024 Povio Inc. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// PovioKit
//
// Created by Borut Tomažin on 11/11/2020.
// Copyright © 2023 Povio Inc. All rights reserved.
// Copyright © 2024 Povio Inc. All rights reserved.
//

import Foundation
Expand Down
Loading

0 comments on commit 3799751

Please sign in to comment.