use_modular_headers (#42204)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "AppDelegate.h"
|
||||
#include "GeneratedPluginRegistrant.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "GeneratedPluginRegistrant.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "AppDelegate.h"
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "AppDelegate.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "FlutterPluginRegistrant/GeneratedPluginRegistrant.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
Reference in New Issue
Block a user