I'm retrieving the receipt on my users device using the following code:
let receiptUrl = NSBundle.mainBundle().appStoreReceiptURL
I then check to see what the value of receiptURL is by using:
print("receiptUrl is \(receiptUrl)")
My console displays the location as:
receiptUrl is Optional(file:///private/var/mobile/Containers/Data/Application/018CF51F-1F55-465B-AA98-B4AD5A864E06/StoreKit/sandboxReceipt)
I then use an if statement:
if NSFileManager.defaultManager().fileExistsAtPath(receiptUrl!.path!)
{ //do great security stuff
}
However, my fileExistsAtPath always returns as false. Very frustrating.