AFNETWORK 使用之前的操作

1首先要把AFNETWORK 導入到你的工程中 就是那19個文件afnetworking 文件夾

2然後還要在工程裏面引出2個新的framwork ,SystemConfiguration/System和MobileCoreServices

3很重要的一步在你的In "YOURPROJECTNAME-Prefix.pch" file include this code

導入
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>

基本上就是這樣子然後你就可以使用了 你的工程需要什麼功能就在你的class裏面的頭文件添加什麼功能的引用

如果你出現了下面AFNETWORKING的警告的話請重複安裝上面的
"

#else

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

#endif

 

#ifndef __UTTYPE__

    #if __IPHONE_OS_VERSION_MIN_REQUIRED

        #warning MobileCoreServices 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.

    #else

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

    #endif

#endif


發佈了11 篇原創文章 · 獲贊 0 · 訪問量 7萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章