name: MixBoardiOS
options:
  bundleIdPrefix: com.mixboard
  deploymentTarget:
    iOS: "17.0"
  generateEmptyDirectories: true
  xcodeVersion: "16.0"

settings:
  base:
    SWIFT_VERSION: "5.9"
    IPHONEOS_DEPLOYMENT_TARGET: "17.0"

targets:
  MixBoardiOS:
    type: application
    platform: iOS
    sources:
      - path: Sources
    info:
      path: Info.plist
      properties:
        UIBackgroundModes: [audio]
    settings:
      base:
        PRODUCT_BUNDLE_IDENTIFIER: com.mixboard.MixBoardiOS
        PRODUCT_NAME: MixBoard
        INFOPLIST_GENERATION_MODE: GeneratedByXcode
        GENERATE_INFOPLIST_FILE: YES
        MARKETING_VERSION: "1.0.0"
        CURRENT_PROJECT_VERSION: 1
        SWIFT_EMIT_LOC_STRINGS: YES
        ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
        ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS: YES
        ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES: "AppIcon-Green AppIcon-Lime AppIcon-Cyan AppIcon-Blue AppIcon-Purple AppIcon-Pink AppIcon-Red AppIcon-Orange AppIcon-Gold AppIcon-White"
        CODE_SIGN_ENTITLEMENTS: MixBoardiOS.entitlements
        SWIFT_OBJC_BRIDGING_HEADER: Sources/OGG/MixBoard-Bridging-Header.h
        HEADER_SEARCH_PATHS: "$(SRCROOT)/Sources/OpusLib/include $(SRCROOT)/Sources/OpusLib/include/opus $(SRCROOT)/Sources/OpusLib/include/ogg"
        LIBRARY_SEARCH_PATHS[sdk=iphoneos*]: "$(SRCROOT)/Sources/OpusLib/lib"
        LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*]: ""
        OTHER_LDFLAGS[sdk=iphoneos*]: "-logg -lopus -lopusfile"
        OTHER_LDFLAGS[sdk=iphonesimulator*]: ""
        SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphonesimulator*]: "DISABLE_OPUS"
        GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*]: "DISABLE_OPUS=1"
        INFOPLIST_KEY_LSApplicationCategoryType: "public.app-category.music"
        INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents: YES
        INFOPLIST_KEY_UILaunchScreen_Generation: YES
        INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad: "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"
        INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone: "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"
        INFOPLIST_KEY_UISupportsDocumentBrowser: YES
        INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace: YES
        SUPPORTS_MACCATALYST: NO
        TARGETED_DEVICE_FAMILY: "1,2"
      configs:
        Debug:
          CODE_SIGN_IDENTITY: "Apple Development"
          SWIFT_OPTIMIZATION_LEVEL: "-Onone"
        Release:
          SWIFT_OPTIMIZATION_LEVEL: "-O"

  MixBoardiOSTests:
    type: bundle.unit-test
    platform: iOS
    sources:
      - path: Tests
    dependencies:
      - target: MixBoardiOS
    settings:
      base:
        PRODUCT_BUNDLE_IDENTIFIER: com.mixboard.MixBoardiOSTests
        GENERATE_INFOPLIST_FILE: YES
        TEST_HOST: "$(BUILT_PRODUCTS_DIR)/MixBoard.app/MixBoard"
        BUNDLE_LOADER: "$(TEST_HOST)"
        HEADER_SEARCH_PATHS: "$(SRCROOT)/Sources/OpusLib/include $(SRCROOT)/Sources/OpusLib/include/opus $(SRCROOT)/Sources/OpusLib/include/ogg"
        SWIFT_OBJC_BRIDGING_HEADER: ""
        SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphonesimulator*]: "DISABLE_OPUS"
        GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*]: "DISABLE_OPUS=1"

  MixBoardiOSUITests:
    type: bundle.ui-testing
    platform: iOS
    sources:
      - path: UITests
    dependencies:
      - target: MixBoardiOS
    settings:
      base:
        PRODUCT_BUNDLE_IDENTIFIER: com.mixboard.MixBoardiOSUITests
        GENERATE_INFOPLIST_FILE: YES
        TEST_TARGET_NAME: MixBoardiOS
