'RestKit/RKSerialization.h' 通过 Cocoapods 找不到文件
'RestKit/RKSerialization.h' file not found via Cocapods
我已经尝试了几个小时,但找不到任何可以帮助我解决问题的解决方案。
我的 Podfile 看起来像:
source 'https://github.com/CocoaPods/Specs.git'
inhibit_all_warnings!
xcodeproj 'MyProject.xcodeproj'
# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
target 'MyProject' do
pod 'ZBarSDK', '~> 1.3.1'
pod 'RestKit'
end
我尝试了不同的选项,但 none 个都有效。
Header Search Paths
和 Library Search Paths
& Framework Search Paths
具有:$(inherited)
作为值。
#import <RestKit/RestKit.h> // works fine
#import <RestKit/RKSerialization.h> // I get 'RestKit/RKSerialization.h' file not found
#import <RestKit/RKJSONParserJSONKit.h> // 'RestKit/RKJSONParserJSONKit.h' file not found
更新:
cocapods version - 0.38.0
XCode version - Version 7.0 (7A220)
我已经设法使用以下 Podfile
解决了这个问题,并从头开始重新创建了项目。我认为问题是 XCode 是用旧版本创建的,可能会干扰某些东西。
source 'https://github.com/CocoaPods/Specs.git'
inhibit_all_warnings!
xcodeproj 'MyProject.xcodeproj'
# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
target 'MyProject' do
pod 'ZBarSDK', '~> 1.3.1'
pod 'RestKit', '0.10.3' //This is the lastest version that has RKJSONParserJSONKit file, next version is not backward compatibility with previous version, you need to update the code
pod 'FileMD5Hash', :podspec => 'FileMD5Hash.podspec.json'
end
和FileMD5Hash.podspec.json
内容。您需要在 Podfile
、thanks & +1 to @ryanmaxwell
的根文件夹中创建该文件
{
"name": "FileMD5Hash",
"version": "0.0.1",
"license": "Apache",
"summary": "Library for computing MD5 hashes of files with small memory usage.",
"homepage": "http://www.joel.lopes-da-silva.com/2010/09/07/compute-md5-or-sha-hash-of-large-file-efficiently-on-ios-and-mac-os-x/",
"authors": {
"Joel Lopes Da Silva": "joel@lopes-da-silva.com"
},
"source": {
"git": "https://github.com/JoeKun/FileMD5Hash.git",
"commit": "6864c180c010ab4b0514ba5c025091e12ab01199"
},
"prefix_header_file": "Common/FileMD5Hash_Prefix.pch",
"source_files": "Common/*.{h,c}",
"requires_arc": false
}
我已经尝试了几个小时,但找不到任何可以帮助我解决问题的解决方案。
我的 Podfile 看起来像:
source 'https://github.com/CocoaPods/Specs.git'
inhibit_all_warnings!
xcodeproj 'MyProject.xcodeproj'
# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
target 'MyProject' do
pod 'ZBarSDK', '~> 1.3.1'
pod 'RestKit'
end
我尝试了不同的选项,但 none 个都有效。
Header Search Paths
和 Library Search Paths
& Framework Search Paths
具有:$(inherited)
作为值。
#import <RestKit/RestKit.h> // works fine
#import <RestKit/RKSerialization.h> // I get 'RestKit/RKSerialization.h' file not found
#import <RestKit/RKJSONParserJSONKit.h> // 'RestKit/RKJSONParserJSONKit.h' file not found
更新:
cocapods version - 0.38.0
XCode version - Version 7.0 (7A220)
我已经设法使用以下 Podfile
解决了这个问题,并从头开始重新创建了项目。我认为问题是 XCode 是用旧版本创建的,可能会干扰某些东西。
source 'https://github.com/CocoaPods/Specs.git'
inhibit_all_warnings!
xcodeproj 'MyProject.xcodeproj'
# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
target 'MyProject' do
pod 'ZBarSDK', '~> 1.3.1'
pod 'RestKit', '0.10.3' //This is the lastest version that has RKJSONParserJSONKit file, next version is not backward compatibility with previous version, you need to update the code
pod 'FileMD5Hash', :podspec => 'FileMD5Hash.podspec.json'
end
和FileMD5Hash.podspec.json
内容。您需要在 Podfile
、thanks & +1 to @ryanmaxwell
{
"name": "FileMD5Hash",
"version": "0.0.1",
"license": "Apache",
"summary": "Library for computing MD5 hashes of files with small memory usage.",
"homepage": "http://www.joel.lopes-da-silva.com/2010/09/07/compute-md5-or-sha-hash-of-large-file-efficiently-on-ios-and-mac-os-x/",
"authors": {
"Joel Lopes Da Silva": "joel@lopes-da-silva.com"
},
"source": {
"git": "https://github.com/JoeKun/FileMD5Hash.git",
"commit": "6864c180c010ab4b0514ba5c025091e12ab01199"
},
"prefix_header_file": "Common/FileMD5Hash_Prefix.pch",
"source_files": "Common/*.{h,c}",
"requires_arc": false
}