Why is the Apple documentation on the web more complete than what I have in Xcode

Here is an example.


In the Xcode Doc when describing what error can be thrown by the JsonDecoder it says

"If the data is not valid JSON, this method throws the dataCorrupted error. If a value within the JSON fails to decode, this method throws the corresponding error."


But on the Web it shows

"If the data is not valid JSON, this method throws the DecodingError.dataCorrupted(_:) error. If a value within the JSON fails to decode, this method throws the corresponding error."


Giving the error enum as well.


Thanks

Accepted Reply

This thread has been deleted

Which is more correct may depend on timing - when they're scheduled to be updated as a routine vs. when you check, vs. change list queue pressure, pending releases, make work, etc.


I would expect the docs shipped with the tools to naturally receive sl. less less attention than the web version. I'd use shipped for general info, and the web for distinct methods, etc.


Perhaps use both for a while until you get an idea of the value of each according to your style, and can spot trends, then anchor a workflow that maximizes ROI specific to your needs.


And while I spend a lot of time in the web versions, I don't bother with it's search engine. I hit google instead.


Good luck.

Replies

One source is canned and one is fluid. Doesn't mean either is correct.

Actually, both versions of that documentation get it slightly wrong. The error is DecodingError.dataCorrupted, an enum case. The first version (which is from Xcode 9.4 documentation) omits the type name. The second version (which is from current documentation on the developer web site) formats the case name as if it was a function name, because there is an associated value.


Could you please file a bug report against the documentation (using the Report Bugs link at the bottom of the page) and post the bug number here for reference?

Thanks, I am not really that concerned about this one mistake but my question was about the documentation general.


I'll take a look at filing a bug report this coming week.