Giter VIP home page Giter VIP logo

passencoder's People

Contributors

aydenp avatar sbeitzel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

passencoder's Issues

encoder fail under ubuntu

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

Unable to add localizations/subdirectories

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.

Wrong Requirements

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

Swift async support

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.

Separate pass model from encoder

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.

Update swift tools version

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!

Unable to configure the signer

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.

Unify method for adding files to a pass

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.

Remove PassSigner singleton

There is no reason this needs to be a singleton. Ideally it should be owned by PassEncoder or entirely separate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.