Book Image

Swift Cookbook

By : Costa
Book Image

Swift Cookbook

By: Costa

Overview of this book

If you are an experienced Objective-C programmer and are looking for quick solutions to many different coding tasks in Swift, then this book is for you. You are expected to have development experience, though not necessarily with Swift.
Table of Contents (13 chapters)
12
Index

Downloading the Xcode image

The second way of installing Xcode is by downloading an image from the Apple Developer Center; this step is not free, it's only available to members of the Apple Developer Program (which costs approximately $99 a year) or for people who work in companies that are members of this program.

Getting ready

For this recipe, you will need to have 2.2 gigabytes of free space besides the space stored by the installed Xcode, but I will assume that you won't have this problem.

The advantage of downloading a DMG file is that you can save it onto a DVD as a backup (you never know when this version of Xcode will be removed from the App Store). Also, if you work in a team, it is very important to have every member working with the same Xcode version. Also, if you want to install any beta version of Xcode, it will only be available through the Apple Developer Center.

How to do it...

To download the Xcode image, follow these steps:

  1. The first step is to open your web browser; go to http://developer.apple.com, log in where it says Member Center. If you are a member of more than one team, it will ask you which account you want to use. Choose the most appropriate one.
  2. After this, you will see a table with some options, choose iOS Dev Center or Mac Dev Center.
    How to do it...

    Tip

    You can download Xcode from iOS Dev Center, even if you are going to use it for OS X development or vice versa

  3. After downloading the DMG file, double-click on it and drag the Xcode icon into your Application folder. Remember that you need the administrator's permission to copy files into the Applications folder.
    How to do it...
  4. You can also install Xcode onto a different path like your home directory, but I wouldn't recommend this if it's not necessary.

Tip

Don't search for download swift on your search engine as there is another programming language that is also called Swift, which has nothing to do with Apple devices.

How it works...

The DMG file ensures that you can always have a backup of this Xcode version, so if for any reason, you have problems with future versions of Xcode, you can install the previous version. It is also possible to have more than one Xcode version installed onto your computer.

There's more...

The Apple Developer Center is a good website to get Xcode resources. Here, you can find videos, guides, code samples, and addons.