<!--
{
  "availability" : [
    "iOS: 7.0.0 - 18.0.0",
    "iPadOS: 7.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.7.0 - 15.0.0",
    "tvOS: 9.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 2.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Bundle/appStoreReceiptURL",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSBundle(py)appStoreReceiptURL"
  },
  "title" : "appStoreReceiptURL"
}
-->

# appStoreReceiptURL

The file URL for the bundle’s App Store receipt.

```
var appStoreReceiptURL: URL? { get }
```

## Discussion

> Note:
> The receipt isn’t necessary if you use <doc://com.apple.documentation/documentation/StoreKit/AppTransaction> to validate the app download, or <doc://com.apple.documentation/documentation/StoreKit/Transaction> to validate in-app purchases. Only use the receipt if your app uses the <doc://com.apple.documentation/documentation/StoreKit/original-api-for-in-app-purchase>, or needs the receipt to validate the app download because it can’t use <doc://com.apple.documentation/documentation/StoreKit/AppTransaction>.

Use this app bundle property to locate the app receipt if it’s present; this property is `nil` if the receipt isn’t present. In the rare case a receipt is invalid or missing in an app that a user downloads from the App Store, use <doc://com.apple.documentation/documentation/StoreKit/SKReceiptRefreshRequest> to request a new receipt. For information about validating receipts, see <doc://com.apple.documentation/documentation/StoreKit/choosing-a-receipt-validation-technique>.

You can’t use the general best practice of weak linking using the <doc://com.apple.documentation/documentation/ObjectiveC/NSObjectProtocol/responds(to:)> method here; the method’s implementation uses the <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/doesNotRecognizeSelector(_:)> method.

### Get the receipt in testing environments

Receipts aren’t initially present in iOS and iPadOS apps in the sandbox environment and in Xcode. Apps get a receipt after the tester completes the first in-app purchase. When your app checks [`appStoreReceiptURL`](/documentation/Foundation/Bundle/appStoreReceiptURL) and finds that it’s `nil`, assume the tester is a new customer and has no access to premium content. For Mac apps running in TestFlight, the receipt is always present.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)