Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Changelog

All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.0.0] - 2026-03-17

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Keep a Changelog recommends an ## [Unreleased] section at the top so future changes have a place to land.


See the [migration guide](Documentation/Migration-3.0.md) for upgrade steps.

### Breaking

- Requires Swift 6.2 (Xcode 26) and iOS 16.
- CocoaPods support removed; the package is distributed via Swift Package Manager only.
- `Coordinator`, `DefaultCoordinator`, `ConfiguringCoordinator`, `PushCoordinator`, `ModalCoordinator`, `ShowCoordinator`, `TabBarItemCoordinator`, `CoordinatorDelegate`, `Deselectable`, `AlertCoordinator` and `ErrorAction.alertStyle()` / `alertAction()` are `@MainActor`.
- `ErrorAction.ErrorHandler` is `@MainActor @Sendable () -> Void`.

### Added

- `Sendable` conformance for `ErrorAction`, `ErrorAction.Style`, `AlertCoordinator.Style` and `AlertCoordinator.Source`.
- `ErrorAction.title`, `action` and `style` are public.

### Changed

- Public signatures use explicit existentials (`any CoordinatorDelegate`, `any Error`, `any Deselectable`).

### Removed

- `Nibable` protocol. `UIView.nibName` remains available.
- `StoryboardType` and `StoryboardReference`.
- `HairlineLayoutConstraint` and `KeyboardHeightConstraint`.
- `FuntastyKitIBInspectable` library and its `UIView` IBInspectable extensions.

## Earlier versions

See [GitHub Releases](https://github.com/futuredapp/FuntastyKit/releases) for 2.3.0 and older.

[Unreleased]: https://github.com/futuredapp/FuntastyKit/compare/3.0.0...HEAD
[3.0.0]: https://github.com/futuredapp/FuntastyKit/compare/2.3.0...3.0.0
34 changes: 34 additions & 0 deletions Documentation/Migration-3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Migrating from 2.x to 3.0

3.0 requires **Xcode 26 (Swift 6.2)** and **iOS 16**; Swift 5 language mode still works. Only the changes below require action; see the [changelog](../CHANGELOG.md) for the full list.

## CocoaPods support removed

3.0 is distributed via Swift Package Manager only; to stay on CocoaPods, keep `pod 'FuntastyKit', '~> 2.3'`.

After switching, add `import UIKit` where files use UIKit types but only import FuntastyKit.

## Coordinators are `@MainActor`

`Coordinator` and all its sub-protocols, `CoordinatorDelegate` and `Deselectable` are now `@MainActor`. Nothing to do if your target uses default `MainActor` isolation; otherwise annotate code that creates or calls coordinators with `@MainActor`, or reach them with `await` / `Task { @MainActor in … }`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth a sentence on inference: a class that conforms to Coordinator / CoordinatorDelegate in its primary declaration becomes @MainActor as a whole (including its init). That's what propagates into view models that create or hold coordinators, and is likely where most upgrade errors come from.


A class that conforms to one of these protocols in its main declaration (not in an extension) becomes `@MainActor` as a whole, including its `init`, so code that creates it needs main-actor isolation too.

## `ErrorAction` handlers are `@MainActor @Sendable`

In Swift 6 language mode, create `ErrorAction` closures in `@MainActor` code (view controllers, coordinators), and type closures you pass through as `ErrorAction.ErrorHandler`.

## Removed APIs

| Removed | Replacement |
|---|---|
| `Nibable` | `UINib(nibName: MyView.nibName, bundle: nil).instantiate(withOwner: nil).lazy.compactMap { $0 as? MyView }.first!` |
| `StoryboardType`, `StoryboardReference` | `UIStoryboard(name:bundle:).instantiateViewController(identifier:)` |
| `HairlineLayoutConstraint` | Divide the constant by `traitCollection.displayScale` in code |
| `KeyboardHeightConstraint` | Pin to `view.keyboardLayoutGuide.topAnchor` |
| `FuntastyKitIBInspectable` | Remove the package product; set `layer` properties in code |

> [!WARNING]
> The compiler doesn't catch removals used from Interface Builder. Search your `.xib` and `.storyboard` files for `HairlineLayoutConstraint`, `KeyboardHeightConstraint` and the runtime attributes `borderWidth`, `borderColor` and `shadow…`. These fail silently: leftover attributes are skipped with only a console log, and leftover constraints become plain `NSLayoutConstraint`s.

To keep any of these as they were, copy them from [2.3.0](https://github.com/futuredapp/FuntastyKit/tree/2.3.0/Sources) into your app, add `@MainActor` to copied protocols, and change the *Module* of copied constraint classes in Interface Builder.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ When using Swift package manager add following line to your `Package.swift` file
.package(url: "https://github.com/futuredapp/FuntastyKit.git", from: "3.0.0")
```

Upgrading from 2.x? See the [migration guide](Documentation/Migration-3.0.md) and the [changelog](CHANGELOG.md).

## Note on the name

The name of the framework comes from the name of our company before rebranding, Funtasty. Now, we are called Futured, but FuturedKit will be very probably based on SwiftUI instead of UIKit.
Expand Down
Loading