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
14 changes: 6 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ on:

jobs:
test:
runs-on: macos-latest
runs-on: macos-26

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Install SwiftLint
run: |
brew install swiftlint
- name: Lint
run: |
swiftlint --strict
- name: Pod lib lint
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec pod lib lint
- name: Test
run: |
xcodebuild -scheme FuntastyKit-Package -destination 'platform=iOS Simulator,name=iPhone 8' -sdk iphonesimulator test
xcodebuild -scheme FuntastyKit -destination 'platform=iOS Simulator,name=iPhone 17 Pro Max' -sdk iphonesimulator test
74 changes: 4 additions & 70 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,71 +1,5 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/

## Other
*.moved-aside
*.xcuserstate

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/
.swiftpm
Package.resolved

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/README.md

# Project, because it can be generated using SPM
*.xcodeproj
20 changes: 13 additions & 7 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
disabled_rules:
- line_length
excluded:
- Pods
- vendor
- .build
- .claude
analyzer_rules:
- unused_declaration
- unused_import
opt_in_rules:
- anyobject_protocol
- array_init
- attributes
- closure_body_length
- closure_end_indentation
- closure_spacing
- collection_alignment
- conditional_returns_on_newline
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
Expand All @@ -22,7 +23,6 @@ opt_in_rules:
- empty_collection_literal
- empty_count
- empty_string
- empty_xctest_method
- enum_case_associated_values_count
- explicit_init
- fallthrough
Expand All @@ -34,24 +34,29 @@ opt_in_rules:
- function_default_parameter_at_end
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- joined_default_parameter
- last_where
- legacy_multiple
- legacy_random
- let_var_whitespace
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- multiline_arguments
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- multiline_parameters_brackets
- nimble_operator
- no_extension_access_modifier
- number_separator
- object_literal
- operator_usage_whitespace
- optional_enum_case_matching
- overridden_super_call
- override_in_extension
- pattern_matching_keywords
- prefer_self_type_over_type_of_self
- private_action
- private_outlet
Expand All @@ -69,8 +74,6 @@ opt_in_rules:
- trailing_closure
- unneeded_parentheses_in_closure_argument
- untyped_error_in_catch
- unused_declaration
- unused_import
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- yoda_condition
Expand All @@ -82,6 +85,9 @@ identifier_name:
- x
- y
- z
- pr

type_body_length: 400

# Disable errors, allow only warnings
cyclomatic_complexity:
Expand Down
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# CLAUDE.md — FuntastyKit

## Build & Test

This is an iOS framework — use the Xcode toolchain (`xcrun`), not the local Swift toolchain:

```bash
# Build (requires iOS SDK via Xcode)
xcodebuild build -scheme FuntastyKit -destination 'platform=iOS Simulator,name=iPhone 17 Pro Max' -sdk iphonesimulator

# Run tests (matches CI)
xcodebuild test -scheme FuntastyKit -destination 'platform=iOS Simulator,name=iPhone 17 Pro Max' -sdk iphonesimulator

# Lint
swiftlint --strict
```

Note: `swift build` / `swift test` do not work because UIKit is not available on macOS host. Always use `xcodebuild` with an iOS simulator destination.

## Project Structure

Single SPM target:

- **FuntastyKit** (`Sources/FuntastyKit/`) — Core: Coordinator pattern, error handling, UIKit extensions

Tests are in `FuntastyKitTests`.

## Architecture

Swift 6.2 with explicit `@MainActor` annotations on all public protocols and UIKit-facing types. No `defaultIsolation` — all isolation is spelled out in source. Extensions on `@MainActor` protocols and UIKit classes inherit isolation automatically; only standalone types/extensions that create UIKit objects need their own `@MainActor`.

Tests use Swift Testing (`import Testing`, `@Suite`, `@Test`). Types in the test target that conform to library protocols need explicit `@MainActor` annotations.

Coordinator protocol hierarchy for UIKit navigation:
`Coordinator` → `DefaultCoordinator` → `ConfiguringCoordinator` → `PushCoordinator` / `ModalCoordinator` / `ShowCoordinator` / `TabBarItemCoordinator`

Each coordinator type provides a default `start()` implementation for its navigation style. `CoordinatorDelegate` notifies on `willStop`/`didStop`.

## SwiftLint

Strict mode enabled. Key style rules to follow:
- `no_extension_access_modifier`: Use `extension Foo { public func ... }`, not `public extension Foo { func ... }`
- `let_var_whitespace`: Blank line before variable declarations
- `pattern_matching_keywords`: Move `let`/`var` outside tuples in pattern matching
- `implicitly_unwrapped_optional`: Avoid `!` optionals
- `multiline_arguments`: Multi-line function calls should have each argument on its own line

Key thresholds:
- Cyclomatic complexity: warning at 10
- Function parameters: max 5
- Large tuple: warning 3, error 4
- Type name/body max length: 50 / 400
- `line_length` is disabled
- `force_cast` and `force_try` are warnings (not errors)

## CI (GitHub Actions)

Runs on PRs (`test.yml`): SwiftLint --strict → xcodebuild test.
29 changes: 0 additions & 29 deletions FuntastyKit.podspec

This file was deleted.

5 changes: 0 additions & 5 deletions Gemfile

This file was deleted.

93 changes: 0 additions & 93 deletions Gemfile.lock

This file was deleted.

Loading