Xcode 8 won't load plug-ins #475

Closed
0xced opened this Issue Jun 13, 2016 · 65 comments

Projects

None yet
@0xced
Contributor
0xced commented Jun 13, 2016

Joe Groff tweet

@fzwob Xcode 8 uses library validation. It won't load in-process plugins anymore.

That’s very bad news for Alcatraz and the current plug-ins ecosystem. 😢

@RobertGummesson
RobertGummesson commented Jun 14, 2016 edited

Yep, looks like the era of Xcode plug-ins is over. 😥 I will personally be looking into porting my ones and hope the extensions are not too limited.

@alanhamlett
Contributor
alanhamlett commented Jun 14, 2016 edited

I'm looking for docs on creating Xcode Source Editor Extensions... anyone find them yet?

Xcode 8 adds support for Xcode Source Editor Extensions: Application Extensions provide additional
commands in the Xcode Editor menu. These extensions can manipulate both text and selections. To
create them, use the new Xcode Source Editor Extension target template in the macOS Application
Extensions section when creating a project. (23194974)

I don't have the Xcode Source Editor Extension target template in my Xcode 8 Beta, and these headers are the only thing Google found on the subject:
https://gist.github.com/OdNairy/62de23d6627d518c38fed078a0581046

Also, this video about Using and Extending the Xcode Source Editor:
https://developer.apple.com/videos/play/wwdc2016/414/

@fzwo fzwo referenced this issue in fzwo/FRMBreakFast Jun 14, 2016
Open

Plug-in does not work in Xcode 8 #16

@0xced
Contributor
0xced commented Jun 14, 2016 edited

To create an Xcode Source Editor Extension, you have to add a new target to a project. The Xcode Source Editor Extension template is not available when creating a project.

Unfortunately, as its name imply, a Source Editor Extension only has access to the source code editor part of Xcode. So only a few plug-ins can be rewritten with the new official extension API. 😢

@fzwo
fzwo commented Jun 14, 2016

In his tweets to me, Joe Groff asked for radars for missing functionality, implying that they are interested in giving us a powerful system. So I’d invite every dev whose plug-in is not supported under the new system to file radars.

f.

Am 14.06.2016 um 10:59 schrieb Cédric Luthi notifications@github.com:

To create an Xcode Source Editor Extension, you have to add a new target to a project.

Unfortunately, as its name imply, a Source Editor Extension only has access to the source code editor part of Xcode. So only a few plug-ins can be rewritten with the new official extension API. 😢


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #475 (comment), or mute the thread https://github.com/notifications/unsubscribe/AA7w_Z84ugZq3rYCc18nhM4VVz1g9buXks5qLm17gaJpZM4I0xyf.

@erikolofsson

This is very unfortunate. For the plugins that I need I would suspect a very small portion of the functionality is feasible with the new plugin infrastructure.

A workaround is to remove the signature from Xcode.app. You can do this with https://github.com/steakknife/unsign

@fzwo
fzwo commented Jun 14, 2016

@neonichu tweets that the template shows up when adding a new target to an existing macOS project.

@pdcgomes pdcgomes referenced this issue in pdcgomes/XCActionBar Jun 14, 2016
Open

XCActionBar won't load on Xcode 8 #33

@guillaumealgis
Member
guillaumealgis commented Jun 14, 2016 edited

@erikolofsson I doubt this would solve the problem. Even if being itself unsigned, Xcode will probably refuse to load unsigned code.
Maybe you could tamper with the extension loading function once Xcode's signature is removed, but that would probably also implies disabling SIP... And well this doesn't seems like a good idea at all.

(Not to mention that we have not much to gain by irritating Apple on this kind of things, and everything to gain by playing nice and providing helpful feedback)

@pdcgomes

@guillaume-algis I tired it a couple of hours ago and it did work.

@guillaumealgis
Member
guillaumealgis commented Jun 14, 2016 edited

@pdcgomes you mean unsigning Xcode with https://github.com/steakknife/unsign to make it load arbitrary plugins?
To be honest I'm at work and I did not have time yet to play with the thing much. That was just random thoughts on the matter ;)

@pdcgomes

Yes, correct. But agreed, not the way forward. I'm just concerned with how fast they'll be able to push additional extension points. We shall see!

@pdcgomes
pdcgomes commented Jun 15, 2016 edited

