Posted by Stephen McDonald, Developer Applications Engineer, and Nick Alteen, Technical Author, Engineering, Pockets
Every of the cell pockets apps implement their very own technical specification for passes that may be saved to the pockets. Cross construction and configuration varies by each the pockets utility and the particular sort of cross, which means builders must construct and preserve code bases for every platform.
As a part of Developer Relations for Google Pockets, our objective is to make life simpler for individuals who wish to combine passes into their cell or internet purposes. Right this moment, we’re excited to launch the open-source Cross Converter venture. The Cross Converter helps you to take current passes for one pockets utility, convert them, and make them out there in your cell or internet utility for an additional pockets platform.
The Cross Converter launches with assist for Google Pockets and Apple Pockets apps, with plans so as to add assist for others sooner or later. For instance, should you construct an occasion ticket cross for one pockets, you need to use the converter to routinely create a cross for an additional pockets. The next record of cross varieties are supported for his or her respective platforms:
- Occasion tickets
- Generic passes
- Loyalty/Retailer playing cards
- Flight/Boarding passes
- Different transit passes
We designed the Cross Converter with flexibility in thoughts. The next options present further customization to your wants.
- A hints.json file will be offered to the Cross Converter to map Google Pockets cross properties to customized properties in different passes.
- For cross varieties that require certificates signatures, you’ll be able to merely generate the cross construction and hand it off to your current signing course of
- Since pictures in Google Pockets passes are referenced by URLs, the Cross Converter can host the pictures itself, retailer them in Google Cloud Storage, or ship them to a different picture host you handle.
If you wish to shortly check changing completely different passes, the Cross Converter features a demo mode the place you’ll be able to load a easy webpage to check changing passes. Later, you’ll be able to run the device through the command line to transform current passes you handle. If you’re able to automate cross conversion, the device will be run as an online service inside your atmosphere.
The next command offers a demo internet web page on http://localhost:3000 to check changing passes.
The following command converts passes regionally. If the output path is omitted, the Cross Converter will output JSON to the terminal (for PKPass information, this would be the contents of cross.json).