You will just need to update the retrieveProducts method, to handle the data regardless of whether it is encoded using NSCoding or Codable:

Source: Migrating to Codable from NSCoding | Before I forget…