Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DeviceNameKit Core Implementation & Documentation #1

Merged
merged 13 commits into from
Feb 28, 2025

Conversation

kimdaehee0824
Copy link
Owner

@kimdaehee0824 kimdaehee0824 commented Feb 28, 2025

Description

This PR adds the core implementation of DeviceNameKit, including the main functionality for retrieving and caching device model names. It also includes documentation and a structured README.

1. Core Implementation

  • DeviceNameFetcher: Retrieves the device model name
  • DeviceModelProvider: Provides device identifiers for different platforms (iOS, macOS, watchOS, tvOS, visionOS)
  • DeviceNameCachePolicy: Implements caching strategies (.noCache, .oneDay, .threeDays, .sevenDays, .oneMonth, .custom)
  • preload(): Preloads device data for optimized performance
  • deviceModel: Provides immediate access to the cached model name

2. Async and Reactive Programming Support

  • Supports async/await, completion handlers, and Combine API
  • Implements network requests with URLSession
  • Uses UserDefaults for local caching

3. Documentation and README

  • README.md: Installation instructions, usage examples, caching policies, and technical details
  • Uses Markdown formatting for readability

Changes

  • README.md (English version, structured documentation)
  • README_ko.md (korean version)
  • Sources/DeviceNameKit/DeviceNameFetcher.swift
  • Sources/DeviceNameKit/DeviceModelProvider.swift
  • Sources/DeviceNameKit/DeviceNameCachePolicy.swift
  • Sources/DeviceNameKit/Constant.swift
  • Tests/DeviceNameKitTests/DeviceNameFetcherTests.swift

@kimdaehee0824 kimdaehee0824 changed the title Merge Project Add DeviceNameKit Core Implementation & Documentation Feb 28, 2025
@kimdaehee0824 kimdaehee0824 self-assigned this Feb 28, 2025
@kimdaehee0824 kimdaehee0824 added the enhancement New feature or request label Feb 28, 2025
@kimdaehee0824 kimdaehee0824 merged commit 260e999 into main Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants