普通http请求失败,求救!!!

http请求必须是https的吗?普通的http请求,
1.模拟器报了这个信息:Simulator : Response failed, error buffer: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
2.chrome浏览器也报错:XMLHttpRequest cannot load http://xxxxx/service/sync/time. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:7456’ is therefore not allowed access.

官方的demo里确实也是用的https,那难度http就费了么?

请大神指导下,该怎么实现。

Apple iOS 9 的限制,参考这个帖子:

http://forum.cocos.com/t/xmlhttprequest/37571

可是chrome浏览器为啥也不行呢

Chrome 上你是遇到跨域问题了,对方服务器不允许你访问使用它的资源作为贴图

服务器上返回一个 header 信息 ‘Access-Control-Allow-Origin’ = ‘*’ chrome上应该就可以了。

浏览器因为安全原因,一般是禁止跨域访问图片像素级的信息的~~

可我访问的不是图片数据啊,返回的是个json

json也会跨域问题