Quickstart

  1. Install Xcode and the Xcode Command Line Tools
  2. Agree to Xcode license in Terminal: sudo xcodebuild -license
  3. Install MacPorts for your version of the Mac operating system:

All downloads are hosted by Apple. Links on this site take you directly to Apple’s download pages. This is not an official Apple website. Please consider donating to help maintain it. Xcode 10 (10.14 SDK), Xcode 9. (10.13 SDK) Note: Xcode 9 is only supported for application development (to be able to opt out of features such as layer-backing and dark mode), not for development of Qt itself. # Installing the latest Xcode command line tools on 10.7.x and 10.8.x # on 10.7/10.8, instead of using the software update feed, the command line tools are downloaded # instead from public download URLs, which can be found in the dvtdownloadableindex.

Installing MacPorts

MacPorts version 2.7.1 is available in various formats for download and installation (note, if you are upgrading to a new major release of macOS, see the migration info page):

  • “pkg” installers for Big Sur, Catalina, and Mojave, for use with the macOS Installer. This is the simplest installation procedure that most users should follow after meeting the requirements listed below. Installers for legacy platforms High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard and Tiger are also available.
  • In source form as either a tar.bz2 package or a tar.gz one for manual compilation, if you intend to customize your installation in any way.
  • Git clone of the unpackaged sources, if you wish to follow MacPorts development.
  • The selfupdate target of the port(1) command, for users who already have MacPorts installed and wish to upgrade to a newer release.

Checksums for our packaged downloads are contained in the corresponding checksums file.

The public key to verify the detached GPG signatures can be found under the attachments section on jmr's wiki page. (Direct Link).

Please note that in order to install and run MacPorts on macOS, your system must have installations of the following components:

  1. Apple's Xcode Developer Tools (version 12.2 or later for Big Sur, 11.3 or later for Catalina, 10.0 or later for Mojave, 9.0 or later for High Sierra, 8.0 or later for Sierra, 7.0 or later for El Capitan, 6.1 or later for Yosemite, 5.0.1 or later for Mavericks, 4.4 or later for Mountain Lion, 4.1 or later for Lion, 3.2 or later for Snow Leopard, or 3.1 or later for Leopard), found at the Apple Developer site, on your Mac operating system installation CDs/DVD, or in the Mac App Store. Using the latest available version that will run on your OS is highly recommended, except for Snow Leopard where the last free version, 3.2.6, is recommended.

    With Xcode 4 and later, users need to accept the Xcode EULA by either launching Xcode or running:

  2. Apple's Command Line Developer Tools, which can be installed on recent OS versions by running this command in the Terminal:

    Older versions are found at the Apple Developer site, or they can be installed from within Xcode back to version 4. Users of Xcode 3 or earlier can install them by ensuring that the appropriate option(s) are selected at the time of Xcode's install ('UNIX Development', 'System Tools', 'Command Line Tools', or 'Command Line Support').

  3. (Optional) The X11 windowing environment, for ports that depend on the functionality it provides to run. You have multiple choices for an X11 server:
    • Install the xorg-server port from MacPorts (recommended).
    • The XQuartz Project provides a complete X11 release for macOS including server and client libraries and applications.
    • Apple's X11.app is provided by the “X11 User” package on older OS versions. It is always installed on Lion, and is an optional installation on your system CDs/DVD with previous OS versions.

macOS Package (.pkg) Installer

The easiest way to install MacPorts on a Mac is by downloading the pkg or dmg for Big Sur, Catalina, Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion, Snow Leopard, Leopard or Tiger and running the system's Installer by double-clicking on the pkg contained therein, following the on-screen instructions until completion.

This procedure will place a fully-functional and default MacPorts installation on your host system, ready for usage. If needed your shell configuration files will be adapted by the installer to include the necessary settings to run MacPorts and the programs it installs, but you may need to open a new shell for these changes to take effect.

The MacPorts “selfupdate” command will also be run for you by the installer to ensure you have our latest available release and the latest revisions to the “Portfiles” that contain the instructions employed in the building and installation of ports. After installation is done, it is recommended that you run this step manually on a regular basis to to keep your MacPorts system always current:

At this point you should be ready to enjoy MacPorts!

Type “man port” at the command line prompt and/or browse over to our Guide to find out more information about using MacPorts. Help is also available.

2 Run Swift, Xcode, IOS8, Mac OSX Yosemite 10.10 On Windows ...

Source Installation

If on the other hand you decide to install MacPorts from source, there are still a couple of things you will need to do after downloading the tarball before you can start installing ports, namely compiling and installing MacPorts itself:

  1. cd” into the directory where you downloaded the package and run “tar xjvf MacPorts-2.7.1.tar.bz2” or “tar xzvf MacPorts-2.7.1.tar.gz”, depending on whether you downloaded the bz2 tarball or the gz one, respectively.
  2. Build and install the recently unpacked sources:
    • cd MacPorts-2.7.1
    • ./configure && make && sudo make install
    Optionally:
    • cd ../
    • rm -rf MacPorts-2.7.1*

These steps need to be perfomed from an administrator account, for which “sudo” will ask the password upon installation. This procedure will install a pristine MacPorts system and, if the optional steps are taken, remove the as of now unnecessary MacPorts-2.7.1 source directory and corresponding tarball.

To customize your installation you should read the output of “./configure --help | more” and pass the appropriate options for the settings you wish to tweak to the configuration script in the steps detailed above.

You will need to manually adapt your shell's environment to work with MacPorts and your chosen installation prefix (the value passed to configure's --prefix flag, defaulting to /opt/local):

  • Add ${prefix}/bin and ${prefix}/sbin to the start of your PATH environment variable so that MacPorts-installed programs take precedence over system-provided programs of the same name.
  • If a standard MANPATH environment variable already exists (that is, one that doesn't contain any empty components), add the ${prefix}/share/man path to it so that MacPorts-installed man pages are found by your shell.
  • For Tiger and earlier only, add an appropriate X11 DISPLAY environment variable to run X11-dependent programs, as Leopard takes care of this requirement on its own.

Lastly, you need to synchronize your installation with the MacPorts rsync server:

Upon completion MacPorts will be ready to install ports!

It is recommended to run the above command on a regular basis to keep your installation current. Type “man port” at the command line prompt and/or browse over to our Guide to find out more information about using MacPorts. Help is also available.

Git Sources

If you are developer or a user with a taste for the bleeding edge and wish for the latest changes and feature additions, you may acquire the MacPorts sources through git. See the Guide section on installing from git.

Purpose-specific branches are also available at the https://github.com/macports/macports-base/branches url.

Alternatively, if you'd simply like to view the git repository without checking it out, you can do so via the GitHub web interface.

Selfupdate

If you already have MacPorts installed and have no restrictions to use the rsync networking protocol (tcp port 873 by default), the easiest way to upgrade to our latest available release, 2.7.1, is by using the selfupdate target of the port(1) command. This will both update your ports tree (by performing a sync operation) and rebuild your current installation if it's outdated, preserving your customizations, if any.

Other Platforms

Running on platforms other than macOS is not the main focus of The MacPorts Project, so remaining cross-platform is not an actively-pursued development goal. Nevertheless, it is not an actively-discouraged goal either and as a result some experimental support does exist for other POSIX-compliant platforms such as *BSD and GNU/Linux.

The full list of requirements to run MacPorts on these other platforms is as follows (we assume you have the basics such as GCC and X11):

  • Tcl (8.4 or 8.5), with threads.
  • mtree for directory hierarchy.
  • rsync for syncing the ports.
  • cURL for downloading distfiles.
  • SQLite for the port registry.
  • GNUstep (Base), for Foundation (optional, can be disabled via configure args).
  • OpenSSL for signature verification, and optionally for checksums. libmd may be used instead for checksums.

Normally you must install from source or from an git checkout to run MacPorts on any of these platforms.

Help

Xcode 10.15.2

Help on a wide variety of topics is also available in the project Guide and through our Trac portal should you run into any problems installing and/or using MacPorts. Of particular relevance are the installation & usage sections of the former and the FAQ section of the Wiki, where we keep track of questions frequently fielded on our mailing lists.

If any of these resources do not answer your questions or if you need any kind of extended support, there are many ways to contact us!

XCode is an integrated development environment developed to work on Mac operating systems. It contains a suite of software development tools developed by apple. XCode facilitates us to develop software for macOS, tvOS, iOS, and watchOS. The latest stable release of XCode is 11.0, which is available on the Mac App Store for all the users of macOS Mojave. In this section of the tutorial, we will go through various contexts of XCode. We will also go through multiple sections of XCode.

Version History

SNRelease yearOperating systemFeatures
1.x series2003MacOS 10.3 +It is based on the project builder. XCode 1.5 has an improved debugger and better code compiler.
2.X series2005MacOS 10.4 +It included the Quartz Composer, better code sense indexing for Java, and Ant support. The XCode 2.1 could create pre-compiled binary files.
3.X series2007macOS 10.5+The XCode 3.X series includes DTrace debugging tool(instruments), refactoring support, context-sensitive documentation, and Objective C 2.0 with garbage collection.
4.X series2011macOS 10.6.8+XCode version 4 integrated the XCode editing tool and interface builder into one application. Among many changes, it also included the support for iOS iOS 5.1, enhancements to iOS simulator, and suggested the move to LLDB debugger versus the GDB Debugger.
5.X series2013macOS 10.8+It added support for iOS 7 SDK. It also added a version of Clang generating 64-bit ARM code for iOS 7. Apple removed support for building garbage collected Cocoa binaries in XCode 5.1
6.x series2014macOS 10.9.4+XCode version 6 provided many enhancements, including the support for all new programming language of apple i.e., Swift. XCode 6 also includes the support for playgrounds and live debugging tools.
7.x series2015macOS 10.10.3+XCode version 7 provided support for Swift 2 and metal for OS X. It also added the support for deploying an iOS device without having an apple developer license.
8.x series2016macOS 10.11.5+XCode version 8 provided support for Swift 3.
9.x series2017macOS 10.12.6+It provided support for Swift 4 and metal 2 for OS X.
10.x series2018macOS 10.13.6+Xcode 10 introduced support for the Dark Mode announced for macOS Mojave, the collaboration platforms Bitbucket and GitLab (in addition to GitHub), training machine learning models from playgrounds, and the new features in Swift 4.2 and Metal 2.1, as well as improvements to the editor and the project build system.
11.X series2019macOS 10.14.4+XCode 11 introduced support for the new features in Swift 5.1, as well as the new SwiftUI framework (although the interactive UI tools are only available when running under macOS 10.15). It also supports building iPad applications that run under macOS; includes integrated support for the Swift Package Manager; and contains further improvements to the editor, including a 'minimap' that gives an overview of a source code file with quick navigation.

The latest version of XCode i.e., Version 11, can be installed on macOS Mojave from the Apple Mac App store. However, in this tutorial, we are going to use XCode 10.2.1

A Quick walkover of XCode

Let's have a quick walkover of XCode 10.2.1 and understand how the development in XCode is going to be done.

When we create a new XCode Project, the following window is shown which provides the target information of the XCode Project. It shows every information of the project that includes Bundle Identifier, App version, Build Version, Signing Information, Deployment Information, Linked Binaries and framework information, and application launch icons.

Above the target information, there is a pane of project information which shows all the information about the project given in the following image. It contains information about the iOS version for which the application is created. It also contains release information.

We will discuss the target and project information later in this tutorial in detail.

Now let's look at all the components of an XCode window (below image) in detail.

Standard Editor

The standard editor is shown in the middle of the window. As the name suggests, it is the standard editor of the project in which the project files are edited. It contains the information about the file commented at the top and the initial View Controller class file with the lifecycle method created. (The lifecycle methods will be discussed later in this tutorial. At the topmost pane of the Standard editor, the hierarchical information about the project file is shown. It can also be used to open other files in the same editor. However, we can also navigate to other project files using the project navigator also.

How Can I Download Xcode On Mac 10.9.5? - Apple Community

Assistant Editor

The Assistant Editor is mainly used to create outlets of the storyboard components (Textfield, Label, etc.) in the corresponding View Controller class file. However, the Assistant editor facilitates us to look at two files in the editor simultaneously.

Project Navigator

The project navigator is shown at the left of the window. It shows the file structure of the project. It is used to navigate through the project. Initially, an XCode project contains the files shown in the following image.

File Inspector

The inspectors are shown in the right of the XCode window, as shown in the below image. The file inspector shows the full information about the corresponding swift file opened in the standard editor. It contains the Name, Type, Location, and the interface builder document-related information.

Xcode 10.15

Quick help inspector

It is used to provide help to the user where it can search the documentation about the syntax. It is shown as the below image.

Identity Inspector

Identity Inspector is mainly used when we need to work with the storyboard. It shows information about storyboard components (View Controllers) and their corresponding Swift class files. To program the storyboard components accordingly, we need to assign class files to them. All this information is shown by Identity Inspector, as shown in the below image. It prompts the developer to assign class and module to the corresponding storyboard View Controller. It also prompts the developer to assign the identity name to the View Controller, which is used throughout the project to identify the View Controller. We can also give some Runtime constraint to the UIView shown in the storyboard.

Attribute Inspector

An attribute inspector is used to give some attributes to the corresponding UIView in the storyboard like content mode, tags, interaction, background color, font color, font size, etc. The attributes given to the storyboard views using attribute inspector are static and can be changed programmatically at runtime.

Size Inspector

Size inspector provides information about the size constraints given to the view while designing using a storyboard. We can alter the size constraint given to the view using the Size Inspector.

Connections Inspector

It shows the information about the connections of the corresponding storyboard UIView to the swift class file. It contains all the connections of the storyboard to the swift class files.

Installing Xcode On OS X 10.9.5 - Apple Community

Media Library

collection view, etc. which is primarily used to create an iOS application. Using the media library, we can insert the desired widget to the storyboard using drag & drop functionality. We can open the media library using command + shift + L short key.

At the bottom of the Standard Editor, the debugger console is shown, which is used for debugging the program at runtime. The console is also used to print the values using swift the print(), and debugPrint() functions.

Next TopiciPhone History & Versions