My pod file is as follows:
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! pod 'RestKit' pod 'CocoaLumberjack'
In addition to my application delegate, I added:
#import <RestKit/RestKit.h>
In the app: didFinishLaunchingWithOptions: I added the following:
RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[NSString class]];
While it compiles fine, I added:
AFHTTPClient* client = [[AFHTTPClient alloc] initWithBaseURL:[[NSURL alloc] initWithString:@"asdf"]];
Again, it works fine, then I tried to achieve:
[client setReachabilityStatusChangeBlock: ^(AFNetworkReachabilityStatus status) { NSLog(@"Reachability status changed"); }];
Unfortunately, this does not compile and gives the following error:
no visible @interface for 'AFHTTPClient' declares selector 'SetReachabilityStatusChangeBlock:
I went to check why this is possible and found that the compilation of this method is protected by the _SYSTEMCONFIGURATION_H macro, which for some reason allows false in this case. I tried to link my project with the SystemConfiguration infrastructure, but that doesn't help. My guess is that RestKit should be associated with it at compile time, and when I checked the RestKit module, SystemConfiguration is really present in the Link Binary with Libraries phase. Any ideas why this is not working?
Xcode7b5, cocoapods 0.38.2 An example project can be found here .