Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiler Warnings with AFHTTPclient

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

like image 563
lakshmen Avatar asked Nov 02 '12 07:11

lakshmen


2 Answers

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

#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
like image 136
rudensm Avatar answered Oct 05 '22 23:10

rudensm


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>
like image 20
Kevin Avatar answered Oct 06 '22 01:10

Kevin