AFHTTPClient.h Warning Due to Missing CoreServices; Importing CoreServices Causes Build Fail #626

davidbitton opened this Issue Nov 5, 2012 · 5 comments

4 participants


Line 86 of AFHTTPClient.h causes build warning due to missing CoreServices import in precompiled header file. When you import , CoreServices fails to build with the following error:

/Applications/ fatal error: 'CarbonCore/DriverServices.h' file not found
#include <CarbonCore/DriverServices.h>
1 error generated.

This error continues to appear if I add a reference to MobileCoreService.framework. What's missing? Thanks!


That's the wrong import. Instead:

#import <MobileCoreServices/MobileCoreServices.h>

@tewha is correct. Is there any way that could be better-documented, in your opinion, @davidbitton?

@mattt mattt closed this Nov 5, 2012

It's actually documented just fine; I didn't read it. This came up after I did a pull from Git. I probably would have seen it in the docs has I been starting from scratch. Why not put the required import as a comment above the #warning in AFHTTPClient?


In addition to @davidbitton's suggestion, I think doing an #if TARGET_OS_IPHONE to change the name of the framework would be helpful.

Also worth noting: #waning directives shouldn't have quotes. :)


Just +1'ing that I Google'd this rather than use intelligence to solve it. OTOH Googling it got me here pretty fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment