Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'AFNetworking.h' file not found问题 #42

Open
iijin opened this issue May 29, 2016 · 4 comments
Open

'AFNetworking.h' file not found问题 #42

iijin opened this issue May 29, 2016 · 4 comments

Comments

@iijin
Copy link

iijin commented May 29, 2016

楼主您好,我down了源码后,运行了pod install安装了所有的第三方库,但是编译的时候一直都有'AFNetworking.h' file not found这个问题:
在我的xcode版本是7.2的时候遇到了这个问题查了很久,又重新更新了cocoapods,用了各种方法之后,只在target是v2ex的时候这个问题能解决。
今天我更新了xcode7.3,然后按照以前的方法又重新试了一遍,发现无论是哪个target都解决不了这个问题了。
尝试过后没解决想来您这儿问一下,谢谢您啦

@singro
Copy link
Owner

singro commented May 29, 2016

pod 是什么版本呢?

@iijin
Copy link
Author

iijin commented Jun 1, 2016

谢谢您的回复啦!我的pod版本是1.0.0。

还有我第一次编译工程的时候就改了工程里的Podfile,因为我每次直接拿down下来的podfile进行 pod install时,会出现如下错误:

Analyzing dependencies
[!] The dependency AFNetworking (> 2.2.0) is not used in any concrete target.
The dependency NYXImagesKit (
> 2.3) is not used in any concrete target.
The dependency FXKeychain (> 1.5) is not used in any concrete target.
The dependency BlocksKit (
> 2.2.0) is not used in any concrete target.
The dependency NSString-Hashes (> 1.2.1) is not used in any concrete target.
The dependency FrameAccessor (
> 1.3.2) is not used in any concrete target.
The dependency MWFeedParser (> 1.0.1) is not used in any concrete target.
The dependency RegexKitLite (
> 4.0) is not used in any concrete target.
The dependency MBProgressHUD (~> 0.8) is not used in any concrete target.

所以我把podfile改成了如下:

platform :ios, '7.0'

inhibit_all_warnings!
use_frameworks!

target 'v2ex' do
pod 'AFNetworking', '> 2.2.0'
pod 'NYXImagesKit', '
> 2.3'
pod 'FXKeychain', '> 1.5'
pod 'BlocksKit', '
> 2.2.0'
pod 'NSString-Hashes', '> 1.2.1'
pod 'FrameAccessor', '
> 1.3.2'
pod 'MWFeedParser', '> 1.0.1'
pod 'RegexKitLite', '
> 4.0'
pod 'MBProgressHUD', '~> 0.8'
end

post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ARCHS'] = 'armv7 arm64'
end
end
end
然后pod install的话,可以执行成功,显示如下:

Setting up CocoaPods master repo
Setup completed
Analyzing dependencies
Downloading dependencies
Using AFNetworking (2.2.4)
Using BlocksKit (2.2.5)
Using FXKeychain (1.5.3)
Using FrameAccessor (1.3.2)
Using MBProgressHUD (0.9.1)
Using MWFeedParser (1.0.1)
Using NSString-Hashes (1.2.2)
Using NYXImagesKit (2.3)
Using RegexKitLite (4.0)
Generating Pods project
Integrating client project
Sending stats
我只对工程的podfile做了修改,剩下的就是您主页里提到的方法改过。
还有就是我觉得我第一个编译只在target是'v2ex'时能成功是因为我改了podfile,但是因为我是初学者,理解学习的不够深刻,可能改的不够完善,所以只在那一种target下成功了。

但是现在都编译不过,我现在也还没找到别的原因。
再谢谢了!~

@singro
Copy link
Owner

singro commented Jun 4, 2016

现在编不过是什么提示? 刚刚把 Podfile 更新到支持 Cocoapods 1.0 了

@guoxuhui
Copy link

我的也出现这个问题,使用更新后的1.0也不行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants