alcatraz / Alcatraz

Package manager for Xcode
alcatraz.io
MIT License
9.87k stars 1.15k forks source link

xcode 8 installation (thanks to xvim) #498

Open pvinis opened 8 years ago

pvinis commented 8 years ago

https://github.com/XVimProject/XVim/blob/master/INSTALL_Xcode8.md

looky here! i tried it, and it worked. xvim installed and is working, and alcatraz was built and installed. the problem is that i cannot install plugins, i get an error while compiling or something. im sure some of you guys can figure this out, since you probably know more than me about how to integrate alcatraz.

pvinis commented 8 years ago
screen shot 2016-09-22 at 13 16 44

thats the error i get btw.

augusteo commented 7 years ago

you probably need to selfsign each of the plugins too.

ame017 commented 7 years ago

use the under code in terminal to deal with this problem!

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID`
gblazex commented 7 years ago

Does this work for anybody else?

heyehao2008 commented 7 years ago

Awesome,it works for me. thanks a lot.

gblazex commented 7 years ago

Okay it works.

Btw the problem was github formatting ate the ` characters in @AMEstudio's post (because it also means code snippet formatting).

The corrected command is:

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID`

Note: If it crashes for you, it's probably one of the plugins (not Alcatraz) so you should move all the plugins out of ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins and then move them back one by one, always testing which one causes Xcode to crash.

DoctorG commented 7 years ago

Has anyone had success with 8.1? I had it working on 8.0 but now not working again following same steps as last time...

DoctorG commented 7 years ago

I'm answering my own question for 8.1:

screen shot 2016-11-06 at 7 42 37 pm screen shot 2016-11-06 at 7 42 59 pm screen shot 2016-11-06 at 7 41 54 pm
brettwellmanmbo commented 7 years ago

Thanks, @DoctorG. Interestingly, after following the described steps, I get the message on xCode launch about loading the non-Apple bundle, however, Package Manager still doesn't show. Stumped.

DoctorG commented 7 years ago

Mine now doing the same. Can't explain. 😒

Sent from my iPhone 7+

On Nov 22, 2016, at 5:47 PM, Brett Wellman notifications@github.com wrote:

Thanks, @DoctorG. Interestingly, after following the described steps, I get the message on xCode launch about loading the non-Apple bundle, however, Package Manager still doesn't show. Stumped.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

MKGitHub commented 7 years ago

I made it work with xvim. 2016-11-26 at 12 27 51

4x10m commented 7 years ago

@MKGitHub maybe you can explain more ....

tanpengsccd commented 7 years ago

I get a conclusion : Xcode 8.1 Sierra

  1. do as https://github.com/XVimProject/XVim/blob/master/INSTALL_Xcode8.md ,Xvim is not necessary。
  2. do as DoctorG steps
  3. when u install pluins do as AMEstudio in ternimal find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID
  4. when U install a new pluins ,u need find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID again.

en it works for me !

malhobayyeb commented 7 years ago

I had to use sudo for step # 3

mediter commented 7 years ago

did not work for me.

tried three kind of the find & xargs commands:

I just copy and pasted the commands provided in this discussion thread.

screen shot 2016-12-08 at 12 00 39 am

screen shot 2016-12-08 at 12 00 55 am

screen shot 2016-12-08 at 12 01 03 am

mediter commented 7 years ago

after a few experiments, the following code worked for me:

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add $(defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID)

mediter commented 7 years ago

alternatively, save the following code as a .sh file:

// code begins xcodeid="$(defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID)"

echo "${xcodeid}"

find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add $xcodeid // code ends

do "chmod 755 yourfilenamehere.sh" to make it executable, then you can use it by running "sh yourfilenamehere.sh"

oxoxoxox commented 7 years ago

Actually, the "defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID" should be quoted by the symbol (`) (the ESC key), not the symbol (\\') or the symbol (') (the key in the left of ENTER key)

OR just do as @mediter said.

mediter commented 7 years ago

Thanks for the explanation @oxoxoxox ! Quite a detail! No wonder it didn't work for me.

tanpengsccd commented 7 years ago

8.2 worked too !

JustToBeBetter commented 7 years ago

1.do as https://github.com/XVimProject/XVim/blob/master/INSTALL_Xcode8.md 2.do what galambalazs did. 3.find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add $(defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID)

it works for xcode8.2

VansonLeung commented 7 years ago

Bookmarked! Genius!!

VansonLeung commented 7 years ago

Great! I just have got my Wakatime and GitDiff back!

yweiquan commented 7 years ago

8.2.1 works too.

Here is exactly what I did:

Good Luck.

Huang-Libo commented 7 years ago

@yweiquan Works on 8.2 😁

web-differently commented 7 years ago

yes it's work but licence xcode is not good) it is not probleme of publication app in appstore

alanhamlett commented 7 years ago

@web-differently use https://github.com/fpg1503/MakeXcodeGr8Again then run codesign pointing to the copied XcodeGr8.app so your original Xcode can be used for publishing apps.

QSKOBE24 commented 7 years ago

Thanks yweiquan it works well on 8.2

alanhamlett commented 7 years ago

To make things easier, you can use this shell script to automate the XVim steps:

curl -fsSL https://raw.githubusercontent.com/alanhamlett/MakeXcodeGr8Again/master/selfsign.sh | bash

By default that script signs a copied XcodeGr8.app created after running MakeXcodeGr8Again. Alternatively, you can overwrite your Xcode.app by running:

export APP=/Applications/Xcode.app; curl -fsSL https://raw.githubusercontent.com/alanhamlett/MakeXcodeGr8Again/master/selfsign.sh | bash
akshetpandey commented 7 years ago

@alanhamlett It would be great is the script copied Xcode.app to XcodeGr8.app

evliu commented 7 years ago

I got a working and signed version of XcodeGr8 but not seeing the Alcatraz package manager in the menu. Anyone have any thoughts? This is for XcodeGr8 @ 8.2.1

Huang-Libo commented 7 years ago

How can I recover Xcode's default sign?

JsonFu commented 7 years ago

it work for me, xcode 8.2.1 show: window-->packageMangeer find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add $(defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID)

rlam3 commented 7 years ago

How do I install for 8.3.2? I don't see the Package Manager Cell.

alanhamlett commented 7 years ago

@rlam3 run this Terminal command:

curl -fsSL https://raw.githubusercontent.com/wakatime/xcode-wakatime/master/install.sh | sh

stek29 commented 7 years ago

btw, Alcatraz seems to break TouchBar simulation. Here's what I see in terminal:


Details:  Unable to find windows menu item for `Xcode.IDEKit.CmdDefinition.Products'. Simulator menu item may be in the wrong position.
Object:   <IDETouchBarSimulatorManager: 0x7fb0a4a26c90>
Method:   -installMenuItems
Thread:   <NSThread: 0x7fb0a1d17230>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.```

Notice the `item may be in the wrong position` message

Not sure if it's Xcode 8.3.1 specific issue or not.
CoderXLLau commented 7 years ago

@alanhamlett It doesn't works on Xcode 8.3.2

stek29 commented 7 years ago

@alanhamlett Suggesting users to install some third-party plug-in just to get Alcatraz is a bad idea.

@CoderXLLau You should remove codesigning from Xcode (or resign it), if you want it to load plugins. Please read https://github.com/XVimProject/XVim/blob/master/INSTALL_Xcode8.md. You don't have to resign whole Xcode.app, just resigning Contents/MacOS/Xcode would be enough.

I just removed signature with https://github.com/steakknife/unsign image

Btw, keep in mind that it can break Xcode update from App Store.

alanhamlett commented 7 years ago

@stek29 use this command to re-sign Xcode and install only Alcatraz:

curl -fsSL https://raw.githubusercontent.com/alanhamlett/MakeXcodeGr8Again/master/selfsign.sh | sh

More info here: https://github.com/alanhamlett/MakeXcodeGr8Again#non-gui-version

stek29 commented 7 years ago

@alanhamlett And it would also re-sign Xcode with pregenerated key. Even just unsigning is better -- it doesn't give you illusion of being secure.

alanhamlett commented 7 years ago

@stek29 Xcode won't load plugins with just unsigning, which is why the xvim instructions also selfsign Xcode. Maybe Apple will support plugins some day, but until then use the above script.

stek29 commented 7 years ago

@alanhamlett I have unsigned Xcode, and it loads plugins and works perfectly fine. image

However, having unsigned Xcode can cause issues with keychain.

Just Xcode executable is unsigned, everything else was not changed (that's why xcodebuild doesn't load plugins for example -- but I don't need plugins in xcodebuild)

davroux commented 7 years ago

How do you make it work for 8.3.3 ?

stek29 commented 7 years ago

@davroux

  1. Patch DVTPlugInCompatibilityUUID (or install DVTPlugInCompatibilityUUIDifier plugin)

    find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID
  2. Resign/Unsign Xcode: See https://github.com/XVimProject/XVim/blob/master/INSTALL_Xcode8.md. I personally prefer to just unsign Xcode:

    git clone https://github.com/steakknife/unsign && cd unsign && make
    export PATH="$PWD:$PATH"
    cd /Applications/Xcode.app/Contents/MacOS
    sudo unsign Xcode
    sudo mv Xcode Xcode.signed
    sudo mv Xcode.unsigned Xcode
  3. In case you just unsigned Xcode, keep in mind that xcodebuild won't load plugins too, unless un/resigned

moheny commented 7 years ago

is it safe to do these changes? I want to install it at my work house.

daipeihust commented 7 years ago

@yweiquan It works on Xcode 8.3 I find that you should quit your Xcode and run the following command after you install each plugin by Alcatraz

$ find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-adddefaults read /Applications/Xcode.app/Contents/Info.plist DVTPlugInCompatibilityUUID

then you restart your Xcode, It will load your installed plugins

sunocean commented 7 years ago

it also works on xcode 9

Przytua commented 6 years ago

Does this actually work for you in Xcode 9? I managed to install Alcatraz, and some plugins, they're showing in menus, but none of them is actually working (BlockJump, Auto-Importer, ATAutoCompletion, Aviator) zrzut ekranu 2017-10-17 o 11 02 29

sunocean commented 6 years ago

@Przytua you need turn to BlockJump and other project for help.

VansonLeung commented 6 years ago

This project is doomed