基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/OpenSwiftUIProject/DarwinPrivateFrameworks --skill create-private-framework命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | create_private_framework |
| description | Claude Command to Create Private SDK XCFramework |
To create a new private SDK xcframework like BacklightServices, follow these steps:
# 1. Create directory structure
mkdir -p <FrameworkName>/{2024/{Sources,tbds},latest}
cd <FrameworkName>
# 2. Create tbd subdirectories for each platform
mkdir -p 2024/tbds/{ios-arm64-arm64e,ios-arm64-x86_64-simulator,xros-arm64-x86_64-simulator}
# 3. Extract tbd files from simulators
# For iOS Simulator
cp -r "/Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/<FrameworkName>.framework" /tmp/<FrameworkName>_ios_simulator.framework
cd /tmp && xcrun tapi stubify ./<FrameworkName>_ios_simulator.framework
cp /tmp/<FrameworkName>_ios_simulator.framework/<FrameworkName>.tbd <path>/2024/tbds/ios-arm64-x86_64-simulator/
# For visionOS Simulator
cp -r "/Library/Developer/CoreSimulator/Volumes/xrOS_22O473/Library/Developer/CoreSimulator/Profiles/Runtimes/xrOS 2.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/<FrameworkName>.framework" /tmp/<FrameworkName>_xros_simulator.framework
cd /tmp && xcrun tapi stubify ./<FrameworkName>_xros_simulator.framework
cp /tmp/<FrameworkName>_xros_simulator.framework/<FrameworkName>.tbd <path>/2024/tbds/xros-arm64-x86_64-simulator/
# 4. Get iOS device tbd from GitHub
curl -s "https://raw.githubusercontent.com/xybp888/iOS-SDKs/master/iPhoneOS18.5.sdk/System/Library/PrivateFrameworks/<FrameworkName>.framework/<FrameworkName>.tbd" > 2024/tbds/ios-arm64-arm64e/<FrameworkName>.tbd
# 5. Set up framework-specific files
# For Swift frameworks:
mkdir -p 2024/Sources/Modules/<FrameworkName>.swiftmodule
# Create template.swiftinterface with Swift module declarations
# For Objective-C frameworks:
mkdir -p 2024/Sources/{Headers,Modules}
# Extract headers using ipsw class-dump (creates individual header files in a subdirectory)
ipsw class-dump "/Library/Developer/CoreSimulator/Volumes/iOS_22F77/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.5.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/<FrameworkName>.framework/<FrameworkName>" --headers --arch arm64 -o 2024/Sources/Headers
# This creates a <FrameworkName>/ subdirectory in Headers/ with all the header files
# Note: Headers are universal and can be used for all platforms (iOS, iOS Simulator, visionOS Simulator)
# Create module.modulemap in Modules/
# 6. Create Info.plist for xcframework
# 7. Create update.sh script
# 8. Run update.sh to generate xcframework
./update.sh
# 9. Create symlink to latest version
ln -s ./2024 latest
Sources/Modules/<FrameworkName>.swiftmodule/template.swiftinterface - Template for Swift interface generationSources/Headers/ - Directory containing framework header filesSources/Modules/module.modulemap - Module map defining the framework's module structureThe framework supports:
xcrun tapi stubify command is used to generate .tbd files from framework binarieslatest pointing to the current version directorytemplate.swiftinterface file for proper module interface generation (see AttributeGraph for example)module.modulemap and header files in the Sources directoryupdate.sh script should handle copying these files into the generated xcframework structureCreate framework: $ARGUMENTS