aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBMessage.h
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2016-10-31 10:43:46 -0400
committerThomas Van Lenten <thomasvl@google.com>2016-10-31 11:00:39 -0400
commit98c01858f2db05a9eea000b407d63cde7f86d79a (patch)
treebdab3cee7ac913ad2d377201442b28d83b3fec0a /objectivec/GPBMessage.h
parentd58b92ae5169ba888e6b5ca91c0ec9814668fa2c (diff)
downloadprotobuf-98c01858f2db05a9eea000b407d63cde7f86d79a.tar.gz
protobuf-98c01858f2db05a9eea000b407d63cde7f86d79a.tar.bz2
protobuf-98c01858f2db05a9eea000b407d63cde7f86d79a.zip
Add note about extension use and Coding support.
Diffstat (limited to 'objectivec/GPBMessage.h')
-rw-r--r--objectivec/GPBMessage.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/objectivec/GPBMessage.h b/objectivec/GPBMessage.h
index 0cb74f9f..c07ec888 100644
--- a/objectivec/GPBMessage.h
+++ b/objectivec/GPBMessage.h
@@ -65,9 +65,18 @@ CF_EXTERN_C_END
/**
* Base class that each generated message subclasses from.
+ *
+ * @note While the class support NSSecureCoding, if the message has any
+ * extensions, they will end up reloaded in @c unknownFields as there is
+ * no way for the @c NSCoding plumbing to pass through a
+ * @c GPBExtensionRegistry. To support extensions, instead of passing the
+ * calls off to the Message, simple store the result of @c data, and then
+ * when loading, fetch the data and use
+ * @c +parseFromData:extensionRegistry:error: to provide an extension
+ * registry.
**/
@interface GPBMessage : NSObject<NSSecureCoding, NSCopying>
-
+
// If you add an instance method/property to this class that may conflict with
// fields declared in protos, you need to update objective_helpers.cc. The main
// cases are methods that take no arguments, or setFoo:/hasFoo: type methods.