Comments (7)
将server 的端口配置方法
- (BOOL)start{
if (!_server.isRunning) {
[self.server startWithOptions:@{
GCDWebServerOption_Port: @6800,
GCDWebServerOption_BindToLocalhost: @YES,GCDWebServerOption_AutomaticallySuspendInBackground: @YES
} error:NULL];
}
return _server.isRunning;
}
改为
- (BOOL)start{
if (!_server.isRunning) {
[self.server startWithPort:6800 bonjourName:nil];
}
return _server.isRunning;
}
测试是可以正确设置端口修复Bug.
from webbrowser.
@CXTretar 你好,这个bug是必现的么?请提供iOS
版本、设备等,我定位一下。
from webbrowser.
@zhongwuzw 应该是必现的,因为我自己的项目中使用同样的方式start,也出现问题,我重新下载master测试确定一下,测试用的模拟器iPhone 6 iOS 11.2. 真机 iPhone 5s iOS 10.2 。
from webbrowser.
@CXTretar ,我这边没法复现,根据你提供的URL
,端口号显示为0,也就是_options
赋值的时候6800没赋值上,你这边能在这打个断点调试一下么?
// GCDWebServer.m
- (BOOL)_start:(NSError**)error {
GWS_DCHECK(_source4 == NULL);
NSUInteger port = [_GetOption(_options, GCDWebServerOption_Port, @0) unsignedIntegerValue];
from webbrowser.
@zhongwuzw 重新下载新的项目运行是没有问题的,但是早上我测试了很多遍一直有这个问题,这个会跟网络环境有关系?
from webbrowser.
from webbrowser.
无法重现了,应该是模拟器出的异常。
from webbrowser.
Related Issues (20)
- 想请教作者一个问题,类似于UC浏览器的夜间模式是怎么实现的? HOT 5
- 你好 有问题想请教 HOT 1
- 关于浏览器前进后退网页刷新的问题 HOT 5
- 关于访问网页带有iframe内嵌网页的网址时修改CSS样式 HOT 4
- 项目无法运行 HOT 6
- 某些界面视频播放不了 HOT 11
- 编译不了 HOT 2
- 工程编译不通过 HOT 1
- QQ一键登录失败 HOT 3
- 作者你好,请教一个技术问题 HOT 8
- 作者你好,多窗口的那个close按钮,很难点中 HOT 1
- 作者你好,随便找一个可以播放视频的网站,打开以后,返回桌面,会出现崩溃 HOT 3
- 作者,你好,你找一个H5游戏,进入后台,会报gpus_ReturnNotPermittedKillClient。原因是UIWebView进入后台,不允许使用OpenGL。请看下面的链接 HOT 4
- 做得很棒喔 HOT 3
- 你这个浏览器的内核不是Webview啊,还有你这个历史记录里面的数据哪里来的
- 浏览器有没有无痕模式的功能? HOT 1
- 怎么push进来就加载某个网页 HOT 1
- 现在苹果商店不支持UIWEBVIEW了,有木有解决办法?
- UIWebView
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webbrowser.