iPhone Simulator - Simulate a slow connection?

前端 未结 6 444
离开以前
离开以前 2021-01-29 18:26

Is there a way to slow down the internet connection to the iPhone Simulator, so as to mimic how the App might react when you are in a slow spot on the cellular network?

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-29 18:53

    "There's an app for that!" ;) Apple provides "Network Link Conditioner" preference pane that does the job quite well.

    • for Xcode versions prior to 4.3, the pane installer can be found in your Developer folder, e.g. "/Developer/Applications/Utilities/Network Link Conditioner", after installation, if daemon fails to start and you don't want to reboot your machine, just use sudo launchctl load /system/library/launchdaemons/com.apple.networklinkconditioner.plist
    • if you are already done with Developer folder, you can install the pane as a part of "Hardware IO Tools for Xcode" package available via Mac Dev Center additional downloads section.

    Link to download page (you must log in with your Apple ID): https://developer.apple.com/downloads/index.action
    (credits to @nverinaud)

提交回复
热议问题