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
Related
I have a Mac but for some complex reasons that is not worth explaining here, I will be not be able to install xCode. I have checked the tutorial here, where they provide two options. In both options, XCode is used. My question is: Is it possible to generate a build for iOS on a Mac without using XCode.
It is not possible to do this in Android Studio. If you don't have a machine with macOS (or are not able to use XCode in your case), you might be able to make a build using a macOS docker image.
You can find a macOS docker image (Docker-OSX) here (200k downloads). On this page, you can also find container images with XCode installed.
If you don't want to use the XCode app('s GUI) on your machine (or when using this Docker image), but you do have XCode (and Command Line Tools) installed - you can also make a build via the terminal using the xcodebuild command: https://developer.apple.com/library/archive/technotes/tn2339/_index.html
For more on xcodebuild, see this StackOverflow answer.
No, it's not.
What you can do though is use an external tool like appollo which will let you have access to a Mac build machine with XCode installed.
Then you can generate an IPA like this :
appollo build start --build-type ad-hoc
Here are some demo videos or Appollo's documentation
I've been using Appcelerator Studio a lot, never seen this problem before. I recently did a fresh installation of OS X, then installing Xcode (7.3.1) and Command Line Tools for Xcode 7.3.1.
When installing Appcelerator Studio (build: 4.5.0.201602170821) everything is going great, the CLI gets installed. When starting up Appcelerator Studio, I have to configure SDKs, hence I am only interested in iOS at the moment, I uncheck Android in the Platform Configuration. The following is that Configuring SDK encountered a problem:
An internal error occurred during: "Configuring SDK". java.lang.NullPointerException
I continuing, and go to Preferences>Studio>Platforms>iOS, where the iOS SDK home says Not specified, I click refresh - nothing happens.
I run xcode-select -p and the correct path to Xcode Developer folder is printed.
Anyone having a clue of solving this?
I've check all the version statuses, also tried to reinstall and deleting all information that can impact to this.
Share the directory hierarchy where you have stored Android SDK and Platform screen folder. Also try to follow the guidelines of Titanium to integrate iOS, but remember to clean the hidden folders in root directory of your OS X system.
I believe the problem might be with your Xcode. Are you having multiple Xcode's installed?
Use sudo xcode-select -switch <xcode_folder_path> switch between Xcode's.
Then,run appc ti info -t ios and check whether CLI is able to identify the selected Xcode. If your Xcode is listed here, then studio should be able to identify it.
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.
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.
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.