Skip to content

Commit

Permalink
Merge pull request #113 from rodrigoborgesdeoliveira/fix/docs
Browse files Browse the repository at this point in the history
Fix docs API usage
  • Loading branch information
alexanderjordanbaker authored Mar 22, 2024
2 parents 57a9316 + ea8087f commit dfd6590
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ const bundleId = "com.example"
const filePath = "/path/to/key/SubscriptionKey_ABCDEFGHIJ.p8"
const encodedKey = readFile(filePath) // Specific implementation may vary
const environment = Environment.SANDBOX
const appAppleId = undefined // appAppleId is required when the environment is Production

const client = new AppStoreServerAPIClient(encodedKey, keyId, issuerId, bundleId, environment, appAppleId)
const client = new AppStoreServerAPIClient(encodedKey, keyId, issuerId, bundleId, environment)

try {
const response: SendTestNotificationResponse = await client.requestTestNotification()
Expand All @@ -60,7 +59,8 @@ const bundleId = "com.example"
const appleRootCAs: Buffer[] = loadRootCAs() // Specific implementation may vary
const enableOnlineChecks = true
const environment = Environment.SANDBOX
const verifier = new SignedDataVerifier(appleRootCAs, enableOnlineChecks, environment, bundleId)
const appAppleId = undefined // appAppleId is required when the environment is Production
const verifier = new SignedDataVerifier(appleRootCAs, enableOnlineChecks, environment, bundleId, appAppleId)

const notificationPayload = "ey..."
const verifiedNotification = await verifier.verifyAndDecodeNotification(notificationPayload)
Expand Down

0 comments on commit dfd6590

Please sign in to comment.