name: IronStorage
options:
  bundleIdPrefix: de.rfc1437
settings:
  ENABLE_USER_SCRIPT_SANDBOXING: NO
  SWIFT_VERSION: "5.0"
targets:
  IronStorage:
    type: application
    platform: iOS
    deploymentTarget: "17.0"
    settings:
      PRODUCT_BUNDLE_IDENTIFIER: de.rfc1437.ironstorage
      MARKETING_VERSION: "0.1.0"
      CURRENT_PROJECT_VERSION: "1"
      TARGETED_DEVICE_FAMILY: "1"
      SWIFT_OBJC_BRIDGING_HEADER: IronStorage-Bridging-Header.h
      LIBRARY_SEARCH_PATHS: "$(inherited) $(DERIVED_FILE_DIR)/rust"
      OTHER_LDFLAGS: "$(inherited) -lironstorage_apple"
    info:
      path: Info.plist
      properties:
        CFBundleDisplayName: IronStorage
        ITSAppUsesNonExemptEncryption: false
        NSFaceIDUsageDescription: Unlock your GPG key for protected password operations.
        NSCameraUsageDescription: Scan GPG key transfer QR codes that you choose to import.
        UILaunchScreen: {}
        UISupportedInterfaceOrientations:
          - UIInterfaceOrientationPortrait
    sources:
      - Assets.xcassets
      - Sources/App
      - Generated/ironstorage_apple.swift
    preBuildScripts:
      - name: Build Rust core
        basedOnDependencyAnalysis: false
        script: |
          ./build_rust_core.bash
        outputFiles:
          - $(DERIVED_FILE_DIR)/rust/libironstorage_apple.a
  IronStorageAutoFill:
    type: app-extension
    platform: iOS
    deploymentTarget: "17.0"
    settings:
      PRODUCT_BUNDLE_IDENTIFIER: de.rfc1437.ironstorage.autofill
      APPLICATION_EXTENSION_API_ONLY: YES
      SKIP_INSTALL: YES
      SWIFT_OBJC_BRIDGING_HEADER: IronStorage-Bridging-Header.h
      LIBRARY_SEARCH_PATHS: "$(inherited) $(DERIVED_FILE_DIR)/rust"
      OTHER_LDFLAGS: "$(inherited) -lironstorage_apple"
    info:
      path: AutoFill-Info.plist
      properties:
        CFBundleDisplayName: IronStorage AutoFill
        NSExtension:
          NSExtensionPointIdentifier: com.apple.authentication-services-credential-provider-ui
          NSExtensionPrincipalClass: $(PRODUCT_MODULE_NAME).CredentialProviderViewController
    sources:
      - Sources/AutoFill
      - Generated/ironstorage_apple.swift
    preBuildScripts:
      - name: Build Rust core
        basedOnDependencyAnalysis: false
        script: |
          ./build_rust_core.bash
        outputFiles:
          - $(DERIVED_FILE_DIR)/rust/libironstorage_apple.a
  IronStorageWatch:
    type: application
    platform: watchOS
    deploymentTarget: "10.0"
    settings:
      PRODUCT_BUNDLE_IDENTIFIER: de.rfc1437.ironstorage.watch
      PRODUCT_NAME: IronStorage Watch
      SKIP_INSTALL: YES
    info:
      path: Watch-Info.plist
      properties:
        CFBundleDisplayName: IronStorage
        WKCompanionAppBundleIdentifier: de.rfc1437.ironstorage
    sources:
      - Sources/Watch
