Mathias Mathias - 2 years ago 314
Objective-C Question

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:

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...

Answer Source

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...

#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <CoreServices/CoreServices.h>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download