Reputation: 1877
I want to store hidden values in the JSON file, which aren't displayed in the passbook, but can be accessed from my app after I loaded my passes like this:
[_pass localizedValueForFieldKey:@"hidden_field_1"]
Upvotes: 2
Views: 395
Reputation: 1877
With the new iOS 7.0 API it is possible with the userInfo key. For more information, read the documentation
Upvotes: 0
Reputation: 7941
Since the pass serial format is arbitrary, you it might work for you to append the (short) data to it.
normal serial serial with data
00001 00001|laskjfrg645sa
00002 00002|a654sf6s54fas64
00002 00003|a6sd5f4a46sdf5
As you are in control of the "id" part, the serial will always remain unique.
Anyway, while it probably works, it's not very kosher.
Upvotes: 1
Reputation: 652
According to my reading of Passbook Programming Guide all fields are displayed. Users are supposed to know what is being stored in the pass so they aren't afraid to accept it. You might consider using the backFields to store a encrypted string with a label that says something like "Verification tracking field".
Upvotes: 0