XcodePostFacto enables the use of Yosemite-only Xcode 6.3 on Mac OS X 10.9 Mavericks.
The name is, of course, a nod to the original XPostFacto.
It seems a bit gratitious to break compatibility with an OS release that was current less than 6 months ago, and while the the Yosemite upgrade is free, it has its own inherent costs -- especially in terms of privacy and quality issues.
Plus, I don't like being told what to do :-)
After building the xpf-bootstrap.framework
, Xcode can be launched from the command-line:
env DYLD_INSERT_LIBRARIES=$ABSOLUTE_PATH_TO_FRAMEWORK/xpf-bootstrap.framework/xpf-bootstrap /Applications/Xcode.app/Contents/MacOS/Xcode
Contribution of a wrapping launch application would be most appreciated, especially one that supports drag-and-drop of the Xcode binary to create a new launcher :-)
XcodePostFacto is fully self-hosting, and is being used for full-time Mac development work. However, issues certainly still remain, and I expect to find and fix issues during day-to-day use of Xcode.
There are a number of hurdles to getting Xcode 6.3 running on an earlier release:
LaunchServices
and triggering an abort() in HIServices
if you bypass the initial LaunchServices
check.To resolve these issues, we must patch Xcode and system libraries: disabling the legacy compatibility code, all version checks, and performing runtime rebinding of missing symbols.
XcodePostFacto leverages the following mechanisms to achieve this:
dyld_register_image_state_change_handler
API is used to hook dyld
and modify library symbol references that are critical to bootstrapping the process:
BIND_OPCODE_*
evaluator to rebind symbols to our custom replacements.DVTPlugInManager
class. This patch adds xpf_bootstrap.framework/Contents/Resources/Xcode
to DVTPlugInManager
's plugin search path. xpf_bootstrap.framework/Contents/Resources/Xcode
uses Xcode's standard plugin mechanisms to hook the IDEInitialize
step, performing a final set of bootstrap operations within the now-initialized Xcode process.