1、TS设置HTTP请求超时时间,模拟器正常超时回调,iOS真机不执行。
var xhr = cc.loader.getXMLHttpRequest();
xhr.open(“POST”, url, true);
xhr.setRequestHeader(“Content-Type”,“application/x-www-form-urlencoded”);
xhr.timeout = 10000;
xhr.ontimeout = function(event){
callback(false,“获取网络服务超时,请尝试重新请求”);
};
xhr.onreadystatechange = function () {
};
xhr.send(dataStr);
2、每次跑真机,Creator构建以后,必须xcode执行product->clean build folder才能正常运行,否则iOS真机直接黑屏。
第2无非影响效率,但是第1真是影响app逻辑。请问怎么处理???