In order to take advantage of the Arena Daemon's features within

a Swift language based environment, the developer needs to perform

a simple and quick project setup.

In this tutorial we will show the steps to achieve that goal.

 

The procedure described below is directly derived from the Apple's official reference

about Swift and ObjC coexistence in iOS projects.

For more info, please refer to the Apple Developer Website.

 


Step 1 : Create the Bridge header file

The very first step is the creation of a new header file.

Name it BDArena-Bridging-Header.h

swift_setup_1.jpg

 

and paste in the following code :

 

// BDArena-Bridging-Header.h

// ArenaSwift

//

// Copyright (c) 2016 ArenaDaemon. All rights reserved.

//

 

#ifndef ArenaSwift_BDArena_Bridging_Header_h

#define ArenaSwift_BDArena_Bridging_Header_h

 

#import <BDArenaConnector/BDArenaConnector.h>

 

#endif

 

 

 

Step 2 : setup the project

Now, navigate to the Build Settings and fill up 'Objective-C Bridging Header' field

with the value : $(PROJECT_DIR)/BDArena-Bridging-Header.h

swift_setup_2.jpg

and that's all!

The SDK is now ready to be used in the Swift project!