Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

Xcode 8 won't load plug-ins #475

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

Xcode 8 won't load plug-ins #475

0xced opened this issue Jun 13, 2016 · 65 comments

Comments

@0xced
Copy link
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
Copy link

RobertGummesson commented Jun 14, 2016

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
Copy link
Contributor

alanhamlett commented Jun 14, 2016

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/

@0xced
Copy link
Contributor Author

0xced commented Jun 14, 2016

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
Copy link

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 [email protected]:

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
Copy link

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
Copy link

fzwo commented Jun 14, 2016

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

@guillaumealgis
Copy link
Member

guillaumealgis commented Jun 14, 2016

@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
Copy link

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

@guillaumealgis
Copy link
Member

guillaumealgis commented Jun 14, 2016

@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
Copy link

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
Copy link

pdcgomes commented Jun 15, 2016

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.

@dabing1022
Copy link

@alanhamlett
Copy link
Contributor

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

@JasonWorking
Copy link

Bad news.~

@borisyurkevich
Copy link

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
Copy link
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.

@ghost
Copy link

ghost commented Jun 18, 2016

@alanhamlett Apple Maps

@alanhamlett
Copy link
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
Copy link

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
Copy link

@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
Copy link

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

@ianmasters
Copy link

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

@Isuru-Nanayakkara
Copy link

@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
Copy link

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 added a commit to stefanceriu/SCXcodeMiniMap that referenced this issue Jun 23, 2016
stefanceriu added a commit to stefanceriu/SCXcodeTabSwitcher that referenced this issue Jun 23, 2016
@alanhamlett
Copy link
Contributor

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

@tbodt
Copy link

tbodt commented Aug 20, 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.

@tbodt
Copy link

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
Copy link

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
Copy link

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

@username0x0a
Copy link

username0x0a commented Sep 13, 2016

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
Copy link

EchoZuo commented Sep 14, 2016

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

@jurre
Copy link
Collaborator

jurre commented Sep 14, 2016

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

@kaphacius
Copy link
Contributor

@jurre they are, just not as easy to install

@jurre
Copy link
Collaborator

jurre commented Sep 14, 2016

Having to unsign xcode is not supported IMO :)

@kaphacius
Copy link
Contributor

by whom?)

@nrbrook
Copy link

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
Copy link

nrbrook commented Sep 14, 2016

It hangs even with no plugins activated, just unsigned.

@Sephiroth87
Copy link

A plugin could probably fix that 🤔

@chrisbirch
Copy link

chrisbirch commented Sep 14, 2016

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
Copy link

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
Copy link

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
Copy link

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

@guillaumealgis
Copy link
Member

@andytriboletti please read the thread.

@kattrali
Copy link
Contributor

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

@alcatraz alcatraz 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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests