在 Mavericks 下运行 Yosemite-only 的应用程序 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
vista980622
V2EX    macOS

在 Mavericks 下运行 Yosemite-only 的应用程序

  •  
  •   vista980622 2015-04-27 09:38:04 +08:00 3647 次点击
    这是一个创建于 3900 天前的主题,其中的信息可能已经有所发展或是发生改变。

    从 Xcode 6.3 开始,Xcode 不再支持 Mavericks。强制修改版本号加载 app binary 无效,因为新版 Xcode 调用大量 10.10-only 的 API。

    前段时间在 Github 上看到了 https://github.com/landonf/XcodePostFacto/,看到作者那句 "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 :-)" 有点小感动。问了作者能不能把类似的方式用在其他 10.10-only 的 app 上。作者说可能实现,但需要不少时间和精力来开发维护。

    留在 10.9 的 V 友们有没有感兴趣的?可以去 Github 上看看实现方式。要是能有更通用的实现方法,就不用接受 Apple 的强制升级了。Office 2016、iWork'14、Davinqi Resolve 12、FCPX 10.2 之类的 app 也就都能用了啊!

    附上作者实现方法的说明和概括:
    "There are a number of hurdles to getting Xcode 6.3 running on an earlier release:

    Xcode declares a minimum system version of 10.10, preventing launch via LaunchServices and triggering an abort() in HIServices if you bypass the initial LaunchServices check.

    Xcode continues to ship with no-longer functional 10.9 compatibity code, and enables that code if it detects it's running on Mavericks. This results in crashes -- and even if you got past those, the result wouldn't actually be Xcode 6.3.

    Xcode links against 10.10-only APIs, which trigger both link-time and runtime crashes.
    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:

    Prior to Xcode's main(), the private dyld_register_image_state_change_handler API is used to hook dyld and modify library symbol references that are critical to bootstrapping the process:

    After the library has been rebased, but before it has been linked, we use a custom single-stepping implementation of dyld symbol rebinding to find strong references to Yosemite-only symbols and rewrite them as weak references.

    Once the library has been linked, but before it has been initialized, we use the same BINDOPCODE* evaluator to rebind symbols to our custom replacements.

    Before handing control back to Xcode, the bootstrap code uses my PLPatchMaster library to register a future patch on Xcode's DVTPlugInManager class. This patch adds xpf_bootstrap.framework/Contents/Resources/Xcode to DVTPlugInManager's plugin search path.

    A custom plugin in 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."

    目前尚无回复
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     924 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 22:23 PVG 06:23 LAX 14:23 JFK 17:23
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86