Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Send a request using Alamofire in swift

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 963
    Comment on it

    Use the alamofire in swift first install the pod file in your project using below steps:

    1- open the terminal and run following commands

    sudo gem update --system
    sudo gem install cocoapods
    pod setup
    change folder to the current proejct directory

    pod init
    open -a Xcode Podfile
    write these line your pod file
    platform :ios, "8.0" use_frameworks! pod 'Alamofire' pod 'SwiftyJSON' end

    target 'reqeustProject' do

    end

    target 'reqeustProject' do

    end

    import SwiftyJSON
    import Alamofire
    Alamofire.request(.GET, "http://api.androidhive.info/contacts/").response { (req, res, data, error) -> Void in print("my respose data\(res)") let outputString = NSString(data: data!, encoding:NSUTF8StringEncoding) print("converted Data\(outputString)") }

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: