name: piRemote
options:
  bundleIdPrefix: de.vpsj
  deploymentTarget:
    iOS: "17.0"
  xcodeVersion: "16.4"
  generateEmptyDirectories: true
  createIntermediateGroups: true

settings:
  base:
    SWIFT_VERSION: 6.0
    MARKETING_VERSION: 0.1.0
    CURRENT_PROJECT_VERSION: 1
    DEVELOPMENT_TEAM: KNXX8R3648
    CODE_SIGN_STYLE: Automatic
    ENABLE_BITCODE: NO

packages:
  SwiftTerm:
    url: https://github.com/migueldeicaza/SwiftTerm
    from: 1.2.0
  Starscream:
    url: https://github.com/daltoniam/Starscream
    from: 4.0.0

schemes:
  piRemote:
    build:
      targets:
        piRemote: all
    run:
      config: Debug
    test:
      config: Debug
      targets:
        - piRemoteTests
        - piRemoteUITests
    archive:
      config: Release

targets:
  piRemote:
    type: application
    platform: iOS
    deploymentTarget: "17.0"
    sources:
      - path: Sources
    resources:
      - path: Sources/App/Assets.xcassets
      - path: Sources/App/Preview Content
    settings:
      base:
        PRODUCT_BUNDLE_IDENTIFIER: de.vpsj.pi-remote
        INFOPLIST_FILE: Sources/App/Info.plist
        ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
    entitlements:
      path: Sources/App/piRemote.entitlements
    dependencies:
      - package: SwiftTerm
      - package: Starscream
    info:
      path: Sources/App/Info.plist
      properties:
        UILaunchScreen:
          UIColorName: ""
        UISupportedInterfaceOrientations:
          - UIInterfaceOrientationPortrait
          - UIInterfaceOrientationLandscapeLeft
          - UIInterfaceOrientationLandscapeRight
        NSCameraUsageDescription: "Used to scan QR codes for pairing."
        NSFaceIDUsageDescription: "Protects access to your pi sessions."
        UIBackgroundModes:
          - remote-notification
        CFBundleURLTypes:
          - CFBundleURLSchemes:
              - pi-remote

  piRemoteTests:
    type: bundle.unit-test
    platform: iOS
    sources:
      - path: Tests/CoreTests
    dependencies:
      - target: piRemote

  piRemoteUITests:
    type: bundle.ui-testing
    platform: iOS
    deploymentTarget: "17.0"
    sources:
      - path: UITests
    settings:
      base:
        TEST_TARGET_NAME: piRemote
        PRODUCT_BUNDLE_IDENTIFIER: de.vpsj.pi-remote.uitests
    dependencies:
      - target: piRemote
