kodeco.com Forums

In-App Purchases Tutorial: Getting Started

Learn the basics of in-app purchase in iOS to unlock local content, store purchase status, restore transactions, and more!


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1681-in-app-purchases-tutorial-getting-started

Hi
the tutorial is crashing at a table reload which is not happening on the main thread. It also shows this as a warning. I have shared screenshots of the problem. Please correct the documents, thank you.

I think you can fix this problem by dispatching back to the main queue. You need to “double weakify” self.

DispatchQueue.main.async { [weak self] in
   guard let self = self else { return }
   self.product = product
   self.tableView.reloadData()
}