Skip to content

Instantly share code, notes, and snippets.

@RayPS
Created November 21, 2017 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RayPS/b8d17c7fb46baf91fda9aef9673b8b18 to your computer and use it in GitHub Desktop.
Save RayPS/b8d17c7fb46baf91fda9aef9673b8b18 to your computer and use it in GitHub Desktop.
Grant internet access before loading any data. Only for China Apple Devices.
override func viewDidLoad() {
super.viewDidLoad()
if let url = URL(string: "http://captive.apple.com/generate_204") {
URLSession.shared.dataTask(with: url).resume()
}
}
@RayPS
Copy link
Author

RayPS commented Nov 21, 2017

Allow [App] to use wireless data
img_1707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment