Skip to content

Split configuration by responsibility and tighten public value types #25

Description

@HituziANDO

Problem

SwiftyUpdateKitConfig combines identity, networking, comparison, presentation strings, retry settings, and storage environment in one long initializer. Some public types are also wider than needed: logs accept Any, successful version values remain optional, and condition protocols unnecessarily require reference types.

Scope

  • Group app identity, network policy, and built-in presentation content into focused value types.
  • Use non-optional UpdateInfo values for successful results.
  • Change the logger contract to accept String.
  • Remove AnyObject from condition protocols unless identity is required.
  • Provide compatibility initializers and adapters with a documented deprecation schedule.

Dependencies

Acceptance criteria

  • Networking code does not receive UI or storage settings it does not use.
  • Successful callbacks do not require callers to unwrap guaranteed values.
  • Value-type scheduling policies are supported.
  • Existing valid initialization code has a clear migration path.

Tests

  • Add compile-time API fixtures for old and new initialization paths and unit tests for configuration mapping.

Relevant files

  • Framework/Sources/SwiftyUpdateKitConfig.swift
  • Framework/Sources/Log.swift
  • Framework/Sources/SUK.swift
  • Framework/Sources/VersionCheckCondition.swift
  • Framework/Sources/RequestReviewCondition.swift
  • README.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions