iOS Parsing JSON Using Codable Dynamic Keys and Inheritance Dynamic Coding Keys

Randell Pur
Randell Pur
4,934 Points

Reference to member 'designer' cannot be resolved without a contextual type

I am getting this message on both designer and release.

I am not sure what it means or how to fix this.

Jhoan Arango
Jhoan Arango
Treehouse Moderator 12,197 Points

Hello Randel,

If you don't mind showing some of your code so that we can see where is wrong and to better help it would be great.

1 Answer

Gene Bogdanovich
Gene Bogdanovich
10,214 Points

It means that you used the wrong type to create languageContainer.

It should be:

let languageContainer = try languagesContainer.nestedContainer(keyedBy: LanguageCodingKeys.self, forKey: key)

Happy coding!