Ios AFX27;t在xcode8上使用Cocoapod构建

Ios AFX27;t在xcode8上使用Cocoapod构建,ios,cocoapods,afnetworking,Ios,Cocoapods,Afnetworking,我在cocoapods 1.1.1上,正在尝试使用pod install安装此文件: source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' target "Pictabite" do pod 'AFNetworking', '~> 3.1' pod 'SDWebImage', '~>3.8' pod 'LLSimpleCamera', '~> 5.0' end 然而,在

我在cocoapods 1.1.1上,正在尝试使用
pod install
安装此文件:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target "Pictabite" do
    pod 'AFNetworking', '~> 3.1'
    pod 'SDWebImage', '~>3.8'
    pod 'LLSimpleCamera', '~> 5.0'
end
然而,在我添加AFNetworking之后,项目就不会构建了。我在Xcode上遇到以下错误:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_AFNetworkReachabilityManager", referenced from:
      objc-class-ref in AppDelegate.o
      objc-class-ref in UIDevice+Category.o
  "_OBJC_CLASS_$_AFNetworkActivityIndicatorManager", referenced from:
      objc-class-ref in PBHttpSessionManager.o
  "_OBJC_CLASS_$_AFHTTPSessionManager", referenced from:
      _OBJC_CLASS_$_PBHttpSessionManager in PBHttpSessionManager.o
      _OBJC_CLASS_$_PBHttpFQSessionManager in PBHttpFQSessionManager.o
  "_OBJC_METACLASS_$_AFHTTPSessionManager", referenced from:
      _OBJC_METACLASS_$_PBHttpSessionManager in PBHttpSessionManager.o
      _OBJC_METACLASS_$_PBHttpFQSessionManager in PBHttpFQSessionManager.o
  "_OBJC_CLASS_$_AFJSONResponseSerializer", referenced from:
      objc-class-ref in PBHttpSessionManager.o
      objc-class-ref in PBHttpFQSessionManager.o
  "_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
      objc-class-ref in PBHttpSessionManager.o
      objc-class-ref in PBHttpFQSessionManager.o
  "_OBJC_CLASS_$_AFSecurityPolicy", referenced from:
      objc-class-ref in PBHttpSessionManager.o
ld: symbol(s) not found for architecture x86_64
clang-real: error: linker command failed with exit code 1 (use -v to see invocation)

有什么想法吗?

不指定cocoapods版本,使用
使用\u框架产量:

安装AFNetworking(3.0.4)
安装LLSimpleCamera(4.2.0)
安装SDWebImage(3.7.5)

  • pod--版本
    :1.1.1
  • Xcode构建-版本
    :Xcode 8.2.1,构建版本8C1002
您的播客文件可能如下所示:

platform :ios, '10.0'

target 'Pictabite' do
    use_frameworks!

    pod 'AFNetworking'
    pod 'SDWebImage'
    pod 'LLSimpleCamera'
end

Swift 3编译示例 Objective-C编译示例
我应该提到我写的是obj-c,不是斯威夫特。我猜pod文件没有变化?没有差异。
import AFNetworking
...
let configuration = URLSessionConfiguration.default
let manager = AFURLSessionManager(sessionConfiguration: configuration)
#import "AFNetworking.h"
...
NSURLSessionConfiguration *configuration =
   [NSURLSessionConfiguration defaultSessionConfiguration];
AFURLSessionManager *manager =
   [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];