WLSimpleDataSharingSwift
public class WLSimpleDataSharingSwift
Contains Simple Data Sharing methods to share tokens across a group of applications.
-
Saves a key,value pair to a shared credential storage available to a group of applications in the same family.
Declaration
Swift
public static func setSharedToken(name: String, value: String) -> Bool
Parameters
name
The key or name of token to save to the shared credential storage.
value
The value of the token to save to the shared credential storage
Return Value
Boolean indicating whether the token was successfully stored.
-
Retrieves the value of a token in the shared credential storage.
Declaration
Swift
public static func getSharedToken(name: String) -> String
Parameters
name
The name of the token to retrive from shared credential storage.
Return Value
A string representing the value of the token found in shared credential storage or nil if not found.
-
Removes the token from shared credential storage.
Declaration
Swift
public static func clearSharedToken(name: String) -> Bool
Parameters
name
The name of the token to remove from shared credential storage.
Return Value
Boolean indicating whether the token was found and successfully removed.