Making iOS Document-Based Apps

November 12th, 2018

Filed under: iOS Development | Be the first to comment!

I have a two-part tutorial on making document-based iOS apps over at Swift Dev Journal.


Xcode 10: Running Tests in Random Order

November 6th, 2018

Filed under: Xcode | Be the first to comment!

In Xcode 10 you can tell Xcode to run your tests in random order. Open the scheme editor for your project and select the Test step.

Xcode10RandomizeTestOrder

Click the Options button next to the test target to open a popover. Select the Randomize execution order checkbox to run your tests in random order.


Xcode 10: Clean Build Folder

October 29th, 2018

Filed under: Xcode | Be the first to comment!

In Xcode 10 you no longer need to hold down the Option key to clean the build folder. You can just choose Product > Clean Build Folder.


Imported and Exported UTIs

October 24th, 2018

Filed under: iOS Development, Mac Development, Xcode | Be the first to comment!

If you create a document-based app project in Xcode, select the app target in the project editor, and click the Info button, you will see sections for imported and exported UTIs. If you have any of the following questions:

  • What is a UTI?
  • When would I use an imported UTI?
  • When would I use an exported UTI?

Keep reading because this articles answers those questions.

What is a UTI?

A UTI is a Uniform Type Identifier that uniquely identifies a file type. Apple has a list of system-declared UTIs, but it’s not being actively maintained. For example a plain text file has the UTI public.plain-text. Most common file types have public at the start of their UTIs.

If you create a new file type, you must create a UTI for it. The UTI should take the form com.CompanyName.FileType.

When to Use an Imported UTI

Use imported UTIs when your app edits file types that it doesn’t own. Suppose you’re developing an image editor. Your image editor edits image files in multiple file formats, such as PNG, JPEG, and TIFF. You would add an imported UTI for each file type the image editor can edit.

When to Use an Exported UTI

Use an exported UTI for any file types your app owns. When you create a new file type for your app’s documents, your app owns that file type, and you should create an exported UTI for the file type. The exported UTI lets the operating system and other apps know about the new file type.


Swift Dev Journal

October 19th, 2018

Filed under: Blog | Be the first to comment!

I want to let you know about a new site I launched, Swift Dev Journal. Swift Dev Journal has articles to help iOS and Mac developers create apps in Swift.

None of the blog posts here are moving. Regarding future writing, longer articles and tutorials about iOS and Mac development will be on Swift Dev Journal. This blog will contain tips and shorter articles, such as the changes in new versions of Xcode, as well as articles that wouldn’t fit at Swift Dev Journal.