Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大神你好,0.15.0里官方没有这个WXResourceRequestHandlerDefaultImpl.m文件啊 #1

Open
songxing10000 opened this issue Aug 25, 2017 · 11 comments

Comments

@songxing10000
Copy link

No description provided.

@xiaohuapunk
Copy link
Contributor

有这个文件

@songxing10000
Copy link
Author

pod 'WeexSDK', '~> 0.15.1'的方式导入项目后,是framework,这个时候WXResourceRequestHandlerDefaultImpl文件是不可见的,还有您的这个是怎么从官网抽出来源码的啊

@songxing10000
Copy link
Author

您的项目Weex不启用https吗,证书这块怎么检验啊

@xiaohuapunk
Copy link
Contributor

1.源码就在 官方git上;
2. 证书 跟 https 没关系吧,每天明白你问的问题;

@songxing10000
Copy link
Author

songxing10000 commented Sep 1, 2017

用https时,会验证证书,所以会在工程里放个服务器给的证书,我们原生用的AFN,可以加载证书判断 ,但是Weex的话,访问https时,如何处理啊,这是我们目前的处理方案,http://www.jianshu.com/p/bcb19fe43909 , 但是依赖了WXResourceRequestHandlerDefaultImpl这个类,而这个类用 pod 'WeexSDK', '~> 0.15.1 的方式导入项目后,是framework,这个时候WXResourceRequestHandlerDefaultImpl文件是不可见的

@xiaohuapunk
Copy link
Contributor

xiaohuapunk commented Sep 1, 2017

哦哦明白你的意思了,你们使用的应该是自签名证书,你可以使用源码继承 weex,就可以了

@songxing10000
Copy link
Author

生产环境上还是使用的正式的证书,你们的项目为处理https的证书问题吗在使用weex时

@xiaohuapunk
Copy link
Contributor

我们没有用到自签名证书,所以不需要在工程里放证书,你可以不使用
WXResourceRequestHandlerDefaultImpl, 自己实现一个加载 js 资源文件的方法,我们的项目实际发布之后,不会从远程服务器端加载 js,我们是将js资源放在了工程里,每次都是从本地加载 js,至于其他请求,是通过自己自定义的Module实现的,可以看一下 WeexEros 这个项目

@songxing10000
Copy link
Author

本地js文件能上线?

@xiaohuapunk
Copy link
Contributor

xiaohuapunk commented Sep 6, 2017

当然,从本地直接加载 js 效果上还会高很多 https://github.com/xiaohuapunk/WeexEros;
我们总结了一套关于 weex 的开发方案,有兴趣你可以看一下 https://karynsong.gitbooks.io/weex-eros/content/ 可以加微信群,一起讨论

@songxing10000
Copy link
Author

我想请问下大神,你这个是怎么从官方仓库里抽取出来的啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants