2

I have been trying to get the receipt but Bundle.main.appStoreReceiptURL is always nil in sandbox even after a SKReceiptRefreshRequest. The same code that works perfectly fine on iOS. I have tested this on watchOS 7 Beta 4, is anyone else having this issue?

let request = SKReceiptRefreshRequest()

func requestDidFinish(_ request: SKRequest) {
    let appStoreReceiptURL = Bundle.main.appStoreReceiptURL //nil
}

func request(_ request: SKRequest, didFailWithError error: Error) {
    print("refresh failed \(error)")
}

func fetchReceipt() {
   reuest.delegate = self
   request.start()
}
aj20010319
  • 104
  • 1
  • 3
  • 13

1 Answers1

0

This is probably a result of the bug mentioned here, where the receipt is stored at the wrong path when using sandbox: https://stackoverflow.com/a/62778077/3862399

Dylan Maryk
  • 1
  • 1
  • 1
  • Seems so but I wasn't able to get it to work even with the workaround. More details here: https://stackoverflow.com/questions/60511143/storekit-implementation-on-apple-watch – aj20010319 Sep 02 '20 at 06:29