# Technique for adding Codable to Published failing in iOS14

**URL:** <https://forums.swift.org/t/technique-for-adding-codable-to-published-failing-in-ios14/41269>\
**Category:** Using Swift\
**Created:** [October 17, 2020, 10:41pm UTC](https://forums.swift.org/t/technique-for-adding-codable-to-published-failing-in-ios14/41269 "2020-10-17T22:41:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jrose](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jrose/32/408_2.png) [@jrose](https://forums.swift.org/u/jrose)\
**Post date:** [October 17, 2020, 11:15pm UTC](https://forums.swift.org/t/technique-for-adding-codable-to-published-failing-in-ios14/41269/2 "2020-10-17T23:15:07Z")

</div>

Your code assumes that Published has a member named `value` that's exposed in its mirror, but Published could have renamed the `value` property, or removed it altogether and used some other mechanism, or started conforming to CustomReflectable. What I'm wondering is why you aren't just using `wrappedValue` (EDIT: directly, not through the mirror), which you know exists because it's a property wrapper…but even given that, it's not clear that this code is a good idea. See [Why you can't make someone else's class Decodable: a long-winded explanation of 'required' initializers](https://forums.swift.org/t/why-you-cant-make-someone-elses-class-decodable-a-long-winded-explanation-of-required-initializers/6437/). (Sorry for the lack of formatting; that explanation predates our use of Discourse!)

---

_[View the full topic](https://forums.swift.org/t/technique-for-adding-codable-to-published-failing-in-ios14/41269)._
