热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

通过网络测试离线模式下的调试-TestingDebugginginOfflineModeviaNetwork

Imdevelopingahybridcordovaappthatshouldworkofflineaswell.Itjustcachesthedatafetche

I'm developing a hybrid cordova app that should work offline as well. It just caches the data fetched from the network and re-uses the cached version if offline.

我正在开发一款应该离线工作的混合Cordova应用程序。它只缓存从网络获取的数据,并在离线时重新使用缓存版本。

Since it's a cordova app, the dev files are on my machine and the url embedded in the app is pointed to my machine, so turning on airplane mode will stop the app to even pull the source code files to start with.

由于它是一个cordova应用程序,开发文件在我的机器上,嵌入在应用程序中的URL指向我的机器,因此打开飞行模式将停止应用程序甚至拉动源代码文件开始。

I'm trying to find out what's the approach to develop and test the offline behavior as you code.

我正在尝试找出在编码时开发和测试脱机行为的方法。

2 个解决方案

#1


2  

Install Additional Tools for XCode 8.2 . This is a network link conditioner. You can simulate many number of network conditions for your device with this.

安装XCode 8.2的附加工具。这是一个网络链路调节器。您可以使用此模拟设备的许多网络条件。

More about Network Link Conditioner

有关Network Link Conditioner的更多信息

List of all additional tools is here which includes Additional tool for all versions of xcode.

此处列出了所有其他工具,其中包括适用于所有xcode版本的附加工具。

#2


0  

Turn off your wifi connection and proceed(or LAN connection) while testing.

在测试时关闭wifi连接并继续(或LAN连接)。


推荐阅读
author-avatar
红色的甜言1986
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有