Managed to sit down with some of the Xcode engineers that are working on Xcode Extensions earlier today. As expected, anything that doesn't involve pure text manipulation can't really be achieved with the current extension point.
The good news is that this is just the beginning and they're very keen on getting as much feedback as they possibly can, so definitely submit radars with very clear use case cases.

Unfortunately there are no clear timelines, so who knows how long it'll take until we have a rich public API and more extension points.

And yes, they've confirmed that by removing code signing, existing plugins will work. Having that said, it adds even more friction to the whole process, so the average user will probably either opt out or just be completely unaware of it. The way forward is to definitely clearly document valid use cases and file radars.

Both sad and exciting times ahead.

@KyleMay KyleMay referenced this issue in onevcat/VVDocumenter-Xcode Jun 17, 2016
Open

支持Xcode 8 #228

@alanhamlett
Contributor

Looks like the user has to invoke new extensions from a menu or keyboard shortcut. This is a bummer.

@JasonWorking

Bad news.~

@borisyurkevich

Good news, Xcode 8 protected from old dangerous plugins. Stop thinking about yourself and think about the greater good. We all get safer tool. Horrible story with Xcode Ghost should never happen again. Please don't break Xcode signature. Remember that's priority should be to create great products, not making your development live more fun and pleasant.

@alanhamlett
Contributor

@borisyurkevich the new api is not yet ready but they disabled the current one anyway.

We all want secure plugins, but the way Apple disabled the current plugins without providing a sufficient replacement is why this is bad news.

@antgly
antgly commented Jun 18, 2016

@alanhamlett Apple Maps

@alanhamlett
Contributor

No point in arguing why Apple does things, let's just file Radars for the extension features we need and hope they get implemented:

https://bugreport.apple.com/

@BeauNouvelle

It would have been nice if we were given a transitionary period at least. Given time to port the plugins we have that will work with the new system, AND given time to submit radars for the added functionality. Everything we have built is pretty much dead overnight.

I'm glad we now have colors, and documentation creation built in to Xcode 8, as they were my most used plugins.

At least we'll be able to sell them on the mac store right?

@ianmasters

@BeauNouvelle

It would have been nice if we were given a transitionary period at least.

This is Xcode 8 beta; by it's very definition the transitory period! Your feedback to Apple as they push toward public release is critical to make them aware of what you think should be done.

@iphone-andy

So why xcode8 can't load old plugins , Is there any hack ideal to fix it

@ianmasters

@iphone-andy it's to prevent executing potentially unsafe / insecure / unsigned code that could be malicious or otherwise.

@cezheng cezheng referenced this issue in music4kid/FastStub-Xcode Jun 21, 2016
Open

Turn this project in a Xcode 8 Extension #16

@Isuru-Nanayakkara

@borisyurkevich I've used plug-ins extensively and never came across any "dangerous" plug-ins. Third party plug-ins is what made Xcode, otherwise a terrible IDE, tolerable. What Apple should have done is provide a way to sign Xcode plug-ins instead of disabling everything altogether.

@BeauNouvelle

I've already filed a bug report about it. I'm sure if enough of us say something they'll at least give us more time to transition.

