Instead of converting from the console and then including the generated file in your project, you can include the
.proto file in your Xcode project, and let Xcode automatically convert it to swift and use the generated file:
Go to your target Build Rules.
Click the + above to add a custom rule: Sources with names matching:
Use the following script:
protoc --proto_path=$INPUT_FILE_DIR --swift_out=$DERIVED_FILE_DIR $INPUT_FILE_PATH
Add to Output Files using the + below:
Go to Build Phases, to the Compile Sources section, and add your
.protofiles to the list.