To create a new private SDK xcframework like BacklightServices, follow these steps:
Command Summary
# 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
Key Files Created
Info.plist - Defines the xcframework structure with library identifiers for each platform
update.sh - Script to regenerate the xcframework from tbd files
README.md - Documentation for the framework
tbds/ - Directory containing .tbd stub files for each platform:
ios-arm64-arm64e (iPhone device)
ios-arm64-x86_64-simulator (iPhone Simulator)
xros-arm64-x86_64-simulator (visionOS Simulator)
For Swift frameworks:
Sources/Modules/<FrameworkName>.swiftmodule/template.swiftinterface - Template for Swift interface generation
Sources/Modules/module.modulemap - Module map defining the framework's module structure
Platform Support
The framework supports:
iOS Device (arm64, arm64e)
iOS Simulator (arm64, x86_64)
visionOS Simulator (arm64, x86_64)
Notes
The xcrun tapi stubify command is used to generate .tbd files from framework binaries
The 2024 version corresponds to iOS 18.5, macOS 15.5, and visionOS 2.5
Always create a symlink named latest pointing to the current version directory
Swift frameworks require a template.swiftinterface file for proper module interface generation (see AttributeGraph for example)
Objective-C frameworks require a module.modulemap and header files in the Sources directory
The update.sh script should handle copying these files into the generated xcframework structure
Create framework: $ARGUMENTS
1---2name: create-private-framework3description: Claude Command to Create Private SDK XCFramework4---56To create a new private SDK xcframework like BacklightServices, follow these steps:78## Command Summary910```bash11# 1. Create directory structure12mkdir -p <FrameworkName>/{2024/{Sources,tbds},latest}13cd <FrameworkName>1415# 2. Create tbd subdirectories for each platform16mkdir -p 2024/tbds/{ios-arm64-arm64e,ios-arm64-x86_64-simulator,xros-arm64-x86_64-simulator}1718# 3. Extract tbd files from simulators19# For iOS Simulator20cp -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.framework21cd /tmp && xcrun tapi stubify ./<FrameworkName>_ios_simulator.framework22cp /tmp/<FrameworkName>_ios_simulator.framework/<FrameworkName>.tbd <path>/2024/tbds/ios-arm64-x86_64-simulator/2324# For visionOS Simulator25cp -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.framework26cd /tmp && xcrun tapi stubify ./<FrameworkName>_xros_simulator.framework27cp /tmp/<FrameworkName>_xros_simulator.framework/<FrameworkName>.tbd <path>/2024/tbds/xros-arm64-x86_64-simulator/2829# 4. Get iOS device tbd from GitHub30curl -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>.tbd3132# 5. Set up framework-specific files33# For Swift frameworks:34mkdir -p 2024/Sources/Modules/<FrameworkName>.swiftmodule35# Create template.swiftinterface with Swift module declarations3637# For Objective-C frameworks:38mkdir -p 2024/Sources/{Headers,Modules}39# Extract headers using ipsw class-dump (creates individual header files in a subdirectory)40ipsw 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/Headers41# This creates a <FrameworkName>/ subdirectory in Headers/ with all the header files42# Note: Headers are universal and can be used for all platforms (iOS, iOS Simulator, visionOS Simulator)43# Create module.modulemap in Modules/4445# 6. Create Info.plist for xcframework4647# 7. Create update.sh script4849# 8. Run update.sh to generate xcframework50./update.sh5152# 9. Create symlink to latest version53ln -s ./2024 latest54```5556## Key Files Created57581. **Info.plist** - Defines the xcframework structure with library identifiers for each platform592. **update.sh** - Script to regenerate the xcframework from tbd files603. **README.md** - Documentation for the framework614. **tbds/** - Directory containing .tbd stub files for each platform:62 - ios-arm64-arm64e (iPhone device)63 - ios-arm64-x86_64-simulator (iPhone Simulator)64 - xros-arm64-x86_64-simulator (visionOS Simulator)655. **For Swift frameworks:**66 - `Sources/Modules/<FrameworkName>.swiftmodule/template.swiftinterface` - Template for Swift interface generation676. **For Objective-C frameworks:**68 - `Sources/Headers/` - Directory containing framework header files69 - `Sources/Modules/module.modulemap` - Module map defining the framework's module structure7071## Platform Support7273The framework supports:74- iOS Device (arm64, arm64e)75- iOS Simulator (arm64, x86_64)76- visionOS Simulator (arm64, x86_64)7778## Notes7980- The `xcrun tapi stubify` command is used to generate .tbd files from framework binaries81- The 2024 version corresponds to iOS 18.5, macOS 15.5, and visionOS 2.582- Always create a symlink named `latest` pointing to the current version directory83- **Swift frameworks** require a `template.swiftinterface` file for proper module interface generation (see AttributeGraph for example)84- **Objective-C frameworks** require a `module.modulemap` and header files in the Sources directory85- The `update.sh` script should handle copying these files into the generated xcframework structure8687---8889Create framework: $ARGUMENTS
Run npx skillmds@latest add openswiftuiproject/create-private-framework in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Claude Command to Create Private SDK XCFramework It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
openswiftuiproject (@openswiftuiproject) published this skill. Their other Agent Skills are listed on their SkillMD profile.