今天在调用AVInstallation,发现AVInstallation将邮件地址保存到channels一直报错,我们打算用邮件地址作为唯一ID的,下面是报错的日志,
----- BEGIN LeanCloud REST Request ------
path: /1.1/batch/save
curl: curl -i -k -X POST -d '{"requests":[{"method":"POST","path":"\/1.1\/installations","body":{"timeZone":"Asia\/Shanghai","deviceToken":"4af11834bfd295433439d303c4dfab90d346313fe453cba74be6e65be2024ccc","deviceType":"ios","channels":["XXXXX@XXXXXXX"],"objectId":"Ot94ni3KSfmPjRD9mDJklbigRCoedz82","badge":0,"__internalId":"Ot94ni3KSfmPjRD9mDJklbigRCoedz82"}}]}' --compressed -H 'X-LC-Prod: 1' -H 'Accept: application/json' -H 'X-LC-Id: JKysgcH3lgFKWL1RJL6joTh4' -H 'User-Agent: AVOS Cloud iOS-v3.1.4 SDK' -H 'Content-Type: application/json; charset=utf-8' -H 'X-LC-Sign: e74779b4a22a902bbb4a403bc46d811c,1445592211369' "https://api.leancloud.cn/1.1/batch/save"
------ END --------------------------------
2015-10-23 17:23:31.467 SecondHandIOS[552:82192] [DEBUG] _54-[AVPaasClient goRequest:saveResult:block:retryTimes:]block_invoke424
------ BEGIN LeanCloud REST Response ------
path: /1.1/batch/save
cost: 0.097s
response: Error Domain=AVNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 400" UserInfo=0x15fc89f0 {NSLocalizedRecoverySuggestion={"code":1,"error":"verify-channels will throw an exception."}, NSErrorFailingURLKey=https://api.leancloud.cn/1.1/batch/save, NSLocalizedDescription=Expected status code in (200-299), got 400, AVNetworkingOperationFailingURLRequestErrorKey= { URL: https://api.leancloud.cn/1.1/batch/save }, AVNetworkingOperationFailingURLResponseErrorKey= { URL: https://api.leancloud.cn/1.1/batch/save } { status code: 400, headers {
"Cache-Control" = "no-cache,no-store";
"Content-Length" = 61;
"Content-Type" = "application/json;charset=utf-8";
Date = "Fri, 23 Oct 2015 09:23:31 GMT";
Pragma = "no-cache";
Server = Tengine;
} }}
------ END --------------------------------
2015-10-23 17:23:31.475 SecondHandIOS[552:82114] [DEBUG] _45-[AVIMClient registerPushChannelInBackground]block_invoke Register push channel failed. May affect to recevie offline message push. Detailed error: Error Domain=AVOS Cloud Error Domain Code=1 "verify-channels will throw an exception." UserInfo=0x15feb4c0 {NSLocalizedDescription=verify-channels will throw an exception., code=1, error=verify-channels will throw an exception.}