Hey again! I've managed to get Xcode 11 beta running using a dumb hack. (It seems like I do a lot of dumb hacks. But hey, they often work!)
View attachment 842959
To be completely honest, I barely know how to use Xcode, so I can't test its functionality too well. But the app opens and the default Swift app template does build and run. (
Edit: just confirmed that this is the case on both Mojave and Catalina.)
If anyone wants to test a bit more thoroughly, patched binaries are attached. Replace the following files:
Code:
Xcode-beta.app/Contents/SharedFrameworks/SourceEditor.framework/Versions/A/SourceEditor
Xcode-beta.app/Contents/MacOS/Xcode
I'll edit to add details in a sec. Just want to get this post made first.
Edit: Alright, how I did this is pretty simple/silly, but it works for the moment. Here's a snippet of the backtrace:
Code:
0 com.apple.dt.SourceEditor 0x000000012332f5cb specialized static MinimapMetalLinesLayer.defaultDevice() + 491
1 com.apple.dt.SourceEditor 0x000000012332d59c MinimapMetalLinesLayer.init() + 284
2 com.apple.dt.SourceEditor 0x000000012332dbff @objc MinimapMetalLinesLayer.init() + 15
3 com.apple.dt.SourceEditor 0x0000000122ff4abc MinimapLineContentLayer.init() + 92
4 com.apple.dt.SourceEditor 0x0000000122ff4ebf @objc MinimapLineContentLayer.init() + 15
Basically, I found the place in the function
MinimapLineContentLayer.init() where it calls
MinimapMetalLinesLayer.init() and I replaced that with the function for a different layer. This was sufficient to load the app, but actually editing code caused a crash trying to update the minimap. So I just NOP'ed that call.
The exact binary patches are as follows, in the SourceEditor executable:
Code:
0x00000000000dbaa0: call _$s12SourceEditor26MinimapLineHighlightsLayerCMa
0x000000000014f048: nop
It's necessary to re-sign that
and the main Xcode binary (it spits out an error about Library Validation if you don't).
As usual, this is a quick-and-dirty hack, I'm sure that the experts will find a better solution soon.
Edit: Forgot to mention this, but this of course impacts the code minimap feature. I assume that the "MinimapMetalLinesLayer" is what shows the actual zoomed-out code, since that does not appear with my patch. However, selections/found words/etc are still shown.
Another Edit: Some screenshots of the partially-blank minimap (in the top right corner) doing its thing when I select/search/click parts of the code:
View attachment 842963 View attachment 842964 View attachment 842965 View attachment 842966
As you can see, it's functional, minus the actual image of the code, which is supposed to be rendered using Metal and disabled by my patch.