RestKit: RestKit doesnt build in version 0.26
Maybe this is my problem, as I would assume its working for some people.
I have updated to 0.26 today, I am using use_frameworks! in my Podfile (cocoapods 0.39)
It fails in CoreData.h on #import <RestKit/CoreData/RKEntityMapping.h> with file not found
I have tried cleaning, removing Pods/, no luck getting this to build.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 115 (48 by maintainers)
Commits related to this issue
- Fix #2356 (not building for CocoaPods >=0.26.0) This solves the problem described in RestKit/RestKit#2356 by adding missing header files, when not using `use_frameworks!` — committed to jlampa/RestKit by jlampa 8 years ago
- Merge pull request #2383 from jlampa/patch-1 Fix #2356 (not building for CocoaPods >=0.26.0) — committed to RestKit/RestKit by segiddins 8 years ago
- Merge pull request #2383 from jlampa/patch-1 Fix #2356 (not building for CocoaPods >=0.26.0) — committed to JIFFinc/RestKit by segiddins 8 years ago
If anyone is having problems with RestKit 0.26.0 and Cocoapods 1.0.1, hopefully this will help!
This solution worked at least on 2016-06-03, but since it uses specific git branches maybe these will be merged, so if this does not work for you please check if this git branches have been merged/moved/deleted.
Clean up before everything
Quit Xcode
Use mcfedr’s RestKit fork
Must be used together with “reachablility” branch of AFNetworking
Use module import syntax in Bridging Header (Swift only)
Now it should work!
Why is this closed? Is this being tracked elsewhere? @Sajjon Seems to have a solution that can be absorbed and released to the public so we don’t have to use a fork. I understand this may require coordination with AFNetworking team. Just curious as RestKit is used by so many and everyone has been dealing with this issue for some time now. Thank you all for you efforts to resolve. 😃
I have made branches of both RestKit and AFNetworking that solve these problems
I have just removed the conditions for
#ifdef _SYSTEMCONFIGURATION_Hand everything works just fine.My fork, https://github.com/mcfedr/RestKit/tree/pods1 works with cocoapods v1.
@mcfedr’s solution works – can we just merge it and cut a new release? A lot of people has been having this problem and it’s been a problem for 6 months now.
Yes try 0.27 then hopefully everything will work out 😃
@Sajjon @valeriomazzeo I am using Xcode 7.3, and looks like the RestKit version is ‘RestKit’, ‘~> 0.24.1’. Do I need to upgrade?
I think the easier thing to do at the moment it would be to add a cocoapods post install script to the pod file that modifies the umbrella header when installing restkit.
This way we don’t depend from external branches / fork and we have a full working installation hoping that we either remove the whole AFNetworking dependency one day, or cocoapods fix it somehow.
I have created an issue: https://github.com/CocoaPods/CocoaPods/issues/5390
@mcfedr It crashes on line 131 of RKRequestOperation.m with EXC_BAD_ACCESS. Maybe this is because of some other changes made on the development branch.
changing line 322 to not use weak reference solves the crash problem but not sure if this is the right thing to do