O'Reilly logo

Mastering Swift 4 - Fourth Edition by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding the Objective-C file to the project

Now that we have our Objective-C bridging header file and the MessageBuilder Swift file, let's create the Objective-C class that will generate a generic message to the user. We will name this class Messages. To create this file, right-click on the group folder that we want to add the file to, and we should see the following menu:

From this menu, select the New File... option. This option will walk us through creating a new file for our project. Once you select that option, you should see the following menu:

Previously, when we added the MessageBuilder Swift file, we selected Swift File on this menu. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required