aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/README.md
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2016-06-17 10:31:05 -0400
committerGravatar GitHub <noreply@github.com>2016-06-17 10:31:05 -0400
commit8c20e55c57c90a1a84ac7cf4de96e65911c8212b (patch)
tree0682f0331cefbe005f0d4e215e487d3179494516 /objectivec/README.md
parent98bd6d753a2b15774c56ecd49763ceb2820d7075 (diff)
Add new generation option for using proto sources from other frameworks.
- Better docs in the generator for the different options that can be passed during an invoke of protoc. - Add named_framework_to_proto_path_mappings_path to pass the path to a file containing mappings of frameworks for different proto files. - Update the generation to use the mapping to change the #import directives it creates. Note: the changes in helpers is mostly moving code within the fine, and then a small change to expose the parsing so a passed on class can consume the line. Fixes https://github.com/google/protobuf/issues/1457
Diffstat (limited to 'objectivec/README.md')
-rw-r--r--objectivec/README.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/objectivec/README.md b/objectivec/README.md
index beda2cb6..25355e05 100644
--- a/objectivec/README.md
+++ b/objectivec/README.md
@@ -146,6 +146,29 @@ supported keys are:
of being plain `#import "some/path/file.pbobjc.h"` lines, they will be
framework based, i.e. - `#import <VALUE/file.pbobjc.h>`.
+ _NOTE:_ If this is used with `named_framework_to_proto_path_mappings_path`,
+ then this is effectively the _default_ to use for everything that wasn't
+ mapped by the other.
+
+ * `named_framework_to_proto_path_mappings_path`: The `value` used for this key
+ is a path to a file containing the listing of framework names and proto
+ files. The generator uses this to decide if another proto file referenced
+ should use a framework style import vs. a user level import
+ (`#import <FRAMEWORK/file.pbobjc.h>` vs `#import "dir/file.pbobjc.h"`).
+
+ The format of the file is:
+ * An entry is a line of `frameworkName: file.proto, dir/file2.proto`.
+ * Comments start with `#`.
+ * A comment can go on a line after an entry.
+ (i.e. - `frameworkName: file.proto # comment`)
+
+ Any number of files can be listed for a framework, just separate them with
+ commas.
+
+ There can be multiple lines listing the same frameworkName incase it has a
+ lot of proto files included in it; and having multiple lines makes things
+ easier to read.
+
Contributing
------------