Offline
public class Offline: NSObject
Class to manage offline hits stored
-
Send all hits stored
Declaration
Swift
public func dispatch() -
Get all offline hits stored in database
Declaration
Swift
public func get() -> [Hit]Return Value
collection of offline hits
-
Get the number of offline hits stored in database
Declaration
Swift
public func count() -> IntReturn Value
number of offline hits
-
Delete all offline hits stored in database
Declaration
Swift
public func delete() -> IntReturn Value
number of deleted hits (-1 if an error occured)
-
Delete offline hits older than the number of days passed in parameter
Declaration
Swift
public func delete(_ olderThan: Int) -> IntParameters
olderThanNumber of days of offline hits to keep in database
Return Value
number of deleted hits (-1 if an error occured)
-
Delete offline hits older than the date passed in parameter
Declaration
Swift
public func delete(_ olderThan: Date) -> IntParameters
olderThanDate from which the hits will be deleted
Return Value
number of deleted hits (-1 if an error occured)
-
Get the first hit stored in database
Declaration
Swift
public func oldest() -> Hit?Return Value
the oldest hit
-
Get the latest hit stored in database
Declaration
Swift
public func latest() -> Hit?Return Value
the latest hit
Offline Class Reference