class LocationManager{ static let shared = LocationManager() //Create the singleton init(){} func requestForLocation(){ //Code Process print("Location granted") } }//Access class function with Singleton Pattern �LocationManager.shared.requestForLocation() //"Location granted"//Still you can use your class like thislet location = LocationManager()location.requestForLocation()