Uml Tool For Mac Xcode

  1. Xcode For Mac Download
  2. Xcode Command Tools
  3. Mac Xcode Tools
  4. Xcode For Mac
  5. Xcode For Mac Air
  6. Uml Tool For Mac Xcode Editor

Xcode is the Mac app that developers use to create apps for Apple’s platforms, like iOS. In this tutorial, you’ll learn how you can download and install Xcode on your Mac.

Mandatory tools. In order to compile R for macOS, you will need the following tools: Xcode developer tools from Apple. Xcode can be obtained from Apple AppStore and the Xcode developer page. Older versions are available in the 'more' section of the Developer pages (Apple developer account necessary). GNU Fortran compiler. Objective-C is a popular programming language for Mac OS X computers. The Unified Modeling Language (UML) is the industry standard notation for modeling object-oriented software. This paper shows how to model Objective-C software using UML. Objective-C is one of several programming languages supported by Apple’s Xcode development system.

Here’s what we’ll get into:

  • 3 approaches to download and install Xcode on your Mac
  • Tips and tricks to keep your Xcode up-to-date
  • How to install Xcode betas on your Mac

Ready? Let’s go.

Xcode can only be installed on a Mac. Want to build apps with a PC? Check out your alternatives here.

How To Download Xcode for macOS

How do you download Xcode for macOS? You’ve got a few options:

  1. Get Xcode via the Mac App Store
  2. Download Xcode via developer.apple.com/downloads
  3. Install through Mac App Store CLI (see below)

Let’s walk through the approaches you can use to download and install Xcode on your Mac, and their advantages. We’ll start with the Mac App Store, because that’s the simplest option.

Here’s how you can download and install via the Mac App Store:

  1. Make sure you’re logged into macOS with your Apple ID
  2. Open the Mac App Store app
  3. Search for “xcode” in the search field, at the top-left
  4. Click on the Xcode app item that appears
  5. Click on the Get or Install buttom at the top-right to download and install Xcode

There are a few things you should know, though. Xcode is a huge app, about 7 gigabyte (GB) in size. You’ll need about 15 GB of free space on your Mac to install Xcode this way.

Installing via the App Store is simple, easy and seamless. Unfortunately, issues with downloading, like a lost connection, etc., usually means you’ll have to reattempt the download.

Author’s Note: Installing Xcode via the App Store never maxes out my download speed — not even close. On a 500 Mbps fiber line, it regularly drops down to 200 KB/s.

Installing Xcode on Mac

Installing Xcode via the Mac App Store is as simple as clicking Install. However, there’s an approach that gives you more control: developer.apple.com/download.

Here’s how that works:

  1. Go to developer.apple.com/download and log in with your Apple ID
  2. Click on More in the top-right of the page, next to Beta and Release
  3. In the search field on the left, type “xcode” and press Enter
  4. Locate and click the appropriate version of Xcode in the list
  5. In the panel slides out, click the .xip filename, i.e. Xcode 12.xip and save/download that file onto your Mac

This will download a .xip file, which includes Xcode. The download size is currently about 7 gigabyte (GB). You’ll need at least twice that size of free storage on your Mac to install Xcode with this approach. Downloading Xcode this way is often faster than through the Mac App Store.

Once you’ve downloaded Xcode, open and unzip the .xip file. This may take a while. You can then drag-and-drop the Xcode.app file to your ~/Applications folder. Finally, start the Xcode app. You’ll be greeted with the following prompt:

Air

Click Install in this prompt. Xcode will now attempt to install the Xcode Command Line Tools on your Mac. They are CLI tools used to compile apps with Xcode, among other things. You often need these tools to work with other programming languages on Mac, as well.

A disadvantage of manually installing Xcode through the Developer portal is that Xcode won’t automatically update. This isn’t necessarily a bad thing, however, because you can use this approach to install multiple versions of Xcode side-by-side. This is helpful for debugging or trying out beta versions of Xcode (see below).

Xcode For Mac Download

There’s another, more hidden benefit. Installing Xcode through the Mac App Store limits you to the most recent version of Xcode. If your version of macOS or Mac OS X doesn’t support the latest version of Xcode, you can usually install older versions via developer.apple.com!

You can pinpoint the latest version of Xcode that your Mac supports by cross-referencing a few tables on Wikipedia. First, figure out what macOS version you have. Then, go to the Xcode wiki, and find your version of macOS in the min macOS version to run column between Xcode 9.x and 12.x. The version of Xcode you can run is in the row above the one you found. For example, the latest version of Xcode you can run on macOS 10.13.6 (High Sierra) is Xcode 10.1. Keep in mind that running an older version of Xcode often limits for which iOS, Swift and SwiftUI versions you can build.

Updating Xcode to The Latest Version

