Class: PKPass
Overview
The PKPass class represents a single pass.
Instance Attribute Summary (collapse)
-
- authenticationToken
readonly
The token used to authenticate with the web service.
-
- icon
readonly
The pass’s icon.
-
- localizedDescription
readonly
The pass’s localized description.
-
- localizedName
readonly
The localized description of the pass’s kind.
-
- organizationName
readonly
The name of the organization that created the pass.
-
- passTypeIdentifier
readonly
The pass’s type identifier.
-
- passURL
readonly
The URL that opens the pass in the Passbook app.
-
- relevantDate
readonly
The date when the pass is most likely to be needed or useful.
-
- serialNumber
readonly
A value that uniquely identifies the pass.
-
- webServiceURL
readonly
The URL for your web service.
Instance Method Summary (collapse)
-
- initWithData:error:
Initializes and returns an instance of the class.
-
- localizedValueForFieldKey:
Returns the localized value for specified field of the pass.
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Instance Attribute Details
- (String) authenticationToken (readonly)
The token used to authenticate with the web service. An app that uses its own protocol for communicating with your server about passes can use this. The app can include the authentication token in its requests to show that they are coming from a device that has a copy of the pass, and not from an attacker.
- (UIImage) icon (readonly)
The pass’s icon. You can use this to display a pass’s icon as part of a UI element that represents the pass, such as a cell in a table view.
- (String) localizedDescription (readonly)
The pass’s localized description. You can use this property to provide accessibility information a UI element that represents a pass, such as a cell in a table view.
- (String) localizedName (readonly)
The localized description of the pass’s kind. You can use this property to display a pass’s icon as part of a UI element that represents the pass, such as a cell in a table view.
- (String) organizationName (readonly)
The name of the organization that created the pass. You can use this property to display information about a pass as part of a UI element that represents the pass, such as a cell in a table view.
- (String) passTypeIdentifier (readonly)
The pass’s type identifier. For information about getting a pass type identifier, see Passbook Programming Guide.
- (NSURL) passURL (readonly)
The URL that opens the pass in the Passbook app. Open the URL that is returned by passing it as the argument of the openURL: method of UIApplication.
- (NSDate) relevantDate (readonly)
The date when the pass is most likely to be needed or useful. You can use this property for sorting UI elements that represent passes, such as cells in a table view.
- (String) serialNumber (readonly)
A value that uniquely identifies the pass.
- (NSURL) webServiceURL (readonly)
The URL for your web service. The web service is used to update passes. For information on the the web service protocol, see Passbook Web Service Reference.
Instance Method Details
- (Object) initWithData(data, error:error)
Initializes and returns an instance of the class. Errors returned via the error parameter are suitable for presentation to the user. Check the console for more detailed information.
- (Object) localizedValueForFieldKey(key)
Returns the localized value for specified field of the pass. If your app works with passes from arbitrary sources, such as an email client, it can’t use this method because the passes’ keys are not known ahead of time. Use the other properties of this class, such as icon and organizationName, instead.