1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Add plugin and host registration to multiple_flutters example (#942)

This commit is contained in:
Jenn Magder
2021-10-29 09:41:23 -07:00
committed by GitHub
parent eb74d3f380
commit 05a3263eb4
7 changed files with 104 additions and 12 deletions

View File

@@ -3,6 +3,7 @@
// found in the LICENSE file.
import Flutter
import FlutterPluginRegistrant
import Foundation
/// A FlutterViewController intended for the MyApp widget in the Flutter module.
@@ -16,6 +17,7 @@ class SingleFlutterViewController: FlutterViewController, DataModelObserver {
init(withEntrypoint entryPoint: String?) {
let appDelegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
let newEngine = appDelegate.engines.makeEngine(withEntrypoint: entryPoint, libraryURI: nil)
GeneratedPluginRegistrant.register(with: newEngine)
super.init(engine: newEngine, nibName: nil, bundle: nil)
DataModel.shared.addObserver(observer: self)
}

View File

@@ -1,11 +1,11 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
# Copyright 2021 The Flutter team. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
flutter_application_path = '../multiple_flutters_module'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'MultipleFluttersIos' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
install_all_flutter_pods(flutter_application_path)
end

View File

@@ -2,13 +2,17 @@ PODS:
- Flutter (1.0.0)
- FlutterPluginRegistrant (0.0.1):
- Flutter
- url_launcher
- multiple_flutters_module (0.0.1):
- Flutter
- url_launcher (0.0.1):
- Flutter
DEPENDENCIES:
- Flutter (from `../multiple_flutters_module/.ios/Flutter/engine`)
- FlutterPluginRegistrant (from `../multiple_flutters_module/.ios/Flutter/FlutterPluginRegistrant`)
- multiple_flutters_module (from `../multiple_flutters_module/.ios/Flutter`)
- url_launcher (from `../multiple_flutters_module/.ios/.symlinks/plugins/url_launcher/ios`)
EXTERNAL SOURCES:
Flutter:
@@ -17,12 +21,15 @@ EXTERNAL SOURCES:
:path: "../multiple_flutters_module/.ios/Flutter/FlutterPluginRegistrant"
multiple_flutters_module:
:path: "../multiple_flutters_module/.ios/Flutter"
url_launcher:
:path: "../multiple_flutters_module/.ios/.symlinks/plugins/url_launcher/ios"
SPEC CHECKSUMS:
Flutter: bdfa2e8fe0e2880a2c6a58a0b1a8675c262a07af
FlutterPluginRegistrant: 2afd5ea46d3a949472c9b7da6462d8fbf7d8b16e
FlutterPluginRegistrant: d0de10c7c4fc31cc6b676a5965b96100f7c035f7
multiple_flutters_module: fdf461a0e4225614d475110d85db6fd6de5aeff1
url_launcher: b6e016d912f04be9f5bf6e8e82dc599b7ba59649
PODFILE CHECKSUM: d7f39981f450db398859f05de2475ec53909a487
PODFILE CHECKSUM: 91c00dfcff6ea3b8d853bf0c2411672a01ca993c
COCOAPODS: 1.10.1
COCOAPODS: 1.11.2