问题
I am trying to build a Xcode 5 project that uses CocoaPods. The POD file is following:
target "MyProjectName" do
pod 'AFNetworking', '2.2.1'
pod 'SVProgressHUD', '0.9'
pod 'MDHTMLLabel', :head
pod 'CCBottomRefreshControl'
pod 'EXPhotoViewer', '~> 1.1.2'
pod 'NHBalancedFlowLayout', '~> 0.2'
pod 'SevenSwitch', '~> 1.3.0'
pod 'REFormattedNumberField', '~> 1.1.5'
end
The cocoapods is installing and updating correctly.
The error is: Did not find the libraries, like the one highlighted in my .pch:
#import "SVProgressHud.h"
...
/Users/xyz/Documents/Projects/avbc/repo/ios/project/ProjectName-Prefix.pch:17:13: 'SVProgressHud.h' file not found
I already did the pod reinstalling steps from solution below, without success: Cocoapods with Xcode 6 and 10.10 Yosemite
What should I do to build my project properly?
回答1:
Try the following:
1) I usually set the platform on my pod file:
platform :ios, '7.0'
2) Have you linked the library with <>?:
#import <SVProgressHUD/SVProgressHUD.h>
3) It is HUD instead of Hud. (Uppercase) <- If you link to Hud the file will never be found
回答2:
Perfom "Project Clean" (Cmd+Shift+K) to solve the problem.
来源:https://stackoverflow.com/questions/25997871/xcode-6-doesn%c2%b4t-find-cocoapods-libraries