你好,iOS app 在保存 Installation 前需要设置其 deviceToken,请在相关代码位置前后观察 SDK 打印的日志。
开启 SDK 调试日志的方法是:
AVOSCloud.setAllLogsEnabled(true) // Swift
[AVOSCloud setAllLogsEnabled:YES]; // Objective-C
你将会观察到类似如下的请求日志(其中包含 installations 这个 path):
------ BEGIN LeanCloud REST Request -------
path: /1.1/batch/save
curl: curl -i -k -X POST -d '{"requests":[{"path":"\/1.1\/installations","method":"POST","body":{"timeZone":"Asia\/Shanghai","deviceType":"ios","__internalId":"tD0bkXONTnJyEBZNapTjDsD","badge":0,"deviceToken":"1111111111111111111111111111111"}}]}' --compressed -H 'Accept: application/json' -H 'Content-Type: application/json; charset=utf-8' -H 'X-LC-Prod: 1' -H 'User-Agent: AVOS Cloud iOS-v11.4.7 SDK' -H 'Accept-Language: en;q=1' -H 'Accept-Encoding: gzip' -H 'X-LC-Id: S5vDI3IeCk1NLLiM1aFg3262-gzGzoHsz' "https://s5vdi3ie.api.lncld.net/1.1/batch/save"
------ END --------------------------------
找到后请粘贴到该帖子中。