Im trying to update a pass in a wallet, I only need the final step:
In Apples docs it says:
"Your server returns the pass data or the HTTP status 304 Not Modified if the pass hasn’t changed. Support the If-Modified-Since caching mechanism on this endpoint."
functions.https.onRequest((request, response) => {
First of all, I dont know how exactly the data should be sent
let file = bucket.file('Event.pkpass');
file.createReadStream()
.on('error', function(err) {
console.log("file get Error", err);
})
.on('response', function(resp) {
// Server connected and responded with the specified status and headers.
console.log("file get response", resp);
})
.on('end', function() {
console.log("File is downloaded");
// The file is fully downloaded.
})
.pipe(response);
My question, what exactly does the device expect? How should this pkpass be send? Im not an Nodejs programmer (iOS programmer), so bear over with me.