Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restkit has suddenly stopped compiling today

I am using RestKit in my project since a long time, using CocoaPods.

Podfile:pod 'RestKit', '~> 0.26.0'

Today, for unknown reasons, my project doesn't compile anymore. To the best of my knowledge, i have not changed any project settings or anything.

I get the error in RKObjectManager.h:

/projects/iphone/Pods/Headers/Public/RestKit/Network/RKObjectManager.h:892:49: 
Unknown type name 'AFNetworkReachabilityStatus'; did you mean 'SCNetworkReachabilityFlags'?

If i go into the h.file and click on the ReachabilityStatusEnum, i can see it, so it seems to be there although it says 'Unknown Type'.

I am at a loss as to how fix this. I followed the RestKit cocoapods instructions when i set it up a long time ago. Could it be because i upgraded xcode recently?

Very thankful for pointers...

like image 342
Mathias Avatar asked Dec 03 '25 15:12

Mathias


2 Answers

This seems to be an issue with RestKit and cocoapods 1.0.1 (maybe also 1.0). What I did was install version 0.39 which I had used before.

sudo gem install cocoapods -v 0.39.0

and then use this Version to install

pod _0.39.0_ install

solved the problem for me at least for the time being.

like image 143
matteok Avatar answered Dec 06 '25 05:12

matteok


OK, so in the end, i had to add this to the .pch file. I have never had it there, and my project has built for over a year without it. Would be great to know why i suddenly had to include it...

#if __IPHONE_OS_VERSION_MIN_REQUIRED
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
#else
#import <SystemConfiguration/SystemConfiguration.h>
#import <CoreServices/CoreServices.h>
#endif
like image 21
Mathias Avatar answered Dec 06 '25 05:12

Mathias



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!