简体   繁体   English

AFNetworking与iOS 4.3不兼容

[英]AFNetworking not compatible with iOS 4.3

I am using CocoaPods to install the AFNetworking library. 我正在使用CocoaPods来安装AFNetworking库。 Here is my simple CocoaPods file: 这是我简单的CocoaPods文件:

platform :ios
pod 'FMDB'
pod 'AFNetworking'

My Pods project and my main project are iOS 6 deployment target and base SDK. My Pods项目和我的主项目是iOS 6部署目标和基础SDK。 When I run the pod install I get the following error: 当我运行pod安装时,我收到以下错误:

 AFNetworking not compatible with iOS 4.3 

UPDATED: 更新:

I edited my Podfile to this: 我编辑了我的Podfile到这个:

platform :ios, '6.0'
pod 'FMDB'
pod 'AFNetworking'

Now when I run pod install it shows the following: 现在,当我运行pod安装时,它显示以下内容:

Updating spec repo `master' 更新spec repo`master'

Cocoapods 0.15.1 is available. Cocoapods 0.15.1可用。

Using AFNetworking (1.0) Using FMDB (2.0) Generating support files 使用AFNetworking(1.0)使用FMDB(2.0)生成支持文件

But it never adds the AFNetworking pod to the pods project in xCode. 但它从未将AFNetworking pod添加到xCode中的pods项目中。

AFNetworking 1.0 and higher requires either iOS 5.0 and above, or Mac OS 10.7 (64-bit with modern Cocoa runtime) and above. AFNetworking 1.0及更高版本需要iOS 5.0及更高版本,或Mac OS 10.7(现代Cocoa运行时的64位)及更高版本。

For compatibility with iOS 4.3, use the latest 0.10.x release. 为了与iOS 4.3兼容,请使用最新的0.10.x版本。

from: https://github.com/AFNetworking/AFNetworking : 来自: https//github.com/AFNetworking/AFNetworking

UPDATE, specify iOS dependency in Podfile: 更新,在Podfile中指定iOS依赖项:

platform :ios, '6.0'

pod 'FMDB'
pod 'AFNetworking'

UPDATE 2, I create a new project and a new Podfile, run pod install : 更新2,我创建一个新项目和一个新的Podfile,运行pod install

$ pod install
Resolving dependencies of `./Podfile'
Updating spec repositories
Resolving dependencies for target `default' (iOS 6.0)
Downloading dependencies
Installing AFNetworking (1.0)
Installing FMDB (2.0)
Generating support files

[!] From now on use `AF.xcworkspace'.
Integrating `libPods.a' into target `AF' of Xcode project `./AF.xcodeproj'.

UPDATE 3, 更新3,

屏幕截图

Specifying your Versions of the desired pods may help. 指定所需pod的版本可能会有所帮助。

platform :ios, '6.0'
pod 'FMDB', '~> 2.0'
pod 'AFNetworking', '~> 1.1.0'

Also make sure you're opening the correct xcworkspace file. 还要确保打开正确的xcworkspace文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM