Can we install Xcode 4.6 and xcode 5 on same machine without upgrading from xcode 4.6 to xcode 5?
Yes, you can install multiple versions of Xcode. They will install into separate directories. I've found that the best practice is to install the version that came with your Mac first, and then install downloaded versions, but it probably doesn't make a big difference. See this Apple Developer Connection page for lots of details.
It's easy to have multiple XCode installs.
In the installer there's a pulldown for the location... you just need to pick a new location when you're installing the beta version.
These instructions from an Apple dev tools evangelist have the full details (Apple dev username/password required): https://devforums.apple.com/message/40847#40847
Then grab yourself a custom icon for the Beta version of XCode you're using, so you can tell them apart in the dock: http://iphonedevelopment.blogspot.com/2009/03/multiple-developer-tool-installs.html
I prefer to create separate folders for different versions of Xcode, which I find provides a little more organization than renaming each Xcode release.
My folder layout looks as follows:
/Applications/Xcode.app
/Applications/Xcode4.6/Xcode.app
/Applications/Xcode5.0/Xcode.app
Simply create the necessary folders and drag/drop the relevant Xcode version into the same. You can also download older versions of Xcode from http://developer.apple.com/downloads/ and follow the same idea.
With the folder structure approach, from within a script (e.g. bash shell) you can move between versions of XCode with the xcode-select command line utility by simply specifying the desired folder:
$sudo xcode-select --switch /Applications/Xcode4.6/Xcode.app
Change the release number in the command line to switch to a different version.
Yes, just be sure of having two different names for them!
Yes you can because both can be installed and run simultaneously.
Create a folder with XCode 4 for example and keep XCode 5 in Application Folder.
But, with XCode 5 you can use the property of XCode 4 using iOS 6 sdk. Have a look here.
Related
Apple recently demanded I upgrade my iPhone to the latest iOS version (11.2), and, as usual, Xcode then refused to connect to it unless I upgraded Xcode, which, of course, I could only do, if I upgraded my version of Mac OS.
So, after wasting half a day downloading and installing updates, I'm now on Xcode 9.2, and my code, which built beautifully before, fails to build with an error of:
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/
Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/
Developer/Library/Frameworks'
(Note: I've added spaces in that folder path myself, to make it readable here.)
The error message is true though.
If I attempt to go into that folder, I can get as far as the iPhoneOS11.2.sdk folder, then there's no Developer sub-folder in it.
I have Googled this problem, and lots of people recommend checking your "Library Search Paths" and "Framework Search Path" settings... but in my case, both of these were blank. I didn't have any folders specified in my build settings.
Interestingly, in that screenshot above, I noticed that the System folder does have a Library\Frameworks subfolder so (out of desperation) I copied the System folder into a folder called Developer.
Ridiculously, this seems to have fixed the problem, but surely I'm missing something here...
Has anyone else had this problem, specifically since upgrading Xcode ?
After making this change to the folder structure, I did still have 1 other error. Xcode was now complaining that:
embedded dylibs/frameworks are only supported on iOS 8.0 and later
Again, this error hadn't appeared before I upgraded Xcode, but the fix was to change the iOS Deployment Target in my "Project" build settings and in each of the Target build settings.
What really bugs me about Xcode is that I don't want/need any of the new iOS 11 functionality. This is a legacy in-house app, which we've been using since iOS 7. This stuff should just build, after an Xcode update, but with each release, we get new problems, as obscure as the ones highlighted here.
This Xcode stuff is truly terrible... please can I go back to my warm-and-cosy Microsoft environment now...?
You can use your old Xcode to support 11.2
To support you need to run below command:
sudo ln -s PATH_OF_NEW_XCODE_DEVICESupport_TO_11.2 PATH_OF_EXISTING_XCODE_DEVICESupport
Example:
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0 /Applications/Xcode821.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Recently we've moved to Xcode 8 in order to compile the app with new Xcode version, but I still need to use Old Xcode (7.3.1) in order to use it's instruments with older ver of appium ...
I was wondering if there is a way to open each Xcode ver and to use it's relevant command line tools? currently , the command line tools I set in specific version is being used among two Xcode versions ...
Thanks!
I am using X-code 7.3.3. to run appium test and Xcode-8 to build app under test. I have moved xocde8 into folder name "xcode8".
And to switch between different Xcode version you can use -
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
sudo xcode-select -s /Applications/xcode8/Xcode-8.app/Contents/Developer/
If you have a particular version of Xcode (say Xcode 8) installed in your system, go to /Applications and rename it to something else like Xcode8 or Xcode7.3.1. Install the other version normally. Now you have both versions running in different names.
I hope this is what you were looking for..
Anyone have this two versions of Xcode side by side on same machine?
I have Xcode 4.4.1 installed and I want to update to latest version (4.5) so I can use iOS 6 SDK, but I need to keep 4.4.1 for some clients.
Can I make a simple copy of this version and keep installed after upgrade? Because I know some people tried to make this and failed.
Complete a Time Machine backup.
Upgrade Xcode to 4.5.
Restore Xcode 4.4 from the Time Machine backup. (You may have to go back a few hours, depending on how long Xcode 4.5 took to download. Check the file size.) Keep Both.
Rename Xcode (Original) to Xcode 4.4.1.
Once you've done this, just run the appropriate version of Xcode. Xcode 4.5 will update some system components, but these updates won't prevent Xcode 4.4.1 from running.
If you use the command line tools, you should use xcode-select to switch between versions or the environment variable DEVELOPER_DIR to pin to a specific version.
Since Xcode is available on the App Store it's just a regular app. It doesn't install anything under /Developer that could be overridden if you install a new version. All the required files are inside the app bundle (except preferences, docs - those will be shared by multiple Xcode versions)
If you want to be sure, I recommend the following. Backup the old version (to an external hard disk), install the new version and restore the old version with a different name.
The reason some people failed is that when they downloaded Xcode 4.5 from the Mac App Store it overwrote their existing Xcode 4.4.1. The Mac App Store will do this if it sees an existing version of Xcode anywhere. There are two possible solutions:
Don't use the Mac App Store. It is always possible to obtain any version of Xcode as an ordinary download from the Apple Developer site.
Use the Mac App Store, but before you do, zip your existing copy of Xcode. That way, the zipped copy will be kept through the download process. Later, you can unzip it.
Note that two different versions of Xcode cannot exist in the same folder (e.g. top-level Applications) because they have the same name. The easily solution is to put one of them in a subfolder.
I copied the iOS 5.1 SDK here:
Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
But, I still can't choose the base SDK in Xcode.
Can anybody help?
You need to copy the iPhoneOS5.1.sdk to the directory
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
and iPhoneSimulator5.1.sdk to
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
(You'll need to restart Xcode to be able to select the SDKs in the Base SDK build option.)
None of the above worked on my 10.8 xcode 4.5.1.
Most of the paths given above are not found.
Here is my solution note.
Download xcode_4.4.1_6938145.dmg in https://developer.apple.com/downloads/
Load up the dmg file then go to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ you will find iPhoneOS5.1.sdk (this is what i want in this case).
Copy iPhoneOS5.1.sdk folder into your Xcode folder /Applications/Xcode/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Restart Xcode
Open Xcode project setting->build settings->base SDK, then you will see iOS 5.1 option.
From the terminal, run this command, then restart XCode:
cp -r /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Note, substitute 'iPhoneOS5.0.sdk' with the name of whatever SDK you're interested in copying.
#benvolioT answer is correct, but you need permission:
sudo cp -r /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/
Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Old SDK's for the OS and Simulator might be available from these locations using finder.
For OS
/Developer-old/Platforms/iPhoneOS.platform/Developer/SDKs
For Simulator
/Developer-old/Platforms/iPhoneSimulator.platform/Developer/SDKs
Developer-old, you would find it in device volume path.
Akhildas' solution worked for me. I was able to build against the 5.1 SDK with XCode 4.5.1. One caveat:
If you drop an SDK from a version of XCode downloaded by a different Apple ID, the App Store will show that you have an update to 4.5.1 (even though you already have it). When you press the update button, it tells you to log in with the other Apple ID.
Strange, I wonder where the account information is buried in the 5.1 SDK?
Also, when I set a base SDK back to iOS 6, it appears you have to restart XCode to recognize that framework.
xcode.app > Right Click > Show Package Contents
It will open xcode package contents.
Go to the directory path -
Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Now you can see the folder name with ios sdk version. For example : iPhoneOS(sdk-version).sdk
The BEST SOLUTION is to go to the XCode Preferences and to install older versions of iOS simulator / SDK from there, as explained here : https://apple.stackexchange.com/questions/47323/installing-xcode-with-ios-4-3-device-simulator
Hope this helps :)
I just installed Lion and Xcode 4.1. How do I add older SDKs so I can build and run in 4.1 or 4.2 in iPhone/iPad Simulator? Xcode 4.1 only comes with the iOS 4.3 SDK.
Does Lion have some sort of minimum SDK for builds?
Thanks,
Actually it is possible to add older SDKs as long as you can still get your hands on an older version of Xcode with the older SDK. It's useful too sometimes: when you do this you get to find out about unsupported constants and methods you may be using during compile rather than at runtime. Here's how to do it.
Get hold of an older version of Xcode with the older SDK. The Apple iOS Dev Center currently lists the 4.3 SDK with the Xcode 3.2.6 download.
Mount the dmg and open up the Packages folder hidden within the dmg via Terminal:
open /Volumes/Xcode\ and\ iOS\ SDK/Packages/
Double click the pkg file for the SDK version you want. I was looking for iPhoneSDK4_3.pkg but, in addition to 4.3, found packages as old as iPhoneSDK3_0.pkg. So perhaps older SDKs may still be packaged with the App Store download if you know where to find it (I didn't).
Let it install in it's own folder of choice since you won't be able to force it to install in Applications/Xcode.app/Contents/Developer (which is where the Developer folder is now)
You'll find the package installed in the Platforms folder in the volume you chose. Move the relevant SDK over to the Developer folder within Xcode.app. You'll likely have to use sudo:
sudo mv /Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Restart Xcode and you should see the new (old) SDK listed in your options for Base SDK. Yay!
Update as of 12 Sep 2013
If the "older SDK" you're trying to add comes bundled in Xcode 4.3 or later, adding the SDK is as simple as downloading Xcode from dev center link that says "Looking for an older version of Xcode?" (currently points here), mounting the dmg, then copying the relevant files over.
In terminal, you'd do something like this (edit for the appropriate SDK version number):
cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
For SDKs from versions of Xcode prior to 4.3, the older steps are still relevant.
I found this happens to work for getting the Xcode 5 GM to compile builds that carry the old iOS 6 UI even when deployed on iOS 7 devices. Useful for fixing bugs pending a UI redesign. That said, there's got to be an easier way to get the iOS 6 UI on an iOS 7 device.
You can't. What you can do, however, is click on the top-level entry in the File Navigator. It'll take you to the application settings. Go to the tab called Build Settings, and change the iOS Deployment Target to whatever version of iOS you'd like to support from (the earliest version you support).
See "To Edit a Build Setting…": http://developer.apple.com/library/ios/documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/Building/Building.html#//apple_ref/doc/uid/TP40010215-CH9-SW5
Open Xcode and open Preferences (Xcode -> Preferences menu). Click the Downloads icon and look in the Components tab. All versions from 3.0 to 5.1 should be available. Just click Install for the ones you want to use.
None of these answers worked for me for Mac OS 10.8 and XCode 4.5. But now that things are installed under the Applications folder, it's much easier to manage.
Option #1: Keeping an older copy of XCode is easy to do by renaming it before you install the new one. Then you can use Product->Preform Action->Run Without Building on the new version to test on newer devices or newer simulators.
Option #2: If you REALLY want to build with older SDKs in the newer XCode, then you can simply copy over an SDK using finder. You'll need to have an older version of XCode installed under Applications for this to work. In the following example, I just renamed XCode 4.4 to XCode_old before I installed XCode 4.5. Note: You can right click on the .app file and choose Show Contents to get to these files or just use the cp from a terminal window.
from: /Applications/Xcode_old.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
to: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
Then, iOS 5.1 will show up under Build Settings as a Bask SDK. You can do the same thing for simulators:
from: /Applications/Xcode_old.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk
to: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
You can't, but it will build fine for a device that is plugged in running an old version of iOS (what you should be conducting your proper testing on).
You have to run your application in the older version of Xcode that came coupled with the older iOS version. I have 3.2.5 installed under /Developer-3.2.5/. I have to say it's about 10 times faster than Xcode 4... You can download old versions here: http://iphonesdkdev.blogspot.com/2010/04/old-versions-of-iphone-sdk.html
I had a similar issue in Xcode 4.02 for Snow Leopard using SDK 4.3. I wanted to test on an iPhone 3G, but iOS4.2 is the latest (and correct version) for that device. In order to 'see' and run on that device in the Scheme, I had to change the Build Settings for iOS Deployment Target as described above. (btw you also have to have restrictions on the iPhone turned off to let Xcode install the app :) )
In addition to Steven's answer, you can find older versions of XCode - including the older SDKs:
Looking for an older version of Xcode?