你好,我的描述不太准确,这里的前端是指安卓客户端
我在MyApplication
中进行了初始化
private void initAVOSCloud() {
// 配置 SDK 储存
AVOSCloud.setServer(AVOSCloud.SERVER_TYPE.API, "http://lcapi.elmliu.cn");
// 配置 SDK 云引擎
AVOSCloud.setServer(AVOSCloud.SERVER_TYPE.ENGINE, "http://lcapi.elmliu.cn");
// 配置 SDK 推送
AVOSCloud.setServer(AVOSCloud.SERVER_TYPE.PUSH, "http://lcapi.elmliu.cn");
// 配置 SDK 即时通讯
AVOSCloud.setServer(AVOSCloud.SERVER_TYPE.RTM, "http://lcapi.elmliu.cn");
AVCloud.setProductionMode(false);
AVOSCloud.initialize(this, appId, appKey);
AVOSCloud.setDebugLogEnabled(true);
AVOSCloud.setNetworkTimeout(20000);
AVIMClient.setUnreadNotificationEnabled(true);
}
然后查看调是日志,请求头里是没有X-LC-Prod: 0
字段的
比如:
D/===AVOS Cloud===: LogUtil$avlog->d->43: curl -X POST -H "X-LC-Id: cvKrEbRV55FItUPuHiGlotiv-gzGzoHsz" -H "X-LC-Key: YourAppKey" -H "Content-Type: application/json" -d '{"time":1568527740604,"isNew":true}' http://lcapi.elmliu.cn/1.1/functions/fetchPostFour
但是在控制台确实会在预备环境栏打印出部署到预备环境的相关代码。但是和hook函数相关的则不会打印,而是会在生产环境栏打印之前的旧代码