Comments (7)
If you extract the generated pkpass file (it's just a signed zip file) are all the files from the template folder present? are the files named and placed as per the Apple documentation?. This library doesn't actually check that the files in the folder are correctly named.
from passkit.
@alvinbaena Don't see the option to unzip the file. Is it possible to unzip without installing 3rd party software?
from passkit.
Sure, you'd have to do it via the terminal with the unzip
command. You can check how the command works with a quick search.
from passkit.
Here is the result of unzipping the .pkpass archive:
from passkit.
That is indeed weird. Does the same behaviour happen if you try to open the pass on a real device?
from passkit.
Same result
from passkit.
Sorry for the late response, I've been a bit busy.
Please try following the new example provided by a community member, and see if the error changes or goes away:
c := passkit.NewBoardingPass(passkit.TransitTypeAir)
// Utility functions for adding fields to a pass
c.AddHeaderField(passkit.Field{
Key: "your_head_key",
Label: "your_displayable_head_label",
Value:"value",
})
c.AddPrimaryFields(passkit.Field{
Key: "your_prim_key",
Label: "your_displayable_prim_label",
Value:"value",
})
c.AddSecondaryFields(passkit.Field{
Key: "your_sec_key",
Label: "your_displayable_sec_label",
Value:"value",
})
c.AddAuxiliaryFields(passkit.Field{
Key: "your_aux_key",
Label: "your_displayable_aux_label",
Value:"value",
})
c.AddBackFields(passkit.Field{
Key: "your_back_key",
Label: "your_displayable_back_label",
Value:"value",
})
pass := passkit.Pass{
FormatVersion: 1,
TeamIdentifier: "TEAMID",
PassTypeIdentifier: "pass.type.id",
AuthenticationToken: "123141lkjdasj12314",
OrganizationName: "Your Organization",
SerialNumber: "1234",
Description: "test",
BoardingPass: c,
Barcodes: []passkit.Barcode{
{
Format: passkit.BarcodeFormatPDF417,
Message: "1312312312312312312312312312",
MessageEncoding: "utf-8",
},
},
}
from passkit.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passkit.