AUTHOR: Davide Bettio

A web & mobile developer blog


Use AFNetworking with Swift

After you have use CocoaPods to integrate AFNetworking in your project like described here open Xcode and: Create a new header file in your project Reference it in Build Settings->Objective-C Bridging Header as yourappname/yourbridgefile.h Import AFNetworking inside the bridging header #import <AFNetworking/AFNetworking.h> Now you can use AFNetworking from Swift: let manager = AFHTTPRequestOperationManager() manager.GET( "", parameters: nil, success: { (operation: AFHTTPRequestOperation!, responseObject: AnyObject!) in println("JSON: " + responseObject.…

Fix CocoaPods for Xcode 6 beta

If you run pod update and receive an error like this: cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError) Open Xcode 6 and under Preferences->Locations change Command Line Tools version to Xcode 6.0 Uninstall CocoaPods gem uninstall cocoapods Install XcodeProj gem install xcodeproj Install CocoaPods gem install cocoapods Run pod --version to verify that it worked…