aydenp / passencoder Goto Github PK
View Code? Open in Web Editor NEWSimple PassKit (Apple Wallet) encoding and signing in Swift.
Home Page: https://aydenp.github.io/PassEncoder/
License: MIT License
Simple PassKit (Apple Wallet) encoding and signing in Swift.
Home Page: https://aydenp.github.io/PassEncoder/
License: MIT License
Hello,
not sure it is an issue, or a limitation :
this package seem to not working properly under Ubuntu.
is it a mistake in my code + configuration ?
or is it a limitation from apple, which request to have a MAC under MACOS to sign the json wallet pass ?
if it is a bug : then, I can send details, configuration, and code.
thanks
The pass documentation from Apple says that localizable resources should be stored in subdirectories, but when one adds a file with a custom name such as, "en.lproj/pass.strings" the operation fails, since the "en.lproj" subdirectory doesn't exist.
On the ReadMe, the requirements are 'iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+'
In fact, this cannot run on anything other than macOS.
The Process object, used to sign the Pass Manifest, can't be used on anything other than macOS, as seen here
It looks like every method here is synchronous, despite many performing tasks that aren't immediate. These methods should be identified and replaced with methods that support both callbacks and Swift concurrency.
Currently the PassEncoder is directly fed files that are directly encoded, and can only be used once.
In the future, it would be desirable to have a model which is created in advance and then passed into an instance of PassEncoder which can perform setup and hold any common settings.
This allows for reusing data to create passes, such as a template with a few files with slightly different information.
In the README, it's stated, "...this package requires macOS 10.12+...SPM does not support setting minimum deployment targets..."
Well, it does now, so let's specify that and make it easier to use this library!
The PassEncoder.encode(signingInfo:)
method uses the static PassSigner
singleton (and not a signer that's passed in). However, the singleton signer is declared as a let
instance, which means that the configuration example in the README:
PassSigner.shared.appleWWDRCertURL = URL(fileURLWithPath: PATH_TO_WWDR_CERT.PEM)
will not compile. Moreover, that singleton is not declared as public
and therefore can't even be accessed by code outside the module.
Since #4 we have two ways to add files by Data (rather than one already on disk):
func addFile(named:,from:)
func addData(named:,from:)
The difference is that the first creates a temporary file on-disk, where the second does it entirely in memory. This is a workaround because the first doesn't support subdirectories (#6).
Ideally, only one of these should exist. Based on the outward appearance of the API, I would vote for the second which doesn't write to disk. This will also be important for #9, where these models may be reused.
There is no reason this needs to be a singleton. Ideally it should be owned by PassEncoder or entirely separate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.