Xcode 6.4 on OSX 10.11 (El Capitan) beta 2 / beta 3

五迷三道 提交于 2019-11-27 02:13:58

问题


I am trying to run Xcode 6.4 on El Capitan and I can run with the instructions on this post.

But I am looking for a way to run it without any external program as I ran before with OSX 10.10 (Yosemite).

I found this post that point to this instructions but it does not work. These are the instructions

  1. Open this file /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exception.plist
  2. Find lines with name xcode in them (http://i.imgur.com/tcKWLhz.png)
  3. Edit value HardDisabled from YES to NO
  4. Save and reboot

    1.a) If you can't save because file says it's locked then enable rootless mode (sudo nvram boot-args="kext-dev-mode=1 rootless 0" or sudo nvram boot-args="kext-dev-mode=1 rootless=0") and reboot.

    1.b) If you still have problem, copy Exceptions.plist to Desktop (or wherever else) and edit it them.

    1.c) Save it and them remove Exceptions.plist in System (sudo rm -rf /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist)

    1.d) Copy file from Desktop (or wherever else) to /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources and reboot.

I couldn't edit the Exceptions.plist file with the instructions above, but after a lot of tries I found the way to edit it.
Here you can find the instructions to edit it.

After all of this, I still receiving the message

You can't open the application "XCode.app" because it is not supported on this type of Mac

when I try to run Xcode 6.4 from Finder

SOLUTION 1
The only thing I didn't do was to reinstall XCode 6.4 after the changes. I reinstalled it and it works!

SOLUTION 2
Dave Wood provided another solution to avoid to reinstall XCode. This is is post and as he posted in his answer the script is here


回答1:


Here's a shell script that tweaks Xcode 6 and resigns so you can just run it normally. No need to mess with the system exception list, reinstall or anything. Just takes a minute or so to run.

Script is here: http://bit.ly/Xcode6OnElCapitan

Note: you can not submit apps built on El Capitan while it's still in Beta.




回答2:


Xcode 6.4 runs out-of-the-box on:

  • El Capitan Beta 4 (build 15A226f)
  • El Capitan Beta 5 (build 15A235d)
  • El Capitan Beta 7 (build 15A263e)

Xcode 6.4 fails to open on:

  • El Capitan Beta 6 (build 15A244d) - Workaround here

    cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
    sudo mv dyld_sim dyld_sim.orig
    



回答3:


There are two places in Exceptions.plist which list Xcode. The one you don't have listed is:

<key>com.apple.Xcode</key>
    <array>
        <dict>
            <key>AppStoreIdentifier</key>
            <string>497799835</string>
            <key>AppStoreUpdateIsFree</key>
            <true/>
            <key>HardDisabled</key>
            <false/>
            <key>HighVersion</key>
            <string>5085.0</string>
        </dict>
    </array>

It is necessary to re-install Xcode afterwards.




回答4:


In addition to the original first answer if you dont want to reinstall xcode again because of slow internet connection you can just copy xcode to desktop delete the one in application folder (Assuming you did all the required steps above except reinstalling). And move back xcode to application folder(while copying to desktop itself if you did above step right you will notice the cut icon will dissapear after copying)




回答5:


User lembacon here found the solution:

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
cd Developer/SDKs/iPhoneSimulator.sdk/usr/lib
sudo mv dyld_sim dyld_sim.orig

The reason is that the internal implementation of _NSGetExecutablePath has been updated (where the Kernel is involved), and the host dyld has also been updated to track this change. The dyld_sim, however, has not yet been updated. So the problem is that _NSGetExecutablePath will return a path that contains a executable_path= part which causes that the CFBundleGetMainBundle() always returns NULL. This workaround simply forces the simulator to use the host dyld.

I confirm that this solution is working with Xcode 6.4.



来源:https://stackoverflow.com/questions/31220697/xcode-6-4-on-osx-10-11-el-capitan-beta-2-beta-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!