PSPass Class Reference
Inherits from | NSObject |
Conforms to | NSCoding |
Declared in | PSPass.h |
Tasks
Creating a Pass
-
+ passWithPassType:serialNumber:
Creates and returns a pass with the given pass type and serial number
Accessing Pass Attributes
-
– serialNumber
Returns the serial number
-
– passTypeIdentifier
Returns the pass type id
-
– values
Returns the placeholder values
-
– images
Returns the images
-
– json
Returns the pass json
-
– data
Returns the raw pass data
-
– pkPass
Returns the PKPass
Class Methods
passWithPassType:serialNumber:
+ (PSPass *)passWithPassType:(NSString *)passTypeIdentifier serialNumber:(NSString *)serialNumber
Return Value
A PSPass with the given pass type and serial number
Discussion
Creates and returns a pass with the given pass type and serial number
The pass with the given pass type id and serial number must already exist on the server. If you want to create a pass use [PassSlot passFromTemplate:withValues:pass:]
Declared In
PSPass.h
Instance Methods
data
Returns the raw pass data
- (NSData *)data
Return Value
NSData containing the raw pass data
Discussion
Returns the raw pass data
If you create a pass using passWithPassType:serialNumber: you first have to retrieve the data from the server using [PassSlot downloadPass:pass:] otherwise this method will return nil
Declared In
PSPass.h
images
Returns the images
- (NSArray *)images
Return Value
An NSArray of PSImage of the pass or nil if they were not yet retrieved from the server
Discussion
Returns the images
If you create a pass using passWithPassType:serialNumber: you first have to retrieve the images from the server using [PassSlot imagesForPass:pass:] otherwise this method will return nil
Declared In
PSPass.h
json
Returns the pass json
- (NSDictionary *)json
Discussion
Returns the pass json
You first have to retrieve the full json from the server using [PassSlot jsonForPass:pass:] otherwise this method will only return a dictionary with serialNumber and passTypeIdentifier
Declared In
PSPass.h
passTypeIdentifier
Returns the pass type id
- (NSString *)passTypeIdentifier
Discussion
Returns the pass type id
Declared In
PSPass.h
pkPass
Returns the PKPass
- (PKPass *)pkPass
Return Value
PKPass
Discussion
Returns the PKPass
If you create a pass using passWithPassType:serialNumber: you first have to retrieve the data from the server using [PassSlot downloadPass:pass:] otherwise this method will return nil
Declared In
PSPass.h
serialNumber
Returns the serial number
- (NSString *)serialNumber
Return Value
The serial number of the pass
Discussion
Returns the serial number
Declared In
PSPass.h
values
Returns the placeholder values
- (NSDictionary *)values
Return Value
The place holder values which are used to describe the pass or nil if they were not yet retrieved from the server
Discussion
Returns the placeholder values
If you create a pass using passWithPassType:serialNumber: you first have to retrieve the values from the server using [PassSlot valuesForPass:pass:] otherwise this method will return nil
Declared In
PSPass.h