Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift and AFNetworking integration [closed]

Tags:

Now as swift is the new language to develop iOS apps.

How can we integrate with the AFNetworking or using NSURLSession will be a better option ???

Please help me out..

like image 857
Anurag Kabra Avatar asked Jun 09 '14 12:06

Anurag Kabra


1 Answers

You have to add AFNetworking to your swift project

In Build Settings -> Defines Module set to Yes

In Build Settings -> Swift compiler -> Objective-C bridging file set the name of bridging file 'ProjectName-Bridging-Header.h' for example

In ProjectName-Bridging-Header.h write:

#import "AFNetworking.h" 
like image 144
Alexey Sidorov Avatar answered Nov 28 '22 09:11

Alexey Sidorov