Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Added support for Apple Wallet orders. Thought I'd open a draft PR to get some feedback before I go any further. I have tested that this works by creating a bare minimum test order, and AirDropping it to my iPhone.
PKOrder
as mentioned, then I went to find the equivalent for orders but was unable to find one. I then saw the mime type wasapplication/vnd.apple.finance.order
so thoughtFinanceOrder
might work? Happy for this to be renamed back toPKOrder
,$json
to string,createSignature
: Used the parent method as I don't think the path has any affect on the signature creation,createManifest
: I did start by replacing this method with one that uses thehash
method like in the FinanceOrder class but realised that the pass also needs anicon.png
file so copied it to the child method,getName
: Updated to use the const's from the class that was instantiated.Happy to revert all the changes I made to make the PKPass class a little bit more flexible and instead override the method in FinanceOrder.
Todo:
Will resolve #136