19

I am a newbie to AFNetworking and running a simple application to understand how AFNetworking is working. I am following this tutorial on MobileTuts: http://mobile.tutsplus.com/tutorials/iphone/ios-sdk_afnetworking/. I am able to get the app running with the information but I have these two warnings.

The two warnings are:

  1. #warning "SystemConfiguration framework not found in project, or not included in precompiled header. Network reachability functionality will not be available."

2.#warning "CoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available."

I have already included the SystemConfiguration and CoreServices framework but these warnings still exist...

lakshmen
  • 28,346
  • 66
  • 178
  • 276

3 Answers3

59

In "YOURPROJECTNAME-Prefix.pch" file include this code

#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
rudensm
  • 1,464
  • 1
  • 15
  • 17
  • 2
    Add these frameworks to your project. Here is how you do that http://stackoverflow.com/questions/3352664/how-to-add-existing-frameworks-in-xcode-4 – Trausti Thor Nov 02 '12 at 08:15
  • it's good to remember that order is important. If you import these after processing the AFHTTPclient.h, the warnings will remain – Max MacLeod Nov 12 '13 at 17:01
1

In my case I am beginning to use swift in an obj-c project, and I had to add the two following headers to my <project_name>-Bridging-Header.h file:

#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
Kevin
  • 1,883
  • 16
  • 23
0

You need to add these Frameworks to your project. Here is how you do that

How to "add existing frameworks" in Xcode 4?

Community
  • 1
  • 1
Trausti Thor
  • 3,722
  • 31
  • 41
  • And have you added the #import statements in your pch file ? You should do a Clean build of your project, and even quit Xcode. I always do that when I have unexplained issues – Trausti Thor Nov 02 '12 at 08:24