ios - Importing AFNetworking without pod -
i want add afnetworking without pod , source code project. started adding source code , following libraries.
then added prefix file
#import <availability.h> #if __iphone_os_version_min_required #ifndef __iphone_6_0 #warning "this project uses features available in iphone sdk 6.0 , later." #endif #ifdef __objc__ #import <uikit/uikit.h> #import <foundation/foundation.h> #import <systemconfiguration/systemconfiguration.h> #import <mobilecoreservices/mobilecoreservices.h> #endif #else #ifdef __objc__ #import <cocoa/cocoa.h> #import <systemconfiguration/systemconfiguration.h> #import <assertmacros.h> #import <coreservices/coreservices.h> #endif #endif
and add prefix file build settings -> apple llvm 6.1 - language -> prefix header.
after built project , got following errors:
- implicit declaration of function 'secitemexport' invalid in c99
- use of undeclared identifier 'ksecformatunknown' use of undeclared
- identifier 'ksecitempemarmour'
which in file , line. afsecurity policy.m, line 31. is:
__require_noerr_quiet(secitemexport(key, ksecformatunknown, ksecitempemarmour, null, &data), _out);
when comment line of code, not correct, rest of project built completely.
what should , why errors happened?
i found answer on github.
as mentioned in release notes 2.6, if installing library manually need define following variables in project's pch:
#ifndef target_os_ios #define target_os_ios target_os_iphone #endif #ifndef target_os_watch #define target_os_watch 0 #endif
Comments
Post a Comment