Consent is read for you: on every request the SDK reads the IAB keys your consent platform writes to See TCF & CMP.
UserDefaults. Only when the SDK cannot detect a signal, because your app has no such platform or keeps a signal elsewhere, set it yourself. A value your consent platform wrote still wins.