use_modular_headers (#42204)

This commit is contained in:
Jenn Magder
2019-10-15 12:36:50 -07:00
committed by GitHub
parent 13a054f76e
commit 649cf82018
39 changed files with 98 additions and 44 deletions

View File

@@ -454,10 +454,13 @@ const String _objcPluginRegistryHeaderTemplate = '''//
#import <{{framework}}/{{framework}}.h>
NS_ASSUME_NONNULL_BEGIN
@interface GeneratedPluginRegistrant : NSObject
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
@end
NS_ASSUME_NONNULL_END
#endif /* GeneratedPluginRegistrant_h */
''';
@@ -466,10 +469,15 @@ const String _objcPluginRegistryImplementationTemplate = '''//
//
#import "GeneratedPluginRegistrant.h"
{{#plugins}}
#import <{{name}}/{{class}}.h>
{{/plugins}}
{{#plugins}}
#if __has_include(<{{name}}/{{class}}.h>)
#import <{{name}}/{{class}}.h>
#else
@import {{name}};
#endif
{{/plugins}}
@implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {