# XcodeGen spec - the single source of truth for the native iOS project.
# Regenerate the .xcodeproj at any time with: xcodegen generate

name: Thingtime

options:
  bundleIdPrefix: com.thingtime
  deploymentTarget:
    iOS: "17.0"
  createIntermediateGroups: true
  developmentLanguage: en

settings:
  base:
    MARKETING_VERSION: "1.0"
    CURRENT_PROJECT_VERSION: "13"
    SWIFT_VERSION: "5.9"
    DEVELOPMENT_TEAM: $(DEVELOPMENT_TEAM)
  configs:
    Debug:
      CODE_SIGN_STYLE: Automatic
      CODE_SIGN_IDENTITY: "Apple Development"
    Release:
      CODE_SIGN_STYLE: Automatic
      CODE_SIGN_IDENTITY: "Apple Distribution"

configFiles:
  Debug: config/Debug.xcconfig
  Release: config/Release.xcconfig

targets:
  Thingtime:
    type: application
    platform: iOS
    sources:
      - path: Thingtime
    info:
      path: Thingtime/Resources/Info.plist
      properties:
        CFBundleDisplayName: Thingtime
        CFBundleShortVersionString: $(MARKETING_VERSION)
        CFBundleVersion: $(CURRENT_PROJECT_VERSION)
        ThingtimeWebURL: $(THINGTIME_WEB_URL)
        ITSAppUsesNonExemptEncryption: false
        UILaunchScreen: {}
        UISupportedInterfaceOrientations:
          - UIInterfaceOrientationPortrait
          - UIInterfaceOrientationPortraitUpsideDown
          - UIInterfaceOrientationLandscapeLeft
          - UIInterfaceOrientationLandscapeRight
        UIApplicationSceneManifest:
          UIApplicationSupportsMultipleScenes: false
    settings:
      base:
        PRODUCT_BUNDLE_IDENTIFIER: $(PRODUCT_BUNDLE_IDENTIFIER)
        GENERATE_INFOPLIST_FILE: false
        TARGETED_DEVICE_FAMILY: "1,2"
        ENABLE_PREVIEWS: true
        ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
    dependencies: []

  ThingtimeTests:
    type: bundle.unit-test
    platform: iOS
    sources:
      - path: ThingtimeTests
    dependencies:
      - target: Thingtime
    settings:
      base:
        PRODUCT_BUNDLE_IDENTIFIER: $(PRODUCT_BUNDLE_IDENTIFIER).tests
        GENERATE_INFOPLIST_FILE: true

schemes:
  Thingtime:
    build:
      targets:
        Thingtime: all
        ThingtimeTests: [test]
    test:
      gatherCoverageData: true
      targets:
        - ThingtimeTests
    run:
      config: Debug
    archive:
      config: Release
