stepio / jpasskit Goto Github PK
View Code? Open in Web Editor NEWThis project forked from drallgood/jpasskit
jPasskit is an Java™ implementation of the Apple™ PassKit Web Service.
License: Apache License 2.0
This project forked from drallgood/jpasskit
jPasskit is an Java™ implementation of the Apple™ PassKit Web Service.
License: Apache License 2.0
Now there is only one constructor available - with ObjectMapper. But actually you cannot pass existing immutable instance, as additional configurations are applied in constructor:
jsonObjectMapper.setSerializationInclusion(Include.NON_NULL);
jsonObjectMapper.addMixIn(Object.class, ValidateFilterMixIn.class);
jsonObjectMapper.addMixIn(PKPass.class, PkPassFilterMixIn.class);
jsonObjectMapper.addMixIn(PKBarcode.class, BarcodeFilterMixIn.class);
jsonObjectMapper.addMixIn(Charset.class, CharsetFilterMixIn.class);
So if you'd like to use the existing object mapper (as API owner suggests), it's state is altered, which is not very good.
According to the Passbook documentation:
https://developer.apple.com/library/ios/documentation/UserExperience/Reference/PassKit_Bundle/Chapters/TopLevel.html#//apple_ref/doc/uid/TP40012026-CH2-SW2
Key name | Type | Description |
---|---|---|
suppressStripShine | Boolean | Optional. If true, the strip image is displayed without a shine effect. The default value prior to iOS 7.0 is false. In iOS 7.0, a shine effect is never applied, and this key is deprecated. |
As key is deprecated, uprated setter to enable partial cleansing for this deprecated parameter.
Passes model should be made serializable
I was also working on the iOS7 support, merged my work with mainline.
Source:
https://developer.apple.com/library/ios/documentation/UserExperience/Reference/PassKit_Bundle
Eclipse project (internal) files should not be included into repository: different versions of eclipse update them differently. That's why ".classpath" file (for example) is always modified in my repository, which complicates commits.
jpasskit.server depends on the old version of jpasskit (0.0.2-SNAPSHOT), which is not available
Update PKPass class, add getPassThatWasSet function:
public PKGenericPass getPassThatWasSet() {
return passThatWasSet;
}
This is required to simplify implementation of type-independent processing methods for passes.
Fix various issues:
New feature from PassWallet Developer Guide v0.7
As of v1.31 of PassWallet, support for linking a pass to an Android app was added.
In order to link the pass, add the following section to the pass.json as a top level field:
"associatedApps" : [
{
"title":"PassWallet - Passbook + NFC",
"idGooglePlay":"com.attidomobile.passwallet",
"idAmazon":"com.attidomobile.passwallet"
}
]
One or more apps can be associated with the pass.
Update function convertStringToColor to support reading Color from six-digit (hex triplet) and three-digit (shorthand) hexadecimal forms.
Provides better flexibility for importing of passes.
Windows file separators are not supported by Passbook, should be replaced by UNIX separators.
According to the Passbook documentation:
https://developer.apple.com/library/ios/documentation/UserExperience/Reference/PassKit_Bundle/Chapters/TopLevel.html#//apple_ref/doc/uid/TP40012026-CH2-SW2
Key name | Type | Description |
---|---|---|
voided | Boolean | Optional. Indicates that the pass is void—for example, a one time use coupon that has been redeemed. The default value is false. Available in iOS 7.0. |
But if "false" value is set from Java code (as it's done now), than this key is always included (with "false" by default). So it becomes mandatory instead of optional, what is incorrect and useless.
List of "auxiliaryFields" is somehow missing in the validation method.
Make the already deprecated methods really deprecated - useless & backward compatible.
Also inspired by issue:
drallgood#66
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.