public class MobiledgeXLocation
MobiledgeX Location Services for easy location service integration with application
Swift MobiledgeX SDK namespace Used for "namespacing" purposes to prevent naming conflicts from common names (Util, NetworkInterface, etc.)
Types of Location ServiceTypes, reflects built-in methods that iOS uses to get location Visits: Only updates location when user spends time at location and then moves (the most power-efficient) SignificantChange : Updates location when user's location significantly changes Standard: For real time location updates (requires most power)
public static func startLocationServices(serviceType: ServiceType = ServiceType.SignificantChange) -> Promise<Bool>
Begin monitoring location services. Default serviceType is SignificantChange
public static func stopLocationServices()
public static func checkLocationPermissions() -> Bool
Checks to see what Location Permissions user has accepted (called before Location Services is started) Will only return true (ie. that location services can start) if user has authorized location services always or when in app use Otherwise the user has not accepted valid location permissions and we cannot start location services
public static func getLastLocation() -> MobiledgeXiOSLibrary.MatchingEngine.Loc?
Returns the last location in the form of a MobiledgeXiOSLibrary.MatchingEngine.Loc object
public static func getLastISOCountryCode() -> String?
Returns the ISO country code of the last location