Signature Generator!
SKPaymentDiscount
during a purchase of In App subscription via StoreKit.APP BUNDLE IDENTIFIER
KEY IDENTIFIER
PRODUCT IDENTIFIER
OFFER IDENTIFIER
USERNAME -OR- ACCOUNT TOKEN
Note:
Make sure to set the same before adding to payment queue otherwise use will receive SKErrorDomain error 12
let payment = SKMutablePayment(product: product)
payment.applicationUsername = "xyz"
NONCE
TIMESTAMP
P8 KEY
This tool is utilising the logic from the sample project provided by Apple Here. For purchasing promotional offers developer needs some additional paramters to pass in for SKPayment before adding it in the payment queue. For example:
let discount = SKPaymentDiscount(identifier: offerIdentifier,
keyIdentifier: keyIDentifier,
nonce: UUID(uuidString: nonce),
signature: signature,
timestamp: NSNumber(value: timeStamp))
payment.paymentDiscount = discount
SKPaymentQueue.default().add(payment)
NB: This tool works within a browser locally and does not sync keys. You can always revoke your keys from App Store Connect.Server side is required to get the additional parameters mainly because adding your private key inside your app's bundle isn't a good idea.
Want to get in touch? Feel free to contact me at