Files
wristcode/watch/project.yml
T

136 lines
5.0 KiB
YAML

name: WristCode
options:
bundleIdPrefix: org.gbrown
createIntermediateGroups: true
deploymentTarget:
watchOS: "27.0"
settings:
base:
DEVELOPMENT_TEAM: GQJNM5YK2M
CODE_SIGN_STYLE: Automatic
SWIFT_VERSION: "6.0"
SWIFT_STRICT_CONCURRENCY: complete
MARKETING_VERSION: "0.1.0"
# Default build number; scripts/testflight.sh overrides it with CURRENT_PROJECT_VERSION=<n>.
CURRENT_PROJECT_VERSION: "1"
targets:
WristCode:
type: application
platform: watchOS
sources:
- WristCode
# The complication's views and the intent its buttons run, so the snapshot tests can render them.
- WristCodeWidget/WaitingView.swift
- WristCodeWidget/RespondIntent.swift
dependencies:
# Embedded in the watch app's PlugIns folder.
- target: WristCodeWidget
info:
path: WristCode/Info.plist
properties:
CFBundleDisplayName: WristCode
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
WKApplication: true
# Watch only, with no iPhone companion. watchOS refuses to install an app that sets both
# this and WKRunsIndependentlyOfCompanionApp, and requires WKCompanionAppBundleIdentifier
# when WKRunsIndependentlyOfCompanionApp is set without WKWatchOnly.
WKWatchOnly: true
# HTTPS only, so no export compliance documentation is needed.
ITSAppUsesNonExemptEncryption: false
# wristcode://thread/<hostId>/<threadId>, which the complication opens.
CFBundleURLTypes:
- CFBundleURLName: org.gbrown.wristcode
CFBundleURLSchemes: [wristcode]
WristCodeKeychainGroup: $(AppIdentifierPrefix)org.gbrown.wristcode.shared
entitlements:
path: WristCode/WristCode.entitlements
properties:
# Archives are signed for development; exporting for App Store Connect re-signs with the
# distribution profile, which turns this into production.
aps-environment: development
# Shared with the complication: the device token, gateway URL, demo flag and last summary.
# A Keychain group rather than an App Group, because automatic signing with an App Store
# Connect API key can register IDs and profiles but not App Groups.
keychain-access-groups: [$(AppIdentifierPrefix)org.gbrown.wristcode.shared]
settings:
base:
# The container's bundle ID plus .watchkitapp, as App Store validation requires. This is also
# the APNs topic.
PRODUCT_BUNDLE_IDENTIFIER: org.gbrown.wristcode.watchkitapp
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
# The complication. It shares the API client, models, Keychain store and demo fixtures with the
# app, and reads the device token through the shared Keychain group.
WristCodeWidget:
type: app-extension
platform: watchOS
sources:
- WristCodeWidget
- WristCode/API
- WristCode/Auth
- WristCode/Demo
- WristCode/Shared
- WristCode/Views/Theme.swift
info:
path: WristCodeWidget/Info.plist
properties:
CFBundleDisplayName: WristCode
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
NSExtension:
NSExtensionPointIdentifier: com.apple.widgetkit-extension
WristCodeKeychainGroup: $(AppIdentifierPrefix)org.gbrown.wristcode.shared
entitlements:
path: WristCodeWidget/WristCodeWidget.entitlements
properties:
keychain-access-groups: [$(AppIdentifierPrefix)org.gbrown.wristcode.shared]
settings:
base:
# Extensions take the watch app's bundle ID as a prefix.
PRODUCT_BUNDLE_IDENTIFIER: org.gbrown.wristcode.watchkitapp.widget
# The App Store only takes a watch-only app inside an empty iOS stub, the same pair Xcode's
# "Watch-only App" template creates. The stub owns the App Store Connect record
# (org.gbrown.wristcode) and embeds the watch app; it never installs on an iPhone.
WristCodeContainer:
type: application.watchapp2-container
platform: iOS
deploymentTarget: "27.0"
dependencies:
- target: WristCode
settings:
base:
PRODUCT_NAME: WristCode
PRODUCT_BUNDLE_IDENTIFIER: org.gbrown.wristcode
GENERATE_INFOPLIST_FILE: YES
INFOPLIST_KEY_CFBundleDisplayName: WristCode
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption: NO
TARGETED_DEVICE_FAMILY: "1"
WristCodeTests:
type: bundle.unit-test
platform: watchOS
sources:
- WristCodeTests
dependencies:
- target: WristCode
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: org.gbrown.wristcode.tests
GENERATE_INFOPLIST_FILE: YES
TEST_HOST: $(BUILT_PRODUCTS_DIR)/WristCode.app/WristCode
BUNDLE_LOADER: $(TEST_HOST)
schemes:
WristCode:
build:
targets:
WristCode: all
WristCodeContainer: [archive]
WristCodeTests: [test]
run:
config: Debug
test:
config: Debug
targets:
- WristCodeTests
archive:
config: Release