只在以下 4 个文件内完成“免费版 + Pro”首期的底层能力接入,不处理设置页 UI:
src/Apptag/ProEntitlement.swiftsrc/Apptag/DataLayer.swiftsrc/Apptag/ApptagApp.swiftsrc/Apptag/AppGridTheme.swift目标包括:
ProEntitlement.swift 当前编译问题。ProEntitlementCenter.shared.start()。ProEntitlement.swiftcreateDirectory 缺少 attributes: 参数导致的编译错误。ProEntitlementError:featureLocked(ProFeature)noteQuotaExceeded(ProNoteQuotaStatus)ProEntitlementPolicy 辅助方法:lockedErrorIfNeeded(for:)requireUnlocked(_:)requireNoteSave(note:for:in:)noteSaveDecision(note:for:in:):blocked。allow 时返回的是“保存后”的额度状态,便于上层只改一个 callsite 使用。start() 里对 loadProductIfNeeded() 改为 try? awaitthemePreviewTask 去掉无意义 awaitTransaction.currentEntitlements(for:) 改为兼容 macOS 14 的 Transaction.currentEntitlements + productID 过滤DataLayer.swiftTagDatabase.exportTo(_:) 增加 layoutExport 硬门禁,未解锁直接 throw。TagDatabase.importFrom(_:) 增加 layoutImport 硬门禁,未解锁直接 throw。TagEditor.reorderApps(...) 增加 persistentAppSorting 硬门禁,免费态直接不落盘返回。TagEditor.setAppNote(...) 改为:@discardableResultProNoteSaveDecisionApptagApp.swiftapplicationDidFinishLaunching 中接入 ProEntitlementCenter.shared.start()。AppGridTheme.swiftstatic freeThemesstatic premiumThemesisFreeThemerequiresProisPremiumThemereorderApps 维持现有签名,免费态只禁止持久化,不主动改上层预览行为。setAppNote 通过返回 ProNoteSaveDecision 让上层只需调整一个 callsite 即可接门禁反馈。src/Apptag/ProEntitlement.swiftsrc/Apptag/DataLayer.swiftsrc/Apptag/ApptagApp.swiftsrc/Apptag/AppGridTheme.swiftbash ./build.sh 完成整包编译验证。src/build/TagLauncher.appTagEditor.setAppNote(...) 的 ProNoteSaveDecisionTagDatabase.exportTo/importFrom(...) 的 ProEntitlementErrorContentView.commitBubbleNote() 对 ProNoteSaveDecision 的处理