Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Garbage at end.) UserInfo=0x7fe1eb271760 {NSDebugDescription=Garbage at end.}
這個問題就是 服務(wù)端返回的數(shù)據(jù)有問題。
解答如下:
http://stackoverflow.com/questions/27915879/apns-error-domain-nscocoaerrordomain-code-3840
The error message is telling you exactly what's wrong: the response from your server doesn't contain valid JSON. Technically, JSON must start with either an array or an object (dictionary). Whatever your server is returning isn't. You can force the JSON to be consumed regardless by using the NSJSONReadingAllowFragments
option.
意思就是 數(shù)據(jù)庫返回的數(shù)據(jù)應(yīng)該是一個 數(shù)組或者字典,而你的返回應(yīng)該有問題偿枕,可以自己看看 post過來的數(shù)據(jù)选酗,叫服務(wù)端的同事去修改問題级及。