我有一個swift版本2.3的應用程序。使用傳統的Swift語言版本「(SWIFT_VERSION)不起作用
當我嘗試在xcode 8中運行並在構建設置中設置「User Legacy Swift - > YES」時,它僅給出cocoapods的錯誤。
見下圖:
MY莢文件:
platform :ios, '8.0'
use_frameworks!
target 'xxx' do
pod 'Alamofire', '~> 3.3'
pod 'PKHUD', '~> 3.1'
pod 'SCLAlertView', '~> 0.5'
pod 'SwiftyJSON', '~> 2.3'
pod 'ICSPullToRefresh', '~> 0.4'
pod 'ReachabilitySwift', '~> 2.3'
pod 'IQKeyboardManagerSwift', '~> 4.0'
end
target 'xxTests' do
end
target 'xxUITests' do
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3'
end
end
end
看到這個https://medium.com/@ziminalex/xcode-8-0-cocoapods-95d8e7a769a9#.io4x2qz6a –
可能是它的HTTP可能重複:/ /stackoverflow.com/questions/38446097/xcode-8-beta-3-use-legacy-swift-issue –
@ Anbu.Karthik,我已經做了同樣的事情,但仍然有錯誤,如圖所示 – user2526811