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 {

View File

@@ -1,5 +1,5 @@
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate

View File

@@ -33,6 +33,8 @@ def parse_KV_file(file, separator='=')
end
target 'Runner' do
use_modular_headers!
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')

View File

@@ -34,6 +34,7 @@ end
target 'Runner' do
use_frameworks!
use_modular_headers!
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.

View File

@@ -44,6 +44,7 @@ end
target 'Runner' do
use_frameworks!
use_modular_headers!
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.

View File

@@ -1,4 +1,4 @@
#include "AppDelegate.h"
#import "AppDelegate.h"
@implementation AppDelegate

View File

@@ -6,6 +6,8 @@ load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
use_frameworks!
target 'Runner' do
use_modular_headers!
install_flutter_engine_pod
install_flutter_plugin_pods flutter_application_path
end

View File

@@ -1,4 +1,4 @@
#include "AppDelegate.h"
#import "AppDelegate.h"
#import "FlutterPluginRegistrant/GeneratedPluginRegistrant.h"
@implementation AppDelegate