Skip to content

Commit

Permalink
changelog, warning about client side usem docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ueman committed Sep 18, 2024
1 parent 642f1c0 commit ed84eea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
5 changes: 5 additions & 0 deletions passkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.0.7

- The library is now able to create fully signed `pkpass` files that actually work with Apple Wallet.
Follow the guide [here](https://github.com/ueman/passkit/blob/master/passkit/SIGNING.md) to learn more.

## 0.0.6

- Add ability to create PkPass signature via OpenSSL or other command line tools
Expand Down
16 changes: 7 additions & 9 deletions passkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,18 @@ void main() {

> [!WARNING]
> This is experimental.
> The resulting file not yet get accepted by Apple Wallet due to missing support for writing the pass signature.
>
> If you know how to create the PkPass signature it in pure Dart code, please add an example
> [here](https://github.com/ueman/passkit/issues/74) or create
> a PR for [this](https://github.com/ueman/passkit/issues/74) issue.
> Follow the guide [here](https://github.com/ueman/passkit/blob/master/passkit/SIGNING.md) to learn more.
```dart
import 'package:passkit/passkit.dart';
void main() {
final pkPass = PkPass(...);
final pkPassFile = pass.write();
await File('path/to/pass.pkpass').writeAsBytes(pkPassFile);
final pass = PkPass(...);
final binaryData pass.write(
certificatePem: File('pass_certificate.pem').readAsStringSync(),
privateKeyPem: File('private_key.pem').readAsStringSync(),
);
File('pass.pkpass').writeAsBytesSync(binaryData);
}
```

Expand Down Expand Up @@ -136,7 +135,6 @@ Please feel encouraged to create PRs for the following features.
- PassKit Web Service: This functionality is existing, but might not work. Please file an issue or create a PR with a fix for bugs you encounter.
- Push Notification update registration is only working on iOS due to this whole specification being an Apple thingy.
- Localization: Existing, but still inconvenient to use. There might be issues due to localizations being UTF-16 formatted, but the library currently uses UTF-8 to read localizations.
- [Passkit creation](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/PassKit_PG/Creating.html#//apple_ref/doc/uid/TP40012195-CH4-SW54) is partially supported. See note further above.

## Bugs and parsing issues

Expand Down
8 changes: 6 additions & 2 deletions passkit/SIGNING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Signing a PkPass file

> [!WARNING]
> THIS SHOULD NOT BE USED WITHIN AN APP.
> IT SHOULD ONLY BE USED SERVER SIDE, OTHERWISE YOU RISK EXPOSING YOUR CERTIFICATE AND PRIVATE KEY.
This guide assumes you're working on a macOS system.

## Step 1: Get a Pass ID and Pass Certificate from the Apple Developer Portal
Expand Down Expand Up @@ -31,8 +35,8 @@ Then you can the generated file to sign PkPass files:
```dart
final pass = PkPass(...);
final binaryData pass.write(
certificatePem: File('test/pem/pass_certificate.pem').readAsStringSync(),
privateKeyPem: File('test/pem/private_key.pem').readAsStringSync(),
certificatePem: File('pass_certificate.pem').readAsStringSync(),
privateKeyPem: File('private_key.pem').readAsStringSync(),
);
File('pass.pkpass').writeAsBytesSync(binaryData); // The file ending is important
```

0 comments on commit ed84eea

Please sign in to comment.