On Monday, Apple released Swift, a new programming language for iOS and OS X. Today, still in the same workweek, Facebook’s Parse has added Swift support. This means developers building with Swift can take advantage of Parse’s features (storing data, managing users, sending push notifications, tracking analytics, and so on) long before Apple starts accepting apps in the fall.
To start using the Parse framework in your Swift project follow these steps:
- Add a new file to your project, an Objective-C .m file.
- When prompted about creating a bridge header file, approve the request.
- Remove the unused .m file you added.
- Add your Objective-C import statements to the created bridge header .h file:
#import < Parse/Parse.h>
// or #import < ParseOSX/ParseOSX.h>