Platforms to show: All Mac Windows Linux Cross-Platform

Back to AppReceiptMBS class.

AppReceiptMBS.bundleReceipt as AppReceiptMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method StoreKit MBS MacCloud Plugin 14.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the app receipt contained in the bundle, if any and valid.

Extracts the receipt in ASN1 from the PKCS #7 container, and then parses the ASN1 data into a AppReceiptMBS instance. If an Apple Root certificate is available, it will also verify that the signature of the receipt is valid.
Returns the app receipt contained in the bundle, or nil if there is no receipt or if it is invalid.

Some examples using this method:

AppReceiptMBS.receiptForFile(file as folderitem) as AppReceiptMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method StoreKit MBS MacCloud Plugin 14.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the app receipt contained in the given file, if any and valid.
Example
dim a as new AppReceiptVerificatorMBS
dim f as FolderItem = SpecialFolder.Desktop.Child("receipt")
dim r as AppReceiptMBS = AppReceiptMBS.receiptForFile(f)

// testing with receipt from current Dash app
a.bundleIdentifier = "com.kapeli.dash"
a.bundleVersion = "2.1.2"

if a.verifyReceipt(r) then
MsgBox "My receipt is valid"
else
MsgBox "My receipt is invalid."
end if

Extracts the receipt in ASN1 from the PKCS #7 container, and then parses the ASN1 data into a AppReceiptMBS instance. If an Apple Root certificate is available, it will also verify that the signature of the receipt is valid.
Returns the receipt contained in the given file, or nil if there is no receipt or if it is invalid.

Some examples using this method:

AppReceiptMBS.setAppleRootCertificate(Data as Memoryblock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method StoreKit MBS MacCloud Plugin 14.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the certificate data of the Apple Root certificate that will be used to verifiy the signature of the bundle receipt.

If none is provided, the resource AppleIncRootCertificate.cer will be used. If no certificate is available, no signature verification will be performed.
data: The contents of the Apple Root certificate file to use.

See also:

Some examples using this method:

AppReceiptMBS.setAppleRootCertificate(File as FolderItem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method StoreKit MBS MacCloud Plugin 14.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Sets the file of the Apple Root certificate that will be used to verifiy the signature of the bundle receipt.

If none is provided, the resource AppleIncRootCertificate.cer will be used. If no certificate is available, no signature verification will be performed.
file: The folderitem of the Apple Root certificate.

See also:

The items on this page are in the following plugins: MBS MacCloud Plugin.


The biggest plugin in space...