Simplify imports of the WKTs within the library itself. Overdue followup to https://github.com/protocolbuffers/protobuf/pull/7173 Since all the files are at the same level as the runtime headers, there is no need for things to be framework based imports, they should all just work like the other headers do. - Directly generate the bundled header imports into the preamble section when generating for a bundled proto. - Update the preamble generation to skip the CPP wrapper when generating for a bundled proto file. - Regenerate the WKTs. - Update GPBProtocolBuffer.h/GPBWellKnownTypes.h to also skip the CPP wrapping. GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS in the podspec and non bundled files still has to exist because that comes into play for those files to find the runtime headers.
diff --git a/objectivec/GPBProtocolBuffers.h b/objectivec/GPBProtocolBuffers.h index c5df916..619c082 100644 --- a/objectivec/GPBProtocolBuffers.h +++ b/objectivec/GPBProtocolBuffers.h
@@ -44,33 +44,14 @@ #import "GPBWellKnownTypes.h" #import "GPBWireFormat.h" -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - // Well-known proto types -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import <Protobuf/GPBAny.pbobjc.h> - #import <Protobuf/GPBApi.pbobjc.h> - #import <Protobuf/GPBDuration.pbobjc.h> - #import <Protobuf/GPBEmpty.pbobjc.h> - #import <Protobuf/GPBFieldMask.pbobjc.h> - #import <Protobuf/GPBSourceContext.pbobjc.h> - #import <Protobuf/GPBStruct.pbobjc.h> - #import <Protobuf/GPBTimestamp.pbobjc.h> - #import <Protobuf/GPBType.pbobjc.h> - #import <Protobuf/GPBWrappers.pbobjc.h> -#else - #import "GPBAny.pbobjc.h" - #import "GPBApi.pbobjc.h" - #import "GPBDuration.pbobjc.h" - #import "GPBEmpty.pbobjc.h" - #import "GPBFieldMask.pbobjc.h" - #import "GPBSourceContext.pbobjc.h" - #import "GPBStruct.pbobjc.h" - #import "GPBTimestamp.pbobjc.h" - #import "GPBType.pbobjc.h" - #import "GPBWrappers.pbobjc.h" -#endif +#import "GPBAny.pbobjc.h" +#import "GPBApi.pbobjc.h" +#import "GPBDuration.pbobjc.h" +#import "GPBEmpty.pbobjc.h" +#import "GPBFieldMask.pbobjc.h" +#import "GPBSourceContext.pbobjc.h" +#import "GPBStruct.pbobjc.h" +#import "GPBTimestamp.pbobjc.h" +#import "GPBType.pbobjc.h" +#import "GPBWrappers.pbobjc.h"