Inherits from NSObject
Conforms to NSCoding
Declared in PSPass.h

Overview

This class represents a Pass

Tasks

Creating a Pass

Accessing Pass Attributes

Class Methods

passWithPassType:serialNumber:

Creates and returns a pass with the given pass type and serial number

+ (PSPass *)passWithPassType:(NSString *)passTypeIdentifier serialNumber:(NSString *)serialNumber

Parameters

passTypeIdentifier

An existing Pass Type ID

serialNumber

An existing pass serial number

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

Return Value

The pass json used to describe the pass

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

Return Value

The pass type id of the pass

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