Swift cocoapod 安装框架 (Alamofire) xcode 出现语法错误
Swift cocoapod install framework (Alamofire) occur Syntax error in xcode
我在安装一些外部框架时遇到了一些问题。因此,我在一个空白项目中尝试它,但错误是相同的,我不确定我在哪里做错了。error image
有点不常见。似乎我确实安装了错误版本的框架,因为它在代码语法中出现 40+ 错误。
此外,错误来自 Alamofire、AmazonS3RequestManager 等。
这是我的 podfile,我只是将 pod install
放在目标文件目录中
source 'https://github.com/CocoaPods/Specs.git'
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'test' do
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'AlamofireImage', '~> 2.0'
pod 'Firebase', '>= 2.4.3'
pod 'SwiftValidator', '3.0.1'
pod 'AmazonS3RequestManager', '~> 0.8'
pod 'MBProgressHUD', '~> 0.9.2'
end
您的屏幕截图中的代码适用于 Swift 2.2,因此您必须将 Xcode 更新到最新版本 Xcode 7.3。你的版本太旧了。
我在安装一些外部框架时遇到了一些问题。因此,我在一个空白项目中尝试它,但错误是相同的,我不确定我在哪里做错了。error image
有点不常见。似乎我确实安装了错误版本的框架,因为它在代码语法中出现 40+ 错误。
此外,错误来自 Alamofire、AmazonS3RequestManager 等。
这是我的 podfile,我只是将 pod install
放在目标文件目录中
source 'https://github.com/CocoaPods/Specs.git'
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'test' do
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'AlamofireImage', '~> 2.0'
pod 'Firebase', '>= 2.4.3'
pod 'SwiftValidator', '3.0.1'
pod 'AmazonS3RequestManager', '~> 0.8'
pod 'MBProgressHUD', '~> 0.9.2'
end
您的屏幕截图中的代码适用于 Swift 2.2,因此您必须将 Xcode 更新到最新版本 Xcode 7.3。你的版本太旧了。