Integrate live phone and watch remote prototype with guarded motion control

This commit is contained in:
2026-09-18 19:11:52 +04:00
parent 3e787543c0
commit 8131f4f873
54 changed files with 4355 additions and 329 deletions
+6 -7
View File
@@ -6,13 +6,12 @@ trap 'rm -rf "$scratch"' EXIT
export CLANG_MODULE_CACHE_PATH="$scratch/clang-cache"
export SWIFTPM_MODULECACHE_OVERRIDE="$scratch/module-cache"
# These local packages have no third-party dependencies or plugins. Disable nested SwiftPM sandboxing
# for agent environments; Swift Testing does not need the XCTest bundle runner.
swift test --package-path Packages/WristivoKit --scratch-path "$scratch/swiftpm" \
--cache-path "$scratch/cache" --config-path "$scratch/config" \
--security-path "$scratch/security" --disable-sandbox --disable-xctest
swift test --package-path Adapters/WatchBridge --scratch-path "$scratch/watchbridge" \
--cache-path "$scratch/cache" --config-path "$scratch/config" \
--security-path "$scratch/security" --disable-sandbox --disable-xctest
# for agent environments. All adapter tests must execute, not merely compile.
for package in Packages/WristivoKit Adapters/WatchBridge Adapters/TVTransport Adapters/SecureStorage Adapters/PhoneControl; do
swift test --package-path "$package" --scratch-path "$scratch/$(basename "$package")" \
--cache-path "$scratch/cache" --config-path "$scratch/config" \
--security-path "$scratch/security" --disable-sandbox
done
plutil -lint Resources/PrivacyInfo.xcprivacy
if [ "${1:-}" = "--apps" ]; then
extra_args=()
+13
View File
@@ -29,6 +29,14 @@ bridge_package = project.new(Xcodeproj::Project::Object::XCLocalSwiftPackageRefe
bridge_package.relative_path = 'Adapters/WatchBridge'
project.root_object.package_references << bridge_package
adapter_packages = {}
%w[TVTransport SecureStorage PhoneControl MotionCapture].each do |name|
ref = project.new(Xcodeproj::Project::Object::XCLocalSwiftPackageReference)
ref.relative_path = "Adapters/#{name}"
project.root_object.package_references << ref
adapter_packages[name] = ref
end
def add_sources(project, target, pattern)
Dir.glob(pattern).sort.each do |path|
ref = project.main_group.find_file_by_path(path) || project.main_group.new_file(path)
@@ -69,12 +77,16 @@ link_product(project, phone, package, 'SamsungProtocol')
link_product(project, watch, package, 'GestureCore')
link_product(project, phone, bridge_package, 'WatchBridgePhone')
link_product(project, watch, bridge_package, 'WatchBridgeWatch')
%w[TVTransport SecureStorage PhoneControl].each { |name| link_product(project, phone, adapter_packages[name], name) }
link_product(project, watch, adapter_packages['MotionCapture'], 'MotionCapture')
phone.build_configurations.each do |c|
c.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = '$(WRISTIVO_BUNDLE_PREFIX)'
c.build_settings['TARGETED_DEVICE_FAMILY'] = '1,2'
c.build_settings['INFOPLIST_KEY_UILaunchScreen_Generation'] = 'YES'
c.build_settings['INFOPLIST_KEY_UIApplicationSceneManifest_Generation'] = 'YES'
c.build_settings['SUPPORTS_MACCATALYST'] = 'NO'
c.build_settings['INFOPLIST_KEY_UISupportedInterfaceOrientations'] = 'UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight'
c.build_settings['INFOPLIST_KEY_NSLocalNetworkUsageDescription'] = 'Wristivo connects to the TV you select on your home network to pair and send remote commands.'
end
watch.build_configurations.each do |c|
c.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = '$(WRISTIVO_BUNDLE_PREFIX).watchkitapp'
@@ -83,6 +95,7 @@ watch.build_configurations.each do |c|
c.build_settings['INFOPLIST_KEY_WKCompanionAppBundleIdentifier'] = '$(WRISTIVO_BUNDLE_PREFIX)'
c.build_settings['INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp'] = 'NO'
c.build_settings['SKIP_INSTALL'] = 'YES'
c.build_settings['INFOPLIST_KEY_NSMotionUsageDescription'] = 'Wristivo uses wrist movement during calibration and active gesture sessions to recognize TV remote directions.'
end
phone.add_dependency(watch)
embed = phone.new_copy_files_build_phase('Embed Watch Content')