diff --git a/avlivebody-mac/.gitignore b/avlivebody-mac/.gitignore new file mode 100644 index 0000000..952b3f6 --- /dev/null +++ b/avlivebody-mac/.gitignore @@ -0,0 +1,4 @@ +*.xcodeproj/ +Config/Local.xcconfig +.build/ +.swiftpm/ diff --git a/avlivebody-mac/Config/Local.xcconfig.example b/avlivebody-mac/Config/Local.xcconfig.example new file mode 100644 index 0000000..d6d5e1f --- /dev/null +++ b/avlivebody-mac/Config/Local.xcconfig.example @@ -0,0 +1,3 @@ +// Copy to Config/Local.xcconfig and set your Apple Developer Team ID. +// Config/Local.xcconfig is gitignored. +DEVELOPMENT_TEAM = YOUR_TEAM_ID diff --git a/avlivebody-mac/Config/Shared.xcconfig b/avlivebody-mac/Config/Shared.xcconfig new file mode 100644 index 0000000..e8e9025 --- /dev/null +++ b/avlivebody-mac/Config/Shared.xcconfig @@ -0,0 +1,5 @@ +#include? "Local.xcconfig" + +MACOSX_DEPLOYMENT_TARGET = 15.0 +SWIFT_VERSION = 5.10 +CODE_SIGN_STYLE = Automatic diff --git a/avlivebody-mac/Sources/AVLiveBody/AVLiveBodyApp.swift b/avlivebody-mac/Sources/AVLiveBody/AVLiveBodyApp.swift new file mode 100644 index 0000000..83faa82 --- /dev/null +++ b/avlivebody-mac/Sources/AVLiveBody/AVLiveBodyApp.swift @@ -0,0 +1,23 @@ +import Cocoa +import SwiftUI + +/// Forces a regular, keyboard-focusable foreground app. +final class AppDelegate: NSObject, NSApplicationDelegate { + func applicationDidFinishLaunching(_ notification: Notification) { + NSApp.setActivationPolicy(.regular) + NSApp.activate() + } +} + +@main +struct AVLiveBodyApp: App { + @NSApplicationDelegateAdaptor(AppDelegate.self) + private var appDelegate + + var body: some Scene { + WindowGroup { + Text("AVLiveBody") + .frame(minWidth: 900, minHeight: 600) + } + } +} diff --git a/avlivebody-mac/Sources/AVLiveBody/Info.plist b/avlivebody-mac/Sources/AVLiveBody/Info.plist new file mode 100644 index 0000000..c9d68b1 --- /dev/null +++ b/avlivebody-mac/Sources/AVLiveBody/Info.plist @@ -0,0 +1,17 @@ + + + + + CFBundleNameAVLiveBody + CFBundleIdentifier$(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleExecutable$(EXECUTABLE_NAME) + CFBundlePackageTypeAPPL + CFBundleShortVersionString1.0 + CFBundleVersion1 + LSMinimumSystemVersion15.0 + NSCameraUsageDescription + Receives the tethered iPhone camera over USB. + NSLocalNetworkUsageDescription + Connects to the tethered iPhone over USB (usbmuxd). + + diff --git a/avlivebody-mac/Tests/AVLiveBodyTests/.gitkeep b/avlivebody-mac/Tests/AVLiveBodyTests/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/avlivebody-mac/project.yml b/avlivebody-mac/project.yml new file mode 100644 index 0000000..3e7df3c --- /dev/null +++ b/avlivebody-mac/project.yml @@ -0,0 +1,48 @@ +name: AVLiveBody +options: + bundleIdPrefix: cc.saillant + deploymentTarget: + macOS: "15.0" + createIntermediateGroups: true + +configFiles: + Debug: Config/Shared.xcconfig + Release: Config/Shared.xcconfig + +packages: + AVLiveWire: + path: ../shared/AVLiveWire + +targets: + AVLiveBody: + type: application + platform: macOS + deploymentTarget: "15.0" + sources: + - path: Sources/AVLiveBody + excludes: + - Info.plist + dependencies: + - package: AVLiveWire + product: AVLiveWire + configFiles: + Debug: Config/Shared.xcconfig + Release: Config/Shared.xcconfig + settings: + base: + PRODUCT_NAME: AVLiveBody + PRODUCT_BUNDLE_IDENTIFIER: cc.saillant.AVLiveBody + INFOPLIST_FILE: Sources/AVLiveBody/Info.plist + GENERATE_INFOPLIST_FILE: NO + CODE_SIGN_STYLE: Automatic + SWIFT_VERSION: "5.10" + ENABLE_HARDENED_RUNTIME: YES + AVLiveBodyTests: + type: bundle.unit-test + platform: macOS + sources: + - path: Tests/AVLiveBodyTests + dependencies: + - target: AVLiveBody + - package: AVLiveWire + product: AVLiveWire