How do you keep your Xcode up-to-date? Apple regularly releases new versions of Xcode. They typically include bug fixes and performance improvements, as well as new Xcode features, like the minimap.

More importantly, new Xcode versions include new versions of the iOS SDKs, Swift and SwiftUI. You can only use these new technologies with the latest versions of Xcode.

You can update your Xcode to the latest versions like this:

  1. If you’ve installed Xcode via the App Store, updates happen automatically, or you can manually initiate an update in the Updates tab of the app
  2. If you’ve manually installed Xcode via developer.apple.com, you’ll also need to manually install the newer version; updates aren’t automatic

How do you know if Xcode has a new version?

  • You get a notification on your Mac (if installed via App Store)
  • Keep an eye on developer.apple.com/news/releases (official)
  • Check out xcodereleases.com
  • Follow @XcodeReleases on Twitter

By the way, there’s a 3rd way to download and install Xcode on your Mac. It’s called mas-cli, and it’s essentially a Command Line Interface (CLI) wrapper for the Mac App Store. It uses the App Store – from the command line… Nice!

You can install mas-cli via Homebrew, a package manager for Mac. Installing mas-cli via Homebrew happens like this:

You can then list apps installed through the App Store on your Mac, with:

You can then search for Xcode like this:

Then, copy the numerical code you see on screen to install Xcode:

You can find outdated apps with mas outdated. You can then upgrade all outdated apps with mas upgrade, or selectively update Xcode by its identifier:

Awesome!

Author’s Note: As I understand it, you’ll need to have installed an app via the App Store before you can install it again with mas-cli.

Getting Xcode Beta Versions

Apple regularly releases beta versions of upcoming software, like iOS, macOS and Xcode. This enables developers to try out new features before they become available to the general public, and provide feedback and bug reports back to Apple.

How can you download and install Xcode’s beta versions? Here’s how:

  1. Go to developer.apple.com/download and log in with your Apple ID
  2. Choose one of the following:
    • Click Beta in the top-right:
      1. Select Applications
      2. Locate the featured Xcode beta you need
      3. Click Download
    • Click More in the top-right
      1. Use the search field to find “xcode”
      2. Locate the Xcode beta you need
      3. Expand the panel by clicking on it
      4. Click the .xip to download
  3. Once you’ve got a .xip, unzip it, copy the .app to your ~/Applications folder, and start the Xcode app.

As we’ve discussed before, you can install multiple versions of Xcode side-by-side with this approach. You can, for example, have the regular Xcode installed via the App Store, and install a beta version of Xcode next to it.

You don’t need to have a paid Developer Account to install betas of Xcode. Just use the free Apple Developer Account. It can occasionally happen that Apple restricts beta software to paid subscribers only, however.

If you’re installing multiple Xcodes, change their filenames to reflect their versions. That makes it easier to tell them apart! Just so you know: when you switch between installed Xcode versions, you usually get that “Install additional components” prompt again. There are ways around that, but it’s simplest to just let it install again whenever Xcode needs to.

Xcode

Further Reading

Managed to install Xcode on your Mac? Awesome! Now you know how to install Xcode’s betas next to it, and keep everything up-to-date. Here’s what we discussed in this tutorial:

  • 3 approaches to download and install Xcode on your Mac
  • Tips and tricks to keep your Xcode up-to-date
  • How to install Xcode betas on your Mac

Want to learn more? Check out these resources:

The upcoming macOS 10.15 Catalina will require more apps and tools to be notarized. Apple has some loosened the requirements at last minute, but these changed limitations are only temporary, to give developers more time to adapt.

Notarizing Mac Application bundles has its pitfalls, but is overall fairly well documented. However, I have been working on some command line tools written in Swift 5 and figured out how to get those properly signed and notarized.

Howard Oakley has written up his experiences and that post was extremely helpful. But there were a few omissions and some steps that aren’t really necessary, so I decided to make my own write-up.

And yes, there is a script at the end…

Note: these instructions are for macOS 10.14.6 Mojave, Xcode 10.3 and Swift 5.0. It is very likely that the details will change over time.

Xcode Command Tools

Update 2019-09-24: Tested with Xcode 11 and it still works (the screen layout has changed for some of the options)

What do you need?

  • Apple Developer Account (Personal or Enterprise, the free account does not provide the right certificates)
  • Xcode 10.3 or 11
  • Developer ID Certificates (Application and Install)
  • Application Specific Password for your Developer account
  • a Command Line Tool Project that you want to sign and notarize

That’s a longish list. If you are already building command line tools in Xcode, you should have most of these covered already. We will walk through the list step-by-step:

Apple Developer Program Account

You need either the paid membership in the Apple Developer Program or be invited to an Apple Developer Enterprise Program team with access to the proper certificates.

