iosobjective-ciphonerestkitrestkit-0.20

'RestKit/RKSerialization.h' file not found via Cocapods


I've been trying for hours but couldn't find any solution that helped me to solve the issue.

my Podfile looks like:

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

I have tried different options but none of them are working.

Header Search Paths and Library Search Paths & Framework Search Paths have: $(inherited) as value.

#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

UPDATE:

cocapods version - 0.38.0
XCode version - Version 7.0 (7A220)

Solution

  • I've managed to solve it by using the following Podfile and recreated the project from scratch. I think the problem was that the XCode was created with older version and might interfere something.

    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
    

    and FileMD5Hash.podspec.json content. You will need to create that file on root folder of the 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
    }