原生 macOS 客户端脚手架 + 元数据完整命名去缩写
- 命名去缩写:xcodegen 项目 + 四 target CDrop*→CommilitiaDrop*(CommilitiaDrop / …Share / …Widgets / …Tests);3 个 widget/control kind net.commilitia.cdrop.*→net.commilitia.Commilitia-Drop.*(旧装控件将成孤儿,需在设备重加);Tests @testable import CommilitiaDrop。刻意不动线协议 / 身份标识——bundle ID 家族、URL scheme cdrop://、Bonjour _cdrop._tcp、keychain service、DataChannel cdrop-file、entitlements 文件名——以免破跨端互通或丢会话 - 新增 macOS app target CommilitiaDropMac(platform macOS / deploymentTarget 26.0 / ARCHS arm64 / 与 iOS 同 bundle net.commilitia.Commilitia-Drop,同 App Store 记录 + 同 App Group):sources 仅 MacApp/,Info.plist 经 xcodegen 生成,本地 ad-hoc 免账号编译 - Mac 壳 MacApp/(Allman,#if os(macOS) 守卫,独立 @main 不与 iOS CDropApp 冲突):CommilitiaDropMacApp(@main + 单窗口 Window + windowResizability contentMinSize + 去 ⌘N + MenuBarExtra window 风格)、MacRootView(NavigationSplitView 侧栏五区骨架 传输/文件/消息/设备/设置 + 占位详情 MacPlaceholder + 品牌头)、MacMenuContent(菜单栏占位) - Support/macOS/AppMac.entitlements:App Group group.net.commilitia.Commilitia-Drop 预置待用;macOS 下 App Group 属受限能力须 provisioning profile,故脚手架阶段 project.yml 暂不引用,待 Phase 6 Developer ID 签名再挂 - 根 Justfile:ios-sim-build / ios-device 跟随重命名(项目 / scheme / .app 路径);新增 mac-build(xcodegen + xcodebuild -sdk macosx,本地 ad-hoc) - 验证:CommilitiaDropMac.app 与 CommilitiaDrop.app(iOS 模拟器)均 BUILD SUCCEEDED;WebRTC 走 -clonedSourcePackagesDirPath 复用已缓存 xcframework
This commit is contained in:
+56
-15
@@ -1,13 +1,17 @@
|
||||
name: CDrop
|
||||
name: CommilitiaDrop
|
||||
options:
|
||||
bundleIdPrefix: net.commilitia
|
||||
deploymentTarget:
|
||||
iOS: "26.0"
|
||||
macOS: "26.0"
|
||||
createIntermediateGroups: true
|
||||
# 源码以简体中文撰写;字符串目录承载 zh-Hant / en 翻译。语言跟随系统设置。
|
||||
developmentLanguage: zh-Hans
|
||||
# 原生数据面:iOS 走 libwebrtc(Safari 同款,与 iOS 网络栈原生集成)。预编译 xcframework 经
|
||||
# stasel/WebRTC 以 SPM 分发,仅二进制 target,pin 精确版本避免上游 M 版跳变改 API。替换早先
|
||||
# gomobile/pion 路径——pion 的 Go raw socket 不与 iOS Network framework 集成,真机确证不可靠
|
||||
# (见 desktop/NATIVE-TRANSFER.md §7 / cdrop-native-data-plane 记忆)。
|
||||
# (见 desktop/NATIVE-TRANSFER.md §7 / cdrop-native-data-plane 记忆)。libwebrtc 亦含 macOS 切片
|
||||
# (macos-x86_64_arm64 + maccatalyst),故同一 LibWebRtcEngine 可在原生 Mac target 复用。
|
||||
packages:
|
||||
WebRTC:
|
||||
url: https://github.com/stasel/WebRTC
|
||||
@@ -17,12 +21,12 @@ settings:
|
||||
SWIFT_VERSION: "5.0"
|
||||
# 模拟器用 ad-hoc 签名(身份 "-",无需 Apple 账号),使 App Group / Push 等 entitlement 在
|
||||
# 模拟器实际生效(否则共享容器不创建、远程通知注册失败)。真机签名须付费 ADP 配
|
||||
# team / provisioning profile(账号门控,见 REALDEVICE.md)。
|
||||
# team / provisioning profile(账号门控,见 REALDEVICE.md)。macOS 本地开发同走 ad-hoc。
|
||||
CODE_SIGN_IDENTITY: "-"
|
||||
CODE_SIGNING_REQUIRED: "NO"
|
||||
CODE_SIGNING_ALLOWED: "YES"
|
||||
targets:
|
||||
CDrop:
|
||||
CommilitiaDrop:
|
||||
type: application
|
||||
platform: iOS
|
||||
deploymentTarget: "26.0"
|
||||
@@ -30,9 +34,9 @@ targets:
|
||||
- path: Sources
|
||||
- path: Shared
|
||||
dependencies:
|
||||
- target: CDropShare
|
||||
- target: CommilitiaDropShare
|
||||
embed: true
|
||||
- target: CDropWidgets
|
||||
- target: CommilitiaDropWidgets
|
||||
embed: true
|
||||
# 原生数据面引擎(libwebrtc):SPM 预编 xcframework,Xcode 自动嵌入 + 签名。仅主 app 链接——
|
||||
# Share / 控件扩展不碰数据面,避免超扩展 120MB 内存限。见 LibWebRtcEngine.swift。
|
||||
@@ -98,7 +102,7 @@ targets:
|
||||
CODE_SIGN_ENTITLEMENTS: CDrop.entitlements
|
||||
# Share Extension:抓分享文件 → App Group 收件箱 → 深链主 app 选设备发送(只交接、不跑引擎,
|
||||
# 见 PLAN §I5)。只编 ShareViewController + 共享的 AppGroup,绝不拉主 app Sources(避超 120MB)。
|
||||
CDropShare:
|
||||
CommilitiaDropShare:
|
||||
type: app-extension
|
||||
platform: iOS
|
||||
deploymentTarget: "26.0"
|
||||
@@ -129,7 +133,7 @@ targets:
|
||||
CODE_SIGN_ENTITLEMENTS: Share/CDropShare.entitlements
|
||||
# 控制中心剪贴板两控件(WidgetKit ControlWidget,iOS 18+,PLAN §I4)。纯原生 REST + 控件专用
|
||||
# 设备会话(不跑引擎)。i18n JSON 一并打包使控件标签随设备语言(t() 经 no-subdir 回退读 bundle)。
|
||||
CDropWidgets:
|
||||
CommilitiaDropWidgets:
|
||||
type: app-extension
|
||||
platform: iOS
|
||||
deploymentTarget: "26.0"
|
||||
@@ -150,30 +154,67 @@ targets:
|
||||
CODE_SIGN_ENTITLEMENTS: Widgets/CDropWidgets.entitlements
|
||||
# 单元 / 集成测试(模拟器,无需签名):原生数据面 libwebrtc 引擎的环回端到端测试——两个
|
||||
# LibWebRtcEngine 在同进程内交叉连,跑完整线协议(offer/answer/ICE + meta/分片/done + ack +
|
||||
# 收尾)验证文件字节完整性。宿主即 CDrop app(@testable import 取内部类型 + 经 app 链接 WebRTC)。
|
||||
CDropTests:
|
||||
# 收尾)验证文件字节完整性。宿主即主 app(@testable import 取内部类型 + 经 app 链接 WebRTC)。
|
||||
CommilitiaDropTests:
|
||||
type: bundle.unit-test
|
||||
platform: iOS
|
||||
deploymentTarget: "26.0"
|
||||
sources:
|
||||
- path: Tests
|
||||
dependencies:
|
||||
- target: CDrop
|
||||
- target: CommilitiaDrop
|
||||
- package: WebRTC
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: net.commilitia.Commilitia-Drop.tests
|
||||
TEST_HOST: "$(BUILT_PRODUCTS_DIR)/CDrop.app/CDrop"
|
||||
TEST_HOST: "$(BUILT_PRODUCTS_DIR)/CommilitiaDrop.app/CommilitiaDrop"
|
||||
BUNDLE_LOADER: "$(TEST_HOST)"
|
||||
GENERATE_INFOPLIST_FILE: "YES"
|
||||
# 原生 macOS 客户端:桌面壳(MacApp/)替代 iOS 标签栏,@main 的 #if os(macOS) 分支驱动单窗口 +
|
||||
# 菜单栏。与 iOS 同 bundle(net.commilitia.Commilitia-Drop,同 App Store 记录 / 同 App Group)。
|
||||
# 当前为脚手架:仅编 MacApp/(导航骨架 + 菜单栏占位);引擎(LibWebRtcEngine + 离屏 WebView)与
|
||||
# 复用视图随后续阶段并入。ARCHS arm64(本机 Apple Silicon);本地 ad-hoc 签名(base 继承)。
|
||||
CommilitiaDropMac:
|
||||
type: application
|
||||
platform: macOS
|
||||
deploymentTarget: "26.0"
|
||||
sources:
|
||||
- path: MacApp
|
||||
info:
|
||||
path: Support/macOS/App-Info.plist
|
||||
properties:
|
||||
CFBundleName: Commilitia Drop
|
||||
CFBundleDisplayName: Commilitia Drop
|
||||
LSMinimumSystemVersion: "26.0"
|
||||
CFBundleDevelopmentRegion: zh-Hans
|
||||
CFBundleLocalizations:
|
||||
- zh-Hans
|
||||
- zh-Hant
|
||||
- en
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: net.commilitia.Commilitia-Drop
|
||||
PRODUCT_NAME: CommilitiaDropMac
|
||||
ARCHS: arm64
|
||||
# App Group entitlement(Support/macOS/AppMac.entitlements)在 macOS 属受限能力,即便
|
||||
# ad-hoc 签名也须 provisioning profile;脚手架阶段(本地免账号编译 / 自测)暂不挂,待桌面
|
||||
# 剪贴板 / 小组件共享落地 + Developer ID 签名(Phase 6)再引用该文件。见 AppMac.entitlements。
|
||||
schemes:
|
||||
CDrop:
|
||||
CommilitiaDrop:
|
||||
build:
|
||||
targets:
|
||||
CDrop: all
|
||||
CommilitiaDrop: all
|
||||
test:
|
||||
targets:
|
||||
- CDropTests
|
||||
- CommilitiaDropTests
|
||||
gatherCoverageData: false
|
||||
run:
|
||||
config: Debug
|
||||
CommilitiaDropMac:
|
||||
build:
|
||||
targets:
|
||||
CommilitiaDropMac: all
|
||||
run:
|
||||
config: Debug
|
||||
archive:
|
||||
config: Release
|
||||
|
||||
Reference in New Issue
Block a user