@stefanceriu stefanceriu added a commit to stefanceriu/SCXcodeMiniMap that referenced this issue Jun 23, 2016
@stefanceriu stefanceriu Added Xcode 8.0 support (more info alcatraz/Alcatraz#475) 1e5858d
@stefanceriu stefanceriu added a commit to stefanceriu/SCXcodeTabSwitcher that referenced this issue Jun 23, 2016
@stefanceriu stefanceriu Added Xcode 8.0 support (more info alcatraz/Alcatraz#475) 9d9d82d
@stefanceriu stefanceriu added a commit to stefanceriu/SCXcodeEditorInset that referenced this issue Jun 23, 2016
@stefanceriu stefanceriu Added Xcode 8.0 support (more info alcatraz/Alcatraz#475) 7726060
@Querschlag Querschlag referenced this issue in kolinkrewinkel/Polychromatic Jun 23, 2016
Open

Stopped working after installing xcode 8 beta #81

@fpg1503 fpg1503 added a commit to fpg1503/Polychromatic that referenced this issue Jun 24, 2016
@fpg1503 fpg1503 Add support for Xcode 8 Beta
Please view [fpg1503/MakeXcodeGr8Again](github.com/fpg1503/MakeXcodeGr8Again)
(more info on alcatraz/Alcatraz#475)
3cd7b77
@borisyurkevich

@Isuru-Nanayakkara issue is not in current plugins but in the fact that Xcode allows not signed code. This lead to the Xcode ghost attack. BTW used many IDE's and Xcode is way ahead of everything else. I shipped many apps and never felt a need to install a plugin.

@erikolofsson

I think we could keep using the current plugin system safely by:

  • Create self signed certificate and add it as trusted to Key Chain
  • Walk through all of Xcode.app and find all internal plugins
    • Verify the signature of the plugin against the Xcode main app signature
    • If verified put in list of verified plugins
  • Resign Xcode.app (and optionally xcodebuild) and all verified plugins with the self signed certificate
  • Sign all of the custom plugins you want to use with the self signed certificate.
@brockboland brockboland referenced this issue in vokal/XcodeAutoBasher Jul 5, 2016
Closed

Xcode Extension? #24

3 of 3 tasks complete
@osolo
osolo commented Jul 8, 2016 edited

[rant]
I am personally quite upset by this change. Hardening Xcode.app doesn't fix the Xcode Ghost problem, it just forces malicious parties to move elsewhere in the toolchain. I can think of 10 different ways to inject bad code that doesn't involve changing Xcode.

On the other hand, Xcode is now broken for me. I use 5-10 plugins from Alcatraz and Xcode 8 will suck without them. I have to disable the whole OS's system protection to get them back. How does THAT help security?

Also, if you watch the WWDC session, you see how concerned the Xcode team was about performance of plugins. This is such a non-issue. I've both used and written plugins for Xcode and other IDEs (namely Visual Studio) and this has never been a real issue. But now the IPC approach I'm afraid we can never things like real time code editing in plugins. Too bad. RIP plugins.
[/rant]

@lechium
lechium commented Jul 18, 2016

i am absolutely disgusted with this decision. Xcode ghost had NOTHING to do with plugins. this is just another one of those decisions treating everyone like the lowest common denominator. this "safety first" mentality that has destroyed any possibility of swift being a useful language is infecting all of their other decisions across the board. its making me seriously reconsider my line of work.

The engineers shouldn't be worried about plugin performance, its OUR choice to use them, and it should remain OUR choice, if it hinders performance, thats OUR problem, not theirs. This reeks of sony's PS3 other OS debacle.

@iandundas
@lechium
lechium commented Jul 19, 2016

i prefer the unstable hacks since it brings the ability to tweak, fix and improve ANY part of Xcode. Im so fed up with their new cultural shift, It's one thing to treat end users like knuckle-dragging morons, treating developers like this is completely unacceptable.

@guillaumealgis
Member

While I understand the frustration, let's try to keep the conversation civil, and focused on how we can make the most of this decision please 😊

Ranting about Apple being closed and secretive will take us nowhere. Thanks! 👍

@lechium
lechium commented Jul 19, 2016

fair enough, sorry. just wish there was a way to get them to reverse course on these decisions. i know all my plugins ive authored that i use daily arent going to work with the extensions. i think my only solution personally is to stick with xcode 7.

@BeauNouvelle

Submit a radar about it. Apple won't know how upset you are by writing about it here. Let them know, if enough of us do it, they might be able to come up with something where Xcode can support both in the short term.

@osolo
osolo commented Jul 20, 2016

@BeauNouvelle thank you for suggesting something actionable. I filed a radar this morning, and I hope everyone else on this thread will as well. The link to file is right here: https://bugreport.apple.com/

@tbodt
tbodt commented Jul 20, 2016

@osolo Can you post the text of the radar so we can duplicate it?

@osolo
osolo commented Jul 20, 2016

@guillaume-algis I'm wondering if you have any hard stats you can share about the number of Alcatraz installs in the wild. Maybe if that number is high enough, it would help sway opinions at Apple.

@guillaumealgis
Member

@osolo Nope. We have zero stats appart from the number of Github starts for Alcatraz and each plugin's repo. See #150.

@osolo
osolo commented Jul 20, 2016

@guillaume-algis Doesn't Alcatraz phone home to check for upgrades? Could that be instrumented?

@vistatinchao

are you kidding me

@Ronaldoh1

No 😢 this can't be true.

@guillaumealgis
Member
guillaumealgis commented Aug 3, 2016 edited

Disclaimer: Take those stats with a (huge) grain of salt.

@osolo Alcatraz uses git for its update process, but we monitor nothing.
One of the only stat we have is the number of clones during the last few days. This isn't very meaningful, as Alcatraz is installed by downloading a tarball (if you follow the instructions on alcatraz.io), and uses fetch not clone when updating.

Still, here are the stats I screenshot'd today:

capture d ecran 2016-08-03 a 13 01 03

I'd say we average at about ~250 unique cloners per day (which, again, tells us nothing).

You could also check the stats for the releases of Alcatraz using Github's API. The latest release, 1.1.18, pushed on March 26 has been downloaded 74548 times so far.

GET https://api.github.com/repos/alcatraz/alcatraz/releases/2892921

Which gives us a bit more than 570 downloads per day on average. Note that it's hard to interpret this number, as users frequently re-install Alcatraz because of the slightly broken update process (in particular, we handle Xcode version changes very poorly).

@CurlyHeir

i created new repo for Xcode extensions link , feel free to update it with your ported extensions. it's just repo that collects useful extensions.
I hope that closing Alcatraz will not affect badly community building add-ons for poor Xcode.

@capnslipp
capnslipp commented Aug 7, 2016 edited

FWIW, using unsign on /Applications/Xcode-beta.app/Contents/MacOS/Xcode as @erikolofsson's suggested plus adding the beta Xcode's UUID to Alcatraz and other plugins per #73 works flawlessly for me.

Of course, this reduces the security of Xcode.  For my usage though I'm not worried; I primarily use Alcatraz for color schemes and currently have only one true plugin installed— SCXcodeMinimap.

Is unsigning dev tools dangerous?  Maybe.
Is it the end of open-source add-ons/hacks to Apple apps?  No, not really.
Is it just the reality of Apple's protect-novice-users-while-still-technically-allowing-expert-usage?  Yup.

@FalconTT

Well, I just posted a Apple Bug Report for my plugin; hopefully more developers will do the same thing and Apple will listen.

@alanhamlett
Contributor

This app gives unsign an easy to use GUI:
https://github.com/fpg1503/MakeXcodeGr8Again

@fpg1503 fpg1503 referenced this issue in CocoaHeadsBrasil/forum Aug 19, 2016
Open

Alguém da noticias do alcatraz no Xcode 8? #12

@tbodt
tbodt commented Aug 20, 2016 edited

unsign isn't really necessary:

codesign --remove-signature /Applications/Xcode\ beta.app

--remove-signature is an undocumented option. It does exactly what you think it does.

@tbodt
tbodt commented Aug 20, 2016

A little-known fact about GitHub releases is that there is a download counter. It's not visible in the UI, but you can get it through the GitHub API at https://api.github.com/repos/alcatraz/Alcatraz/releases.

Version Download Count
1.1.18 81,240
1.1.17 5,710
1.1.16 15,512
1.1.15 47,828
1.1.14 157
1.1.13 18,386
1.1.12 7,139
1.1.11 12,030
1.1.10 52,931
1.1.9 76
1.1.8 25,413
1.1.7 1333
1.1.6 37,751
1.1.5 22,576
1.1.4 2,990
1.1.3 393
1.1.2 18,413
1.1.1 4,931
1.1 10,017
1.0.9 23,546
1.0.8 19,232
1.0.7 11,897
1.0.6 2,086
1.0.4 31,383
1.0.3 39
1.0.1 45,320
@inket
inket commented Aug 21, 2016

unsign isn't really necessary:

codesign --remove-signature /Applications/Xcode\ beta.app
--remove-signature is an undocumented option. It does exactly what you think it does.

I believe codesign --remove-signature is fundamentally different from unsign.

When implementing Xcode unsigning in update_xcode_plugins, I tried going the codesign --remove-signature way at first, but Xcode seemed to lose access to the system keychain and couldn't login to the accounts in Preferences > Accounts > Apple IDs, so you would have to enter all your Apple ID passwords on every Xcode restart.

@nrbrook
nrbrook commented Sep 12, 2016

I've scripted the process of unsigning Xcode and updating the UUID in plugins. Feedback appreciated. https://github.com/nrbrook/MakeXcodePluginsWork

@michalzelinka
michalzelinka commented Sep 13, 2016 edited

My rdar contribution; do not hesitate to express your own mind:

Xcode is a primary tool for the development on all Apple platforms. People can either love or hate it, the fact is it's still the most powerful development tool around.

Lots of its power and usefulness has been achieved by 3rd-party plugins, later covered by the Alcatraz project, which is the number one extension management system for Xcode, as vital and needed as for example npm is needed for Node.js. It's all based on a fair, aware community developing its helpful open-source extras and publishing them on GitHub. It's not a code-injecting ghetto targeting infecting stuff. It's a community within a community.

Xcode 8 tends to drop support for these plugins, most often being narrated as a security step in favour of preventing distribution of injected stuff. This is false; you simply can't prevent that 'cause there's always someone who finds the way. This step simply makes Xcode was less usable, complicated and not that feature-rich. There are many important plugins which developers love, contribute and move forward to make Xcode even better, tell yourself honestly, mostly even better than you could in a short period.

The community needs powerful stuff. Way more powerful than basic source-editing magic. Please reconsider this step in a spirit of community and support to your developers.

In last years, there's a move towards closing your platform. First shutting down Spotlight plugins and its great Flashlight plugins manager, which is simply great and now I need to disable Rootless to use it. Now it's Xcode plugins. You're doing more and more to make developers and power users feel sad and not having their computing device in their hands.

There's a detailed discussion on Alcatraz repo, it says everything:
#475

I'm attaching a list of great plugins I simply can't spend a day without:

AxeMode – Xcode issues patching
Backlight – active line highlighting
ClangFormat – code formatter
DerivedData Exterminator – daily need getting rid or bad stuff
FuzzyAutocomplete – name says it all, still more powerful than Xcode completion
HighlightSelectedString
MCLog – console log filtering, including regexes
OMColorSense
Polychromatic – variables colouring, cute stuff
RSImageOptimPlugin – processing PNG files before committing
SCXcodeMinimap – love this SublimeText-thingy!
XCFixin_FindFix – fixing Find features
XcodeRefactoringPlus – patching Refactor functionality, still buggy, but less than Xcode without plugin
XToDo – TODOs collection
ZLGotoSandbox – 'cause dealing with your folders would be a hell without it

Most of them are not source code-related, thus deserve having a way to be loaded and working like a charm again.

@EchoZuo
EchoZuo commented Sep 14, 2016

Xcode 8 can not be installed Alcatraz,
How to do it?

@jurre
Member
jurre commented Sep 14, 2016

@EchoZuo please read the thread, plugins are no longer supported in Xcode

@kaphacius
Contributor

@jurre they are, just not as easy to install

@jurre
Member
jurre commented Sep 14, 2016

Having to unsign xcode is not supported IMO :)

@kaphacius
Contributor

by whom?)

@nrbrook
nrbrook commented Sep 14, 2016

I've found Xcode seems to hang a lot when saving files when it is unsigned, requiring a force quit. Saving can happen automatically, so it can just randomly hang. Pretty sure it is saving anyway. The file is actually saved thankfully.

@nrbrook
nrbrook commented Sep 14, 2016

It hangs even with no plugins activated, just unsigned.

@Sephiroth87

A plugin could probably fix that 🤔

@chrisbirch
chrisbirch commented Sep 14, 2016 edited

This is indeed terrible news. How can they have done this to us..?

My once tolerable workflow lies broken and lifeless on the floor. Arghhh

@AlexKvazos

Should I have hope that Alcatraz will soon work with some patches? Or should I just give up and accept a miserable life since right now?

@capnslipp

Can we close this issue now?  The core issue “Xcode 8 won't load plug-ins” has now been fixed as best Alcatraz can fix it.  What remains is gripes about Apple's platform choices, which belong in rdars, on Twitter, and at WWDC conversations, not here.

@andytriboletti

I ran the install script with Xcode 8 installed. I don't see "Package Manager" in the Window menu. :(

@guillaumealgis
Member

@andytriboletti please read the thread.

@kattrali
Collaborator

Let’s close this up now, per #488.

@kattrali kattrali closed this Sep 15, 2016
@kattrali kattrali locked and limited conversation to collaborators Sep 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.