Bundle.main.appStoreReceiptURL returns nil in watchOS 7 Beta 4

Viewed 427

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()
}
1 Answers
Related