Here is a minimalist patch to address https://github.com/devartis/passbook/issues/30. It does 2 things:
1) Starts setting the 'barcodes' field that has been added as of ios9
2) Adds the CODE128 type as a valid BarcodeFormat. Note that if you set the barcode format to CODE128 this code sets the legacy field to the default PDF417
I also added a couple of simple unit tests. Could use some more of those.
Possible Enhancements which would be slightly more invasive:
a) Would be easy to allow the user to over-ride the legacy default if someone needs that.
b) The apple wallet api supports a list of barcodes, but this code always creates a list of 1
Here is a minimalist patch to address https://github.com/devartis/passbook/issues/30. It does 2 things: 1) Starts setting the 'barcodes' field that has been added as of ios9 2) Adds the CODE128 type as a valid BarcodeFormat. Note that if you set the barcode format to CODE128 this code sets the legacy field to the default PDF417
I also added a couple of simple unit tests. Could use some more of those.
Possible Enhancements which would be slightly more invasive: a) Would be easy to allow the user to over-ride the legacy default if someone needs that. b) The apple wallet api supports a list of barcodes, but this code always creates a list of 1