In simulator we can’t test in below code using device we can try 1234567970 - example phone number let url: NSURL = URL(string: "TEL://1234567970")! as NSURL UIApplication.shared.open(url as URL, options: [:], completionHandler: nil) We can write above code as one function and call that method in viewdidload. (Or) write above code as it is in viewdidload method.
How to take a screenshot on iOS programmatically ?
How to make a phone call in iOS 10 using Swift?
How do i get build/version number of an iOS App?
How to prevent the screen from sleeping in iOS Programmatically?
Get Battery Level and State in iOS - RRutors Guide