You cannot get the required certificates with a free Apple Developer account, unless you are member of a team that provides access.

Xcode

You can download Xcode from the Mac App Store or the developer download page. When you launch Xcode for the first time, it will prompt for some extra installations. Those are necessary for everything to in the article to work.

Developer ID Certificates

There are multiple certificates you can get from the Developer Program. By default you get a ‘Mac Developer’ certificate, which you can use for building and testing your own app locally.

To distribute binaries (apps and command line tools) outside of the App Store, you need a ‘Developer ID Application’ certificate. To sign installer packages for distribution outside of the Mac App Store, you need a ‘Developer ID Installer’ certificate.

We will need both types of Developer ID certificates, the first to sign the command line tool and the second to sign and notarize the installer package.

If you have not created these yet, you can do so in Xcode or in the Developer Portal. If you already have the certificates but on a different Mac, you need to export them and re-import them on the new Mac. Creating new certificates might invalidate the existing certificates! So beware.

Once you have created or imported the certificates on your work machine, you can verify their presence in the Terminal with:

This command will list all available certificates on this Mac. Check that you can see the ‘Developer ID Application’ and ‘Developer ID Installer’ certificates. If you are a member of multiple teams, you may see multiple certificates for each team.

You can later identify the certificates (or ‘identities’) by the long hex number or by the descriptive name, e.g. 'Developer ID Installer: Armin Briegel (ABCD123456)'

The ten character code at the end of the name is your Developer Team ID. Make a note of it. If you are a member of multiple developer teams, you can have multiple Developer ID certificates and the team ID will help you distinguish them.

Application Specific Password for your Developer Account

Apple requires Developer Accounts to be protected with two-factor authentication. To allow automated workflows which require authentication, you can create application specific passwords.

Mac Xcode Tools

Create a new application specific password in Apple ID portal for your developer account.

  • Apple Support: Using app-specific passwords

You will only be shown the password when you create it. Immediately create a ‘New Password Item’ in your Keychain with the following fields:

  • Keychain Item Name: Developer-altool
  • Account Name: your developer account email
  • Password: the application-specific password you just created

This will create a developer specific password item that we can access safely from the tools.

If you want, you can also store the app specific password in a different password manager, but the Xcode tools have a special option to use Keychain.

A Command Line Tool Project

You may already have a project to create a command line in Xcode. If you don’t have one, or just want a new one to experiment, you can just create a new project in Xcode and choose the ‘Command Line Tool’ template from ‘macOS’ section in the picker. The template creates a simple “Hello, world” tool, which you can use to test the notarization process.

My sample project for this article will be named “hello.”

Preparing the Xcode Project

The default settings in the ‘Command Line Tool’ project are suitable for building and testing the tool on your Mac, but need some changes to create a distributable tool.

Choosing the proper signing certificates

Before you can notarize the command line tool, it needs to be signed with the correct certificates.

  1. in Xcode, select the blue project icon in the left sidebar
  2. select the black “terminal” icon with your project’s name under the “Targets” list entry
  3. make sure the ‘General’ tab is selected
  4. under ‘Signing’ disable ‘Automatically manage signing’
  5. under ‘Signing (Debug)’ choose your Team and choose ‘Developer ID Application’ as the certificate
  6. under ‘Signing (Release)’ choose your Team and choose ‘Developer ID Application’ as the certificate

Enable Hardened Runtime

Enabling the ‘Hardened Runtime’ will compile the binary in a way that makes it harder for external process to inject code. This will be requirement for successful notarization starting January 2020.

  1. from the view where you changed the signing options, click on ‘Build Settings’ in the upper tab row
  2. click on ‘All’ to show all available settings
  3. enter ‘enable hardened’ in the search field, this will show the ‘Enable Hardened Runtime’ setting
  4. set the value in the project column (blue icon) to YES

Change the Install Build Location

If we want to automate the packaging and notarization, we need to know where Xcode builds the binary. The default location is in some /tmp subdirectory and not very convenient. We will change the location for the final binary (the ‘product’) to the build subdirectory in the project folder:

  1. in the same view as above, enter ‘Installation Build’ in the search field, this will show the ‘Installation Build Products Location’ setting
  2. double click on the value in the Project column (blue icon), this will open a popup window
  3. change the value to $SRCROOT/build/pkgroot

If you manage your code in git or another VCS, you want to add the build subdirectory to the ignored locations (.gitignore)

Build the Binary

You can use Xcode to write, test, and command line tool debug your. When you are ready to build and notarize a pkg installer, do the following:

  1. open Terminal and change directory to the project folder
  2. % xcodebuild clean install

This will spew a lot of information out to the command line. You will see a build subdirectory appear in the project folder, which will be filled with some directories with intermediate data.

After a successful build you should see a pkgroot directory in the build folder, which contains your binary in the usr/local/bin sub-path.

/usr/local/bin is the default location for command line tools in the Command Line Tool project template. It suits me fine most of the time, but you can change it by modifying the ‘Installation Directory’ build setting in Xcode and re-building from the command line.

Build the pkg

Command Line Tools can be signed, but not directly notarized. You can however notarize a zip, dmg, or pkg file containing a Command Line Tool. Also, it is much easier for users and administrators to install your tool when it comes in a proper installation package.

We can use the pkgroot directory as our payload to build the installer package:

I have broken the command into multiple lines for clarity, you can enter the command in one line without the end-of-line backslashes . You want to replace the values for the identifier, version and signing certificate with your data.

This will build an installer package which would install your binary on the target system. You should inspect the pkg file with Pacifist or Suspicious Package and do a test install on a test system to verify everything works.

If you want to learn more about installer packages and pkgbuild read my book “Packaging for Apple Administrators.”

Notarizing the Installer Package

Xcode has a command line tool altool which you can use to upload your tool for notarization:

The username is your developer account email.

The asc-provider is your ten digit Team ID. If you are only a member in a single team you do not need to provide this.

The password uses a special @keychain: keyword that tells altool to get the app-specific password out of a keychain item named Developer-altool. (Remember we created that earlier?)

This will take a while. When the command has successfully uploaded the pkg to Apple’s Notarization Servers, it will return a RequestUUID. Your notarization request will be queued and eventually processed. You can check the status of your request with:

Apple will also send an email to your developer account when the process is complete. I my experience this rarely takes more than a minute or two. (Being in Central EU time zone might be an advantage there). When the process is complete, you can run the above notarization-info command to get some details. The info will include a link that contains even more information, which can be useful when your request is rejected.

Note that the info links expire after 24 hours or so. You should copy down any information you want to keep longer.

Completing the Process

Install

You will not receive anything back from Apple other than the confirmation or rejection of your request. When a Mac downloads your installer package and verifies its notarization status it will reach out to Apple’s Notarization servers and they will confirm or reject the status.

If the Mac is offline at this time, or behind a proxy or firewall that blocks access to the Apple Servers, then it cannot verify whether your pkg file is notarized.

You can, however, ‘staple’ the notarization ticket to the pkg file, so the clients do not need to connect to the servers:

You can also use stapler to verify the process went well:

But since stapler depends on the developer tools to be installed, you should generally prefer spctl to check notarization:

Automating the Process

Obviously, I built a script to automate all this. Put the following script in the root of the project folder, modify the variables at the start of the script (lines 20–38) with your information, and run it.

The script will build the tool, create a signed pkg, upload it for notarization, wait for the result, and then staple the pkg.

View the code on Gist.

You can use this script as an external build tool target in Xcode. There are other ways to integrate scripts for automation in Xcode, but all of this is a new area for me and I am unsure which option is the best, and which I should recommend.

Links and Videos

These links and videos, especially Howard Oakley’s post and Tom Bridge’s PSU Presentation have been hugely helpful. Also thanks to co-worker Arnold for showing me this was even possible.

  • Howard Oakley: Building and delivering command tools for Catalina
  • Tom Bridge: PSU Conference Talk and Followup
  • Apple Support: Notarizing Your Mac Software for macOS Catalina
  • Apple Support: Using app-specific passwords
  • Apple Developer: Notarizing Your App Before Distribution
  • WWDC 2019: All About Notarization
  • WWDC 2019: Advances in macOS Security
  • Apple Developer: Resolving Common Notarization Issues

Xcode For Mac

Going forward

Notarization is a key part of Apple’s security strategy going in macOS.

As MacAdmins we will usually deploy software through management systems, where the Gatekeeper mechanisms which evaluate notarization are bypassed. There are, however, already special cases (Kernel Extensions) where notarization is mandatory. It is likely that Apple will continue to tighten these requirements in the future. The macOS Mojave 10.14.5 update has shown that Apple may not even wait for major releases to increase the requirements.

Xcode For Mac Air

For

Uml Tool For Mac Xcode Editor

If you are building your own tools and software for macOS and plan to distribute the software to other computers, you should start signing and notarizing.

On the other hand, I find the introduction of Notarization to macOS encouraging. If Apple wanted to turn macOS into a “App Store only system” like iOS, they would not have needed to build the notarization process and infrastructure. Instead, Apple seems to have embraced third-party-software from outside the App Store.

Notarization allows Apple to provide a security mechanism for software distributed through other means. It cannot be 100% effective, but when used correctly by Apple and the software developers it will provide a level of validation and trust for software downloaded from the internet.

Comments are closed.