Associates an arbitrary object with the current transaction using the specified key.
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 3.0+
An object to associate with the current transaction.
A unique string identifying the object for later retrieval.
Nested transactions have nested data scope. Setting a value for a key associates it with the current transaction (or innermost nested transaction) only, and reading the value for a key searches through nested transactions (starting from the innermost).