解決方法:changed the value of the 「compiler for c/c++/objective-c」 to default compiler.
afnetworking 錯誤 request failed: unacceptable content-type: text/plain.
網路請求api獲取資料的時候發現以下錯誤:
error: error domain=com
.alamofire
.error
.serialization
.response code=-1016
"request failed: unacceptable content-type: text/plain" userinfo=0x17d0ccb0 }, nslocalizeddescription=request failed: unacceptable content-type: text/plain}error: error domain=com
.alamofire
.error
.serialization
.response code=-1016
"request failed: unacceptable content-type: text/plain" userinfo=0x17d0ccb0 }, nslocalizeddescription=request failed: unacceptable content-type: text/plain}
解決方案:
需要在afnetworking的原始檔afurlresponseserialization.m中新增以下綠色部分**
- (instancetype)init
self.acceptablecontenttypes = [nsset
return
self;
}
bug-3:afn(400)錯誤傳遞的引數不對
bug-4:afn(404)錯誤
json 序列化問題
404錯應該是伺服器不可到達造成的
bug-5:afn(500)錯誤
http status 500(伺服器內部錯誤)
伺服器遇到錯誤,無法完成請求。
iOS 開發中常見的BUG
1.null urgent all bitcode will be dropped because x was built without bitcode.you must rebuild it with bitcode enabled xcode setting enable bitcode ob...
iOS開發常見警報Warning和Bug修復
解決方法 在podfile檔案中 增加一句inhibit all warnings 解決方法 project targets build setting library search paths,刪除對應路徑 解決方法 project targets build setting framework ...
iOS開發中捕獲Crash 傳送Bug郵件
view source print?01nsuncaughtexceptionhandler uncaughtexceptionhandler nil 02voiduncaughtexceptionhandler n ception exception 然後在 bool nsdictionary l...