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>
If you require more detailed instructions, Facebook has posted a more thorough explanation over on Stackoverflow. The company has also added Swift example code to its entire iOS/OSX documentation.
See also – Here’s what developers think about Apple’s new Swift programming language and Parse grows 25% in month after Facebook picked it up, powering 100k apps with aggregate API service
Get the TNW newsletter
Get the most important tech news in your inbox each week.