Unverified Commit 649cf820 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

use_modular_headers (#42204)

parent 13a054f7
#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')
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@interface Pair : NSObject
@property(atomic, readonly, strong, nullable) NSObject* left;
......
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "AppDelegate.h"
#import "AppDelegate.h"
@interface AppDelegate ()
@property (atomic) uint64_t textureId;
......
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
......@@ -5,6 +5,7 @@ flutter_application_path = 'flutterapp/'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'ios_add2app' do
use_modular_headers!
install_all_flutter_pods(flutter_application_path)
end
......
#import "ViewController.h"
#import <Flutter/Flutter.h>
#import <FlutterPluginRegistrant/GeneratedPluginRegistrant.h>
@import Flutter;
@import FlutterPluginRegistrant;
// Prove plugins can be module-imported from the host app.
@import device_info;
@import google_maps_flutter;
@implementation ViewController
......
......@@ -4,5 +4,6 @@ flutter_application_path = '../hello'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'Host' do
use_modular_headers!
install_all_flutter_pods flutter_application_path
end
import UIKit
// Prove plugins can be module-imported from the host app.
import device_info
import google_maps_flutter
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
......
......@@ -4,5 +4,6 @@ flutter_application_path = '../hello'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'Host' do
use_modular_headers!
install_all_flutter_pods flutter_application_path
end
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#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')
......
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
......@@ -27,6 +27,8 @@ def parse_KV_file(file,separator='=')
end
target 'Runner' do
use_modular_headers!
# Flutter Pods
pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
......
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
......@@ -7,6 +7,7 @@ install! 'cocoapods', :disable_input_output_paths => true
target 'Runner' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
use_modular_headers!
# Pods for Runner
pod 'MaterialControls', '~> 1.2.2'
......
#include "AppDelegate.h"
#import "AppDelegate.h"
#import <Flutter/Flutter.h>
@implementation AppDelegate
......
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
......@@ -7,8 +7,11 @@
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface GeneratedPluginRegistrant : NSObject
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
@end
NS_ASSUME_NONNULL_END
#endif /* GeneratedPluginRegistrant_h */
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
......@@ -27,6 +27,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')
......
......@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#include "PlatformViewController.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
#import "PlatformViewController.h"
@implementation AppDelegate {
FlutterResult _flutterResult;
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
......@@ -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}}
#if __has_include(<{{name}}/{{class}}.h>)
#import <{{name}}/{{class}}.h>
{{/plugins}}
#else
@import {{name}};
#endif
{{/plugins}}
@implementation GeneratedPluginRegistrant
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
......
#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.
......
#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
......
#include "AppDelegate.h"
#import "AppDelegate.h"
#import "FlutterPluginRegistrant/GeneratedPluginRegistrant.h"
@implementation AppDelegate
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment