iOS simulates various network states

Source: Internet
Author: User

In iOS development we have the need to test the running state of the app in a variety of different network states. Apple provides us with software that simulates various network states in both the simulator and the real-state.

In the simulator

The official website address of the simulated network status provided by Apple
To download the tool you need to sign in to your Apple ID and choose a different version depending on your needs.


Select, click Network Link conditioner.prefpane to run


Options for this tool appear in System Preferences




The network status for the different options.

    • Preset Profiles Preset Network status
Configuration Description
100%loss All lost Packets
3G 3G Network
Dsl Telephone Line internet access
Edge 2G Network
High Latency DNS High Latency
Very Bad Network Network condition is not stable
Wifi WiFi internet
    • Custom Profiles Customize the network status.
Note: The tool is globally valid and works for the entire system if a certain network state is turned on. So when you finish testing the app, close it in time.
Real Machine

Apple has a network debugging tool provisioned in the iOS system, but only if you have added a test device and you use Xcode to connect the device to activate it.

    • Before Xcode is connected

After Xcode connects, find out one more of the settings: developer



Select Status



The options inside are the same as those on the Mac.


Note: The developer option is also valid for the global, and if a certain network state is turned on, it is valid for the entire system. So when you finish testing the app, close it in time.
Other

Network analysis artifact Charles can also be used to simulate network status. For the use of Charles, please visit here personally, Apple's own tools have provided us with powerful features and are easy to use. Wouldn't it be overkill to use Charles? Of course Charles's strength is undeniable, not in this form.

Original link (poke here):> http://www.jianshu.com/p/b12cee51c883

iOS simulates various network states

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.