On this page
No Headings
Last updated: June 3, 2026
WLW's iOS SDK provides a set of utility methods, properties, and classes to aid in the development and certification of a mobile wallet app for the WLW platform.
For steps on setting up your development environment, see iOS Mobile SDK 101: Setup Your Development Environment.
If the issuer supports Location-Based Services (LBS) to find near-by merchants, target offers, etc., using the GPS location of the device, use the following utilities to initialize and configure LBS for your app.
Determine whether an instance of the location manager has been created.
-(BOOL)isLBSStarted;
Create a shared instance of the location manager at the time of SDK instantiation.
-(void)initLBS;
Determine whether LBS is currently turned ON for the SDK instance. Returns TRUE if
the service is already enabled or FALSE if LBS is disabled.
-(BOOL)isLBSEnabled;
Toggle LBS operation by passing YES or NO in the isEnabled parameter. Default is YES.
-(void)enableLBS:(BOOL)isEnabled;
Temporarily suspend or continue location collection as needed, such as when the app is in the background, without completely disabling the service.
-(void)startLBS;
-(void)stopLBS;
iOS supports LBS configuration settings of Always and WhenInUse(location data is collected only when the app is running in the foreground on the device). WLW's SDK automatically configures the WhenInUse setting in order to avoid the automatic iOS authorization message displayed to users when an app is configured for Always, giving the user the option to turn location services off entirely.
Add the NSLocationWhenInUserUsageDescription key to the app's information property list (info.plist) file to ensure that the setting is honored.
<key>NSLocationWhenInUseUsageDescription</key>
<string>Populate the StoreFinder feature to display participating locations near the user's current location.</string>Retrieve the geographic coordinates of the device for use in location-dependent services in the app or appending location data to event log messages.
-(NSString *)getDeviceLocationLongitude;
-(NSString *)getDeviceLocationLatitude;
Note: These calls return 0 when LBS is not initialized. Check LBS Instance before invoking.
Map error messages displayed to the wallet user to their originating errors to facilitate troubleshooting and application support services.
| Element | Description |
|---|---|
| Method | -(void)setUserErrorMessage:(NSString *)anErrorMessage forErrorDomain:(NSString *)domainKey errorCode:(NSString *)anErrorCodeanErrorMessage - The text of the message that is displayed to the end user when the error occurs. Once set, the message is defined in the PDUserErrorMessageCollection dictionary within the PDPaydiantContext object.domainKey - The domain key that identifies the specific SDK module and call during which the error occurred.anErrorCode - WLW's error code that triggers the specified message when returned by the corresponding domain module. |
The following sample shows a call to set the user message for a failed login in which the PIN entered was not correct.
[self.messageCollection setUserErrorMessage:@"The PIN entered is not correct. Please try again." forErrorDomain:kUserErrorLoginWithPinDomain errorCode:@"401"]The SDK records relevant events that are transmitted through the mobile gateway (see SDK Logged Events.
Configure the app to log the following events that occur locally in the app and are not handled by the SDK to aid in reporting and troubleshooting support.
| Event | Send to Server Immediately | Message Syntax |
|---|---|---|
accounts_refresh_success | FALSE | result:accounts_refresh_success |
accounts_refresh_fail | FALSE | result:accounts_refresh_fail|userMsg:<>|errCode:###|errDesc:<> |
receipts_refresh_success | FALSE | result:receipts_refresh_success |
receipts_refresh_fail | FALSE | result:receipts_refresh_fail|userMsg:<>|errCode:###|errDesc:<> |
username_save_success | FALSE | result:username_save_success |
username_save_fail | FALSE | result:username_save_fail|userMsg:<>|errCode:###|errDesc:<> |
saved_username_retrieve_success | FALSE | result:saved_username_retrieve_success |
saved_username_retrieve_fail | FALSE | result:saved_username_retrieve_fail|userMsg:<>|errCode:###|errDesc:<> |
single_account_refresh_success | FALSE | result:single_account_refresh_success |
single_account_refresh_fail | FALSE | result:single_account_refresh_fail|userMsg:<>|errCode:###|errDesc:<> |
single_available_offer_refresh_success | FALSE | result:single_available_offer_refresh_success |
single_available_offer_refresh_fail | FALSE | result:single_available_offer_refresh_fail|userMsg:<>|errCode:###|errDesc:<> |
single_my_offer_refresh_success | FALSE | result:single_my_offer_refresh_success |
single_my_offer_refresh_fail | FALSE | result:single_my_offer_refresh_fail|userMsg:<>|errCode:###|errDesc:<> |
single_available_offer_retrieve_success | FALSE | result:single_available_offer_retrieve_success |
single_available_offer_retrieve_fail | FALSE | result:single_available_offer_retrieve_fail|userMsg:<>|errCode:###|errDesc:<> |
single_my_offer_retrieve_success | FALSE | result:single_my_offer_retrieve_success |
single_my_offer_retrieve_fail | FALSE | result:single_my_offer_retrieve_fail|userMsg:<>|errCode:###|errDesc:<> |
| Element | Description |
|---|
|+ (PDLogMessage*) message:(NSString *)what when:(NSString *)when val:(NSString *)val;
what - The text message that is written to the log, using the Message Syntax convention.
when - The time at which the event fired.
val - The sequential number of the message in relation to the maximum allowed messages.
If location logging is enabled for the issuer (by default it is not), set how often the geo-location of the device should be appended to log messages.
| Element | Description |
|---|---|
| Setting | -(void)setLocationService:(nonatomic,assign) PDLocationLoggingService locationService;kPDLoggingAllLocationUpdates - Include the geo-location in every logged event. Use this setting if your app requires fine-tuning of location event delivery.kPDLoggingSignificantUpdates - (DEFAULT) Include the geo-location only to identify the initial location and then again only if the location changes by a significant distance. |
In the SDK Instance Configuration utility, configure whether and how many logged messages are maintained in memory when they cannot be transmitted to the server immediately.
| Element | Description |
|---|---|
| Setting | -(void)setStoreLogsInMemory:(BOOL)storeOrNot;-(void)numberOfLogsInMemory:(NSInteger)numberOfLogs; |
Tip: This setting directly affects memory usage. WLW recommends a limit of 10.
Configure the maximum number of messages a log can contain, how messages are overwritten, and when messages are sent to WLW.
{
NSMutableArray *msgs;
unsigned int nextMsg;
}
LoggingUtilMaxMessages 100- (void)addMessage:(PDLogMessage *)msg networkCoordinator:(PDNetworkCoordinator *)networkCoordinator;
- (void)replaceMessage:(PDLogMessage *)msg networkCoordinator: (PDNetworkCoordinator *)networkCoordinator;
-(void)reset;
- (NSMutableDictionary *)getMessagesAsDict;
- (NSString *)getDeviceModel;
- (void)sendLogToServer:(PDNetworkCoordinator *)networkCoordinator;
Important: If the method fails, the log is maintained in memory until the transmission succeeds, but if the maximum number of messages is reached, messages will be overwritten in the order they were originally recorded, whether they have been successfully transmitted or not.
Periodically check a device's connectivity and ability to reach the WLW through the mobile gateway host.
-(id)initWithHostName:(NSString *)hostName;
-(BOOL) isHostReachable;
-(BOOL) isHostReachableViaWIFI;
-(NSString *) nameOfWifi;
-(BOOL) isHostReachableViaWWAN;
-(NSString *) nameOfWWAN;
-(BOOL) startNotifier;
-(BOOL) stopNotifier;
Receive notification when the network status, heartbeat, or reachability changes.
-(void) networkCoordinator:(PDNetworkCoordinator *)pdNetworkCoordinator networkStatusChanged:(PDNetworkStatus)networkStatus;
Automatically check connectivity whenever the app has been sent to the background and then returns.
-(void) reset;
Track start and end times of the wallet user's activity in the app for the following event keys.
| Event Key | Description |
|---|---|
AUTH_LOGIN_STARTAUTH_LOGIN_END | Timestamps for starting and completing a login request. |
AUTH_GET_FINPRINT_STARTAUTH_GET_FINPRINT_END | Timestamps for starting and completing the fingerprint generation. |
AUTH_GEN_APPID_STARTAUTH_GEN_APPID_END | Timestamps for starting and completing the application identification process. |
AUTH_LOGIN_WITH_MFA | The time at which the MFA device registration was requested. |
AUTH_LOGIN_END | The time at which the registration and login process completed. |
+(void)logCollectedTimeWithId:(NSDate *)eventTime ids:(NSString *)identifier;
+(void)logCollectedTimeWithIdMachTime:(uint64_t) eventTime ids:(NSString *)identifier;
+(NSMutableDictionary *)retrieveCollectedStatistics;
+(BOOL) isStatisticCollected: (NSString *)identifier;
+(void) clearAllStatistics;