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

Closed
davidbitton opened this Issue Nov 5, 2012 · 5 comments

4 participants

@davidbitton

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/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:125:10: 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!

@tewha

That's the wrong import. Instead:

#import <MobileCoreServices/MobileCoreServices.h>
@mattt

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

@mattt mattt closed this Nov 5, 2012
@davidbitton

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?

@tewha

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

@mxcl

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