Install XCode.app reinstalls Xcode 4.1 and not 4.2 - ios

This question is not a dupe of, but is very similar to, this question which has an accepted answer: Xcode says I have 4.2 installed, but only 4.1 opens.
On my Mac's App Centre, it says Xcode is 'Installed' (and no option to uninstall or upgrade), but my current install of Xcode is actually 4.1 (with iOS 4.3 SDK). Following the advice of others, I've tried running Install Xcode.app from the Applications folder. This launches an installer that says "Installing Xcode 4" (note it doesn't give any minor version info like 4.1 or 4.2) -- it downloads and installs something. After installation, I still have Xcode 4.1 installed.
I've tried many reboots and also tried running the old uninstall-devtools script before running Install Xcode.app again, and no difference.
My machine is a Mid-2011 Mac Mini and it has no pending software updates available via Apple Menu -> Software Update...

Ok, here's what worked for me:
I deleted Install Xcode.app from Applications, and then ran the following script:
/Library/Developer/Shared/uninstall-devtools
This is in a different location to before and I didn't spot it :/
Then run Mac App Store, search for Xcode, you should find there is now the option to install it.

Related

How to downgrade xcode completely from the terminal/shell?

I'm not too familiar with mac and iOS but I need to downgrade xcode on a mac host for CI stuff (current app build is failing on xcode 12). I have access to the host via jumphost and I'm not sure if I can connect via VNC (I also don't like this since it's terribly slow) and most of the guides need a UI to download xcode. Any ideas on how to do this completely via terminal?
First of all download older version of Xcode, you will be need sign in to open the Downloads page.
Here is the Xcode releases page with downloads and release notes.
And install it.
After installing you can switch to the version you currently desire (for example 11.2 below) via terminal using a command like this:
sudo xcode-select -switch /Applications/Xcodex.11.2.app

Xcode 7 or 8 issue with Pods, can't run at all

Getting this error for pods in Xcode when trying to run app:
error: A cryptographic verification failure has occurred.
Tried reinstalling Pods/repo
Reinstalling Xcode(s)
Also doesn't run on simulators:
Also, running Sierra at the moment (yes, I know).
This is a regression in macOS Sierra that multiple developers have reported in the forums and in the lab sessions at WWDC. Xcode 7.3 is not officially supported on Sierra. If you want to use macOS Sierra, please use Xcode 8.0 beta or later.
If you must use Xcode 7.3 on Sierra, you can partially workaround this bug by using Xcode.app to install the app through Build & Run, launch the app suspended from the command line (xcrun simctl launch -w booted <app identifier>) and then attach with the debugger and resume the suspended process.
Note that this issue only impact Xcode 7.3.1 downloaded from the Mac App Store. You will not hit this issue if you use Xcode downloaded from http://developer.apple.com (ie, the "drag & drop installer"). Note that you might hit another issue with the same symptoms when using the drag & drop installer. That is discussed in DTAssetProviderService could not start DTXConnection with Simulator
I got mine working now!! Not really sure what I did, at all, but I just deleted the Xcode 8 .app entirely and then I redownloaded it, opened up my project in it, did a pod install and pod update, and it's running in the simulator just like normal! Not sure what I did at all, but redownloading is worth a try, it is in fact possible to fix.
If you have reinstalled CocoaPods so that it updated from a version that is lower than 1.0.0 to 1.0.0 or above it can't hurt to delete your DerivedData folder of the project that is having problems. I don't know why it fixes a lot of bugs when above scenario is the case, but it does! You can do this by going to: Window -> Projects
Then select your project on the left (It was my "Piece" project for me)
Then click the delete button
Hope this helps you out!
Launch "Keychain Access", go to "Preferences..." and click "Reset My Default Keychain". After that I was finally able to build my projects.

How do I install the iOS 4.3 Simulator on Xcode 4.5?

I have Xcode 4.5 installed via the App Store, and it has iOS 5.1 and 6.0 support, but not iOS 4.3. Nor is it available for download in the "Downloads" tab of Preferences. I tried grabbing it from another computer and putting it on this one, as described by Dominik Porada, but alas that did not work. Maybe there are other files I need? How do I get the iOS 4.3 SDK back?
I actually did get 4.3 to appear in the Xcode 4.3 menu just by copying the iPhoneSimulator4.3.sdk file to the Xcode.app package, as described by Dominik Porada. I think I just had to restart Xcode again, and there it was!
But it doesn't work. As pointed out in the answers to this question, iOS 4.3 is not supported on Mountain Lion. Might work fine for Lion, though.
This was the solution to run iOS 5.1 in XCode 4.2. Try following the same procedure. Try copying it from a previous version of XCode.Haven't tried it out myself.But see if it works.
To get Xcode 4.2 on Snow Leopard to run code on a device running iOS 5.1 you can do this:
If you have another Mac running Lion and Xcode 4.3.1 you can copy the files from:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)
Place the copied files in the equivalent place on your Snow Leopard Mac: probably
/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Similarly copy the iOS 5.1 SDK files found in this directory:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
Also copy 'version.plist' from the Lion machine in the iPhoneOS.platform folder to the Snow Leopard machine.
Re-start Xcode on the Snow Leopard machine and re-connect the devices and it seems happy enough.
If you don't have access to a machine with Lion and Xcode 4.3.1:
You can get the files out of the 4.3.1 DMG which can be downloaded from Apple here: Downloads for Apple Developers.
Mount the DMG, Show Package Contents on the Xcode icon and drill down to
/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Follow the steps above.
You might find it more convenient to use Apple's proprietary ditto method (sudo ditto src dest) in the terminal window to copy the folders.

How to remove XCode 4.2 and install 4.1 to develop Ruby / Rails on OSX Lion?

I develop Rails apps using RVM (ruby version manager).
I had to download XCode, in the app store I got only version 4.2.
Now RVM says that it can't build rubies properly with this XCode, so I followed this tutorial:
http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/
I downloaded the XCode version from the link that is shown when you type rvm requirements in the console. (https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.1_for_lion/xcode_4.1_for_lion.dmg)
Now, there is a 3.09 GB .dmg with an installXCodeLion package, and it installs successfully, but after there is no XCode or whatsoever on my system. (I stopped also the iTunesHelper process... )
Anybody knows how to install XCode 4.1 ? Or where to officially get it from Apple?
Or anybody uses RVM and ruby 1.9.2 w/ Rail 3.1 successfully on Lion?
Uninstall 4.2 with
/Library/Developer/4.2/uninstall-devtools --mode=all
Then XCode 4.1 Download is here
thanks a lot
it is helpful
first:
Uninstall 4.2 with
/Library/Developer/4.2/uninstall-devtools --mode=all
secondly:
download xcode4.1 installed dmg file
run dmg file to install Xcode
be sure there is no "install Xcode" file in your "/application" directory
after running dmg file , one new "install Xcode" file will be created in "application" directory.
finally:
run install Xcode to finish installation
Dont you have an "Install Xcode" application on your Applications folder ? I had to run it to complete the installation after executing the package from the xcode_4.1_for_lion.dmg
I'll save you any additional trouble: Your rvm installation is out of date.
Reinstall Xcode 4.2, grab the latest rvm, and get back to your work with no fuss and no hoop-jumping.
To retrieve Xcode 4.1, you have to log in to the Mac Dev Center and go to Additional Downloads. You will find all the installation disk images for all the Xcode versions.
Guillaume Petit is correct - delete Install Xcode from the APplications folder first (the 4.2 version from the App Store).
Run the xcode_4.1_for_lion.dmg again and it will create a new Install Xcode in Applications (which is the 4.1 version). Run that and Developer Tools will be installed as expected.
Im not sure if anyone is aware, but I read in another post that you have to use clang option to install rubies. example:
rvm install 1.9.2 --with-gcc=clang
The developer tools install in the "Developer" folder on your system disk.
(not in the "Applications" folder!)
The old XCode releases can indeed be found on the Mac Dev Center download site.

Adding Older iOS SDKs to Xcode 4.1 in Lion

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?

Resources