I'm trying to implement receipt validation to check for the presence of an add-on, primarily by following the steps desribed in this article. In order to obtain a receipt for testing I'm closing the app with exit(173) but when I try to log in in the subsequent dialog with my Apple ID I recieve the error message "An unexpected error occured while signing in. The Apple ID you entered couldn't be found or your password was incorrect. Please try again." This happens not only for my Apple ID but also for another developer account associated with the app. Currently the app is set up in iTunes Connect as well as the IAP product, but so far have not been submitted for certification and shown as "Prepare for Submission".
It would be great to get some advice on how I have do proceed to obtain a receipt that I can use for further development and testing.
I am unfamiliar with Mac OS, but in iOS these types of problems occur because the signature of the app itself is still directing you to the production environment not the sandbox environment. This happens because, although a production version of the app was overwritten by the Xcode sandboxed version of the app, the signature pointing to the production environment was not overwritten. In iOS you need to delete the old version of the app and log out of the App Store before reloading the app from Xcode and logging back into the App Store only when asked by StoreKit.