coderlife7 coderlife7 - 21 days ago 6
iOS Question

Existing project pod install swift compiler error

I'm new to

CocoaPods
with Swift . I've exiting network operation project . now I want to install
Alamofire
in my project but unfortunately it is showing to much error.

what am I done ?


  1. Version 8.0 (8A218a) for flow this guide
    https://github.com/Alamofire/Alamofire

  2. open white .xcworkspace



Update:
Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38)
Target: x86_64-apple-macosx10.9



If you need any information let me know

Answer

I was faced with the same problem .I resolved is flowing step


when you open .xcworkspacexcode saying your convert to currrent swift syntax then apply this step way .

enter image description here

0) Close your project from xCode

1) update your cocoapods sudo gem install cocoapods --pre or sudo gem install -n /usr/local/bin cocoapods

2)uninstall and reinstall pods . Example

For Uninstall

 source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    #pod 'Alamofire', '~> 4.0'
end

For Install

 source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'Alamofire', '~> 4.0'
end

3) open .xcworkspace

4) Choosing Product | Clean then Product | Build


If Xcode isn't saying you convert to current swift syntax then

Choosing Product | Clean then Product | Build

Hope it will be helpful

Comments