alcatraz / Alcatraz

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

Add support for Xcode 8.0, for those who removed the Xcode app signature #488

Closed alanhamlett closed 7 years ago

alanhamlett commented 7 years ago

I know about #475, but those of us who have removed the app signature from Xcode 8 would still like to use Alcatraz. Therefore we should add the Xcode 8 DVTPlugInCompatibilityUUID because it won't cause any issues for those who have not unsigned Xcode 8.

jurre commented 7 years ago

Fair enough. 👍

alanhamlett commented 7 years ago

Thanks!

guillaumealgis commented 7 years ago

👍

Approved with PullApprove

alanhamlett commented 7 years ago

One last thing is needed, to bump the Alcatraz version.

summertian4 commented 7 years ago

👍

pvinis commented 7 years ago

we also need a new release and refresh of the install script.

summertian4 commented 7 years ago

I read an article about "use Alcatraz with Xcode 8"

the author say "removed the Xcode signature will lead to the Xcode instability", Is it true?

orta commented 7 years ago

Until there's a new release, this will install Alcatraz for you, then clean up after itself:

git clone https://github.com/alcatraz/Alcatraz.git
cd Alcatraz
xcodebuild
cd ..
rm -rf Alcatraz
guillaumealgis commented 7 years ago

Just released Alcatraz 1.2.0. Thanks everyone for your patience!

mindz-eye commented 7 years ago

Does anyone experience issues with unsigned Xcode freeze from time to time? This usually happens when tccd daemon wakes up and starts to examine each and every file in Xcode bundle. Killing both doesn't solve the problem though :( Xcode sample reveals that UI thread is locked on xpc connection caused by an attempt to create a file.

Sorry for offtopic.

Sooongz commented 7 years ago

@mindz-eye me too

mindz-eye commented 7 years ago

@Sooongz looks like mds service stucks for some reason causing spotlight related APIs hang... Killing mds fixes the issue until the next Xcode relaunch.

Sooongz commented 7 years ago

@mindz-eye thanks man , but 'sudo killall mds' don't work for me

erikolofsson commented 7 years ago

I have found that unsigning Xcode stops XPC services such as debugging as root from working. The following takes care of this (if you paste it all, make sure that sudo has cached your password first):

pushd "$TMPDIR"
export XcodeLocation=/Applications/Xcode.app
cp "$XcodeLocation/Contents/MacOS/Xcode" .
codesign -s - -f --timestamp=none "Xcode"
sudo cp Xcode "$XcodeLocation/Contents/MacOS/"
cp "$XcodeLocation/Contents/Developer/usr/bin/xcodebuild" .
codesign -s - -f --timestamp=none "xcodebuild"
sudo cp xcodebuild "$XcodeLocation/Contents/Developer/usr/bin/"
popd
sudo xattr -rc "$XcodeLocation"
sudo spctl --add --label "Xcode" "$XcodeLocation"

I suspect that this will take care of any freezing issues as well.

Before doing this you will need a clean copy of Xcode. So if you have unsigned it already you will need to reinstall.

mindz-eye commented 7 years ago

@erikolofsson it works, thanks a lot!

pincheira commented 7 years ago

@erikolofsson sadly this broke my Xcode setup:

$ open -a xcode
LSOpenURLsWithRole() failed for the application /Applications/Xcode.app with error -10810.
screen shot 2016-11-14 at 10 48 08
erikolofsson commented 7 years ago

@jpincheira I suspect that the commands failed for some reason or other. If you post the output of running the script I could tell you why.

Make sure that you start out with a clean version of Xcode that hasn't been unsigned, and that you have run sudo before pasting commands into console, or put the commands in a bash script and run that instead.

userow commented 7 years ago

@erikolofsson Worked for me too. Thanks!

  1. Dropped an apple-signed Xcode.app
  2. Term - defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
  3. git clone https://github.com/alcatraz/Alcatraz.git
  4. added a UDID received on step 3. to a project's Info.plist
  5. build
  6. actions, described in your comment

No freezes in Xcode

AlexMorgun commented 7 years ago

How about that example about using Xcode extension? https://github.com/Otbivnoe/XShared

StarWars commented 7 years ago

For those of you who need safe process, that results in 2 Xcodes being installed on your device (codesigned & plugins ready), here is what to do:

  1. https://github.com/fpg1503/MakeXcodeGr8Again - use this tool, don't check the option to replace your current Xcode installation with XcodeGr8 app.
  2. perform 1-5 steps from @userow comment That's it.
scue commented 6 years ago

Xcode 9 install success:

gem install update_xcode_plugins
update_xcode_plugins --unsign
cd /tmp
git clone https://github.com/alcatraz/Alcatraz.git
cd Alcatraz
xcodebuild

All done, if you want to restore:

update_xcode_plugins --restore

Then, the Xcode will resigned. Enjoy it.

NikKovIos commented 6 years ago

https://github.com/inket/update_xcode_plugins