Topic : CoreServices/CoreServices.h doesn't want to be found on Device but sim ok

来源:互联网 发布:网络学位证有用吗 编辑:程序博客网 时间:2024/06/11 06:13

http://discussions.apple.com/thread.jspa?threadID=1539092

 

------------------------------------------------------------------------------------------------------------------

 

Hi all,

on the device CoreServices is not working. I use CFNetwork.

you have to do a little trick with the define... this is what is in my code

#if TARGET_IPHONE_SIMULATOR
#import <CoreServices/CoreServices.h>
#else
#import <CFNetwork/CFNetwork.h>
#endif

of course you have to import the right framework in the xcode project...

look at the Developer guide: there is the right example for that.

http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/DevelopmentEnvironmentOverview/chapter_4_section_7.html#//apple_ref/doc/uid/TP40007072-CH5-SW20

HTH

cheers

Teo

原创粉丝点击