This project contains private frameworks for Darwin platforms, including AttributeGraph
, RenderBox
and CoreUI
.
The frameworks are provided as xcframeworks available for macOS, iOS Simulator, and iOS1 platform.
Caution
These private frameworks are ONLY for research and educational purposes.
DO NOT use them in App Store submissions or ship them to production/release environments.
Using private frameworks in App Store apps will result in rejection and will crash your app in future OS update.
Warning
The scripts and xcframework code have only been tested on macOS 15.5 and iOS 18.5. Other system versions are not guaranteed to work.
Please resolve any compatibility issues yourself. Contributions are welcome!
AG/
: Contains theAttributeGraph
framework.CoreUI/
: Contains theCoreUI
framework.Examples/
: Contains example projects demonstrating usage of the private frameworks.RB/
: Contains theRenderBox
framework.Plugins/UpdateModule/
: Contains theUpdateModule
plugin for updating the frameworks.
After editing the sources, you need to update the xcframeworks to reflect the changes.
To update the xcframework, run the following commands:
swift package update-xcframeworks --allow-writing-to-package-directory
There are three ways supported to integrate and use these private frameworks:
For Swift Package Manager projects, add the dependency as a normal package dependency in your Package.swift
file:
dependencies: [
.package(url: "https://github.com/OpenSwiftUIProject/DarwinPrivateFrameworks.git", from: "0.0.2"),
]
Then import and use the frameworks directly in your Swift code.
For Xcode projects, first add the dependency as above and then manually drag the corresponding xcframework into your project:
- Locate the xcframework (e.g.,
AG/2024/AttributeGraph.xcframework
) - Drag it into your Xcode project's target Frameworks section
Alternatively, you could copy the corresponding AG binary directly into the framework directory of this repository to avoid manully xcframework adding.
However, for maintainability and file size considerations, this approach is not currently used.
In the future, once the project is stable, we may consider publishing a complete xcframework on GitHub for direct dependency.
- Use the following installation script to set up an internal SDK to use these private frameworks2 globally:
Scripts/install_private_sdk.sh MacOSX
- Choose the corresponding Internal SDK as the Base SDK in your Xcode project settings.
SDK Selection Guidelines:
- Xcode < 16.3: You can use the auto-detected "Internal SDK" (eg. macOS Internal SDK which corresponds to
macosx.internal
), or manually enter the full canonical name (e.g.macosx15.5.internal
).- Xcode ≥ 16.3: You must use the full canonical name for all platforms due to Xcode's stricter SDK detection:
For example:
- macOS:
macosx15.5.internal
- iOS Simulator:
iphonesimulator18.5.internal
- iOS Device:
iphoneos18.5.internal
Note: Command-line
xcodebuild
with-sdk macosx.internal
works regardless of Xcode version.Similar report: https://github.com/insidegui/researchsdk/commit/71259b0a0e8c92ba31131acbe024096fbe096844
- In your target's General tab, add the corresponding private framework shown in Apple SDKs part to the "Frameworks, Libraries, and Embedded Content" section.
- In your Swift code, import the frameworks as needed:
import AttributeGraph