AddPassesViewController Object
The AddPassesViewController object provides a view to add passes to the user’s library of passes.
Here is an example for creating a AddPassesViewController with callbacks:
var AddPassesViewController1 = new com.voltmx.AddPassesViewController(an, statusCallback);
Input Parameters
Parameter | Description |
---|---|
an [Array] - Optional | > Note: Respects only first pass in the array if the iOS is below 7.0. |
statusCallback [Function] - Optional | callback to get the status of adding passes view controller. status [String] - status of the AddPassesViewController. |
Return Values
Object - com.voltmx.AddPassesViewController
Methods
The com.voltmx.AddPassesViewController class has the following methods:
dismissAnimated
This API is used to dismiss the view of add passes view controller.
Syntax
Input Parameters
Parameter | Description |
---|---|
animated | Set True to dismiss with animation. |
Example
Return Values
Returns the authentication token of the Pass.
Platform Availability
Available only on iOS
getLocalizedDescription
The localized description of the pass’s kind. You can use this property to provide accessibility information for a UI element that represents a pass, such as a cell in a table view.
Syntax
Input Parameters
None
Example
Return Values
Returns a string containing the localized description of Pass.
Platform Availability
Available only on iOS
getLocalizedName
You can use this property to provide accessibility information for a UI element that represents a pass, such as a cell in a table view.
Syntax
Input Parameters
None
Example
Return Values
Returns a string containing the localized description of Pass.
Platform Availability
Available only on iOS
getLocalizedValueForKeyForDeviceLocale
Returns the localized value for specified field of the pass.
Syntax
Input Parameters
Parameter | Description |
---|---|
key | A string that holds the field’s key, as specified in the pass. |
Example
Return Values
Returns a string that contains the localized value for the pass’s field.
Platform Availability
Available only on iOS
getOrganizationName
The name of the organization that created the pass.
Syntax
Input Parameters
None
Example
Return Values
Organization name of Pass.
Platform Availability
Available only on iOS.
getPassTypeIdentifier
The pass’s type identifier.
Syntax
Example
Return Values
Returns a string that contains the pass’s type identifier.
Platform Availability
Available only on iOS
getPassURL
The URL that opens the pass in the Passbook app.
Syntax
Input Parameters
None
Example
Return Values
Returns the absolute string of passURL
Platform Availability
Available only on iOS
getSerialNumber
A value that uniquely identifies the pass.
Syntax
Input Parameters
None
Example
Return Values
Returns a string that holds the serial number of the Pass.
Platform Availability
Available only on iOS
getUserInfo
Developer-specific custom data.
Syntax
Input Parameters
None.
Example
Return Values
Returns the userInfo dictionary of a Pass.
Platform Availability
Available only on iOS7 and above.