Thellimist
Thellimist

Reputation: 4007

How to simulate bad internet connection on simulator with code

I have downloaded Network Link Conditioner but is there a way I can test this with code? Preferably swift

Upvotes: 1

Views: 1098

Answers (1)

Christian
Christian

Reputation: 22343

I don't think so. Because you get the internet connection from the device itself. You can't say in your swift-code:

Hey I'd like to drop every second data-package to simulate a package-lost rate.

The cause of that is, that you can't change the internet-connection from within your app-sandbox. That's why you need to use an app like NLC to simulate the connection.

Upvotes: 1

Related Questions