Skip to content
 
 

Latest commit

 

History

81 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

passkit4j - (managed by the OTRL dev team)


This project has been forked due to inactivity from the original author. The On Track Retail dev team will be maintaining and updating this library going forward.

Creating a new version

This is a manual process for now, but should be automated in the future.

  1. Change the version in the pom.xml file.
  2. Install mvn if you havent already brew install mvn
  3. In your macbook you'll need to create a file ~/.m2/settings.xml with the following content:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
  <servers>
    <server>
      <id>jfrog-releases</id>
      <username>publish</username>
      <password>[password in 1password]</password>
    </server>
    <server>
      <id>jfrog-snapshots</id>
      <username>publish</username>
      <password>[password in 1password]</password>
    </server>
  </servers>
</settings>
  1. Check and test the project run mvn clean test install
  2. Publish the artifact mvn clean deploy

Apple Passbook library for Java

  • Fluent API
  • Stream-oriented

Usage

Create a Pass Type ID in the iOS Provisioning Portal (if you haven't done so already), import the resulting pass.cer file into Keychain, then export it as a .p12 file. Download the Apple WWDR certificate.

In the code, create a PassSignerImpl object with these certificates:

PassSigner signer = PassSignerImpl.builder()
	.keystore(new FileInputStream("/path/to/certificate.p12"), "password")
	.intermediateCertificate(new FileInputStream("/path/to/AppleWWDRCA.cer"))
	.build();

Pass pass = new Pass()
	.passTypeIdentifier("pass.com.bouldercoffeeco.storeCard")
	.serialNumber("1a2b3c")
	.teamIdentifier("cafed00d");
	// ... for a full example see src/test/com/ryantenney/passkit4j/StoreCardExample.java

PassSerializer.writePkPassArchive(pass, signer, outputStream);

Maven

Current stable version is 2.0.1, which supports iOS 9 passes.

<dependency>
	<groupId>com.ryantenney.passkit4j</groupId>
	<artifactId>passkit4j</artifactId>
	<version>2.0.1</version>
</dependency>

Documentation

Javadocs are hosted at http://ryantenney.github.io/passkit4j/docs/


License

Copyright (c) 2012-2016 Ryan Tenney

Published under Apache Software License 2.0, see LICENSE

Rochester Made

About

Java library for generating Apple Passbook (.pkpass) files

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages