Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 1.54 KB

File metadata and controls

34 lines (28 loc) · 1.54 KB

PlayolaPlayer Guidelines

Build & Test Commands

  • Build package: swift build
  • Build example app for simulator: cd PlayolaPlayerExample && xcodebuild -project PlayolaPlayerExample.xcodeproj -scheme PlayolaPlayerExample -destination 'platform=iOS Simulator,id=F8C70EF6-2658-40DE-ABB2-13B4EA4CFBD3' build -quiet
  • Run all tests: swift test
  • Run specific test: swift test --filter PlayolaPlayerTests/testName
  • Generate Xcode project: swift package generate-xcodeproj

Code Style Guidelines

  • Follow Swift API Design Guidelines
  • Use Swift Concurrency (async/await) for asynchronous operations
  • Document all public APIs with standard documentation comments
  • Maintain proper actor isolation for thread safety

Naming Conventions

  • Types: UpperCamelCase (AudioBlock, PlayolaStationPlayer)
  • Properties/methods: lowerCamelCase
  • Constants: lowerCamelCase
  • Acronyms: capitalize all letters in acronyms (e.g., URL, JSON)

Error Handling

  • Use PlayolaErrorReporter for consistent error reporting
  • Use proper async/await error handling with do/catch
  • Provide meaningful error contexts

Type Usage

  • Model types should conform to Codable, Sendable, Equatable & Hashable
  • Use strong typing and avoid optionals where possible
  • Use proper access control (public, internal, private)

PR Review Comments

  • After addressing a PR review comment, add a 👍 reaction to it via gh api /repos/{owner}/{repo}/pulls/comments/{id}/reactions -f content='+1'
  • For PR-level comments, use gh api /repos/{owner}/{repo}/issues/comments/{id}/reactions -f content='+1'