RKObjectMapping.h not found

I "pod update", and my version of RestKit is now 0.25.0, my RKValueTransformers is 1.1.2, and the error "RKObjectMapping.h" was not found.

What Changed RestKit in the new version, that I check on its github, I can not find anything.

The following steps may reproduce the error:

1) Create a new project

2) pod init

The subfile is as follows:

platform :ios, '8.3' #pod 'RestKit', '~> 0.20.0' #pod 'RestKit', '~> 0.24.1' pod 'RestKit' 

In all cases of different versions the problem is the same

3) open .xcworkspace

4) in viewcontroller.m

 #import <RestKit/ObjectMapping/RKObjectMapping.h> #import <RestKit/ObjectMapping/RKRelationshipMapping.h> #import <RestKit/Network/RKResponseDescriptor.h> #import <RestKit/Network/RKObjectRequestOperation.h> #import <RestKit/Support/RKLog.h> #import <RestKit/CoreData/RKEntityMapping.h> #import <RestKit/Network/RKObjectManager.h> 

or

 #import "RKObjectMapping.h" #import "RKRelationshipMapping.h" #import "RKResponseDescriptor.h" #import "RKObjectRequestOperation.h" #import "RKLog.h" #import "RKEntityMapping.h" #import "RKObjectManager.h" 

The error still exists: "RKObjectMapping.h" not found in the RestKit Pod file

Note. I am using Xcode 7-beta5, Objective-C

+48
objective-c cocoapods restkit
Sep 14 '15 at 10:22
source share
4 answers

After a while, I noticed that the error was not from RestKit. This is due to updating the latest version of cocoapods (0.399.4).

The header search path is no longer in recursive mode.

The workaround is simply lowering the cocoapods version to 0.38.0.

1) uninstall the latest version of cocoapod

 sudo gem uninstall cocoapods

2) install version 0.38.0

 sudo gem install cocoapods -v 0.38.0

Hope can help someone.

Updated:

Thanks Vig that we can make a pod with a specific version:

 pod _0.38.0_ update
 pod _0.38.0_ install
+74
Sep 15 '15 at 9:18
source share
— -

There is an easy way around this problem when you do not want to touch cocoapods. because correct them by themselves. I fixed my problem as follows:

Click on the project file
Then go to the assembly settings search for " header search path "
With a dropdown just make them recursive .

You should look for the following:

 ${PODS_ROOT}/Headers/Public/AFNetworking ${PODS_ROOT}/Headers/Public/Bolts ${PODS_ROOT}/Headers/Public/ISO8601DateFormatterValueTransformer ${PODS_ROOT}/Headers/Public/RKValueTransformers ${PODS_ROOT}/Headers/Public/RestKit ${PODS_ROOT}/Headers/Public/SOCKit ${PODS_ROOT}/Headers/Public 
+94
Oct 20 '15 at 15:14
source share

This has finally been fixed in the RestKit development branch with the latest patch located in 1d8f3e332, I think.

I hope he will soon be combined with the master.

For now, if you feel brave, you can use

 pod 'RestKit', :git => 'git@github.com:RestKit/RestKit.git', :commit => '1d8f3e3325d959094a3f96c832bf9f54c9c48df3' 
+1
Jan 15 '16 at 17:41
source share

I solved this by creating containers as frameworks.

 use_frameworks! 
-3
Oct 21 '15 at 13:43 on
source share