AFNetworking与iOS 4.3不兼容 [英] AFNetworking not compatible with iOS 4.3

查看:127
本文介绍了AFNetworking与iOS 4.3不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用CocoaPods来安装AFNetworking库。这是我简单的CocoaPods文件:

I am using CocoaPods to install the AFNetworking library. Here is my simple CocoaPods file:

platform :ios
pod 'FMDB'
pod 'AFNetworking'

My Pods项目和我的主项目是iOS 6部署目标和基础SDK。当我运行pod安装时,我收到以下错误:

My Pods project and my main project are iOS 6 deployment target and base SDK. When I run the pod install I get the following error:


AFNetworking not compatible with iOS 4.3


更新:

我编辑了我的Podfile:

I edited my Podfile to this:

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

现在,当我运行pod install时,它显示以下内容:

Now when I run pod install it shows the following:

更新spec repo`master'

Updating spec repo `master'

Cocoapods 0.15.1可用。

Cocoapods 0.15.1 is available.

使用AFNetworking(1.0)
使用FMDB(2.0)
生成支持文件

Using AFNetworking (1.0) Using FMDB (2.0) Generating support files

但它永远不会将AFNetworking pod添加到pods项目在xCode中。

But it never adds the AFNetworking pod to the pods project in xCode.

推荐答案

AFNetworking 1.0及更高版本需要iOS 5.0及更高版本或Mac OS 10.7(64位版本)现代Cocoa运行时)及以上。

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.

为了与iOS 4.3兼容,请使用最新的0.10.x版本。

For compatibility with iOS 4.3, use the latest 0.10.x release.

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

UPDATE,在Podfile中指定iOS依赖:

UPDATE, specify iOS dependency in Podfile:

platform :ios, '6.0'

pod 'FMDB'
pod 'AFNetworking'

更新2,我创建了一个新项目和一个新的Podfile,运行 pod install

UPDATE 2, I create a new project and a new Podfile, run 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'.

更新3,

这篇关于AFNetworking与iOS 4.3不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