Wow I don't even remember posting this question. I should've responded once I found the solution, my apologies. I no longer have the code and rewrote the entire app in swift last year.
You are most likely correct that the data for the products was not being retained. My explanation isn't clear as this could be an issue with the app store data. It is possible that only the first 2 products were received in the response therefore no data could have ever been used for that button action.
Post
Replies
Boosts
Views
Activity
Please ignore my "halves" I just selected folders. This is for an Image Classifier if I didn't mention it before.
I tried the 1st half and it was able to complete the entire process.
Training Data 48 classes 1277 images, Testing Data 48 classes 399 images
I tried the 2nd half and it did not work. Failed with same error. Could be an issue with the images.
Training Data 62 classes 1601 images, Testing Data 62 classes 515 images
Sifted through all the files and found a few corrupted image files. Deleted these and now it works.
An iOS playground appears to perform better than a MacOS one. It still takes too long to run in my opinion but at least iOS seems to work.
Edit: I'm on Xcode 12.2
I continued on with the tutorial and in the next section the graphic looks as expected without any code changes. It is strange that previously it had the graphical issue in Preview, Simulator and Device.
I mentioned why I changed those lines of code, it was to reduce the size of the shape drawn to see if it was bug in Xcode. After continuing on with the bug I figured it is a bug in Xcode.