Turn on add-to-app iOS platform unit tests (#61007)

This commit is contained in:
Jenn Magder 2020-07-09 15:52:49 -07:00 committed by GitHub
parent 2a3d3c86db
commit 1e510ff636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
64 changed files with 662 additions and 1610 deletions

View File

@ -272,8 +272,6 @@ task:
- name: hostonly_devicelab_tests-3_last-linux
<< : *LINUX_SHARD_TEMPLATE
# TODO(ianh): name: add_to_app_tests-linux
- name: docs-linux # linux-only
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'packages/flutter/**', 'packages/flutter_test/**', 'packages/flutter_drive/**', 'packages/flutter_localizations/**', 'packages/flutter_goldens/**', 'bin/**') || $CIRRUS_PR == ''"
environment:
@ -508,8 +506,6 @@ task:
CPU: 4
MEMORY: 6G
# TODO(ianh): name: add_to_app_tests-windows
- name: customer_testing-windows
environment:
# As of December 2019, the customer_testing-windows shard got faster with more CPUs up to 4
@ -624,13 +620,6 @@ task:
- name: hostonly_devicelab_tests-3_last-macos
<< : *MACOS_SHARD_TEMPLATE
- name: add_to_app_tests-macos
only_if: "changesInclude('.cirrus.yml', 'dev/**', 'bin/**') || $CIRRUS_PR == ''" # https://github.com/flutter/flutter/issues/41940
skip: true # https://github.com/flutter/flutter/pull/42444
script:
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
- dart --enable-asserts dev/bots/test.dart
- name: customer_testing-macos
script:
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976

View File

@ -121,7 +121,6 @@ Future<void> main(List<String> args) async {
await _runSmokeTests();
print('' * 80);
await selectShard(const <String, ShardRunner>{
'add_to_app_tests': _runAddToAppTests,
'add_to_app_life_cycle_tests': _runAddToAppLifeCycleTests,
'build_tests': _runBuildTests,
'firebase_test_lab_tests': _runFirebaseTestLabTests,
@ -525,17 +524,6 @@ Future<void> _flutterBuildDart2js(String relativePathToApplication, String targe
);
}
Future<void> _runAddToAppTests() async {
if (Platform.isMacOS) {
print('${green}Running add-to-app iOS integration tests$reset...');
final String addToAppDir = path.join(flutterRoot, 'dev', 'integration_tests', 'ios_add2app');
await runCommand('./build_and_test.sh',
<String>[],
workingDirectory: addToAppDir,
);
}
}
Future<void> _runAddToAppLifeCycleTests() async {
if (Platform.isMacOS) {
print('${green}Running add-to-app life cycle iOS integration tests$reset...');

View File

@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:io';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/framework/ios.dart';
import 'package:flutter_devicelab/framework/utils.dart';
import 'package:path/path.dart' as path;
@ -30,6 +31,18 @@ Future<void> main() async {
);
});
// Copy test dart files to new module app.
final Directory flutterModuleLibSource = Directory(path.join(flutterDirectory.path, 'dev', 'integration_tests', 'ios_host_app', 'flutterapp', 'lib'));
final Directory flutterModuleLibDestination = Directory(path.join(projectDir.path, 'lib'));
// These test files don't have a .dart prefix so the analyzer will ignore them. They aren't in a
// package and don't work on their own outside of the test module just created.
final File main = File(path.join(flutterModuleLibSource.path, 'main'));
main.copySync(path.join(flutterModuleLibDestination.path, 'main.dart'));
final File marquee = File(path.join(flutterModuleLibSource.path, 'marquee'));
marquee.copySync(path.join(flutterModuleLibDestination.path, 'marquee.dart'));
section('Build ephemeral host app in release mode without CocoaPods');
await inDirectory(projectDir, () async {
@ -181,42 +194,6 @@ Future<void> main() async {
return TaskResult.failure('Building ephemeral host app Podfile.lock does not contain expected pods');
}
section('Clean build');
await inDirectory(projectDir, () async {
await flutter('clean');
});
section('Make iOS host app editable');
await inDirectory(projectDir, () async {
await flutter(
'make-host-app-editable',
options: <String>['ios'],
);
});
section('Build editable host app');
await inDirectory(projectDir, () async {
await flutter(
'build',
options: <String>['ios', '--no-codesign'],
);
});
final bool editableHostAppBuilt = exists(Directory(path.join(
projectDir.path,
'build',
'ios',
'iphoneos',
'Runner.app',
)));
if (!editableHostAppBuilt) {
return TaskResult.failure('Failed to build editable host .app');
}
section('Add to existing iOS Objective-C app');
final Directory objectiveCHostApp = Directory(path.join(tempDir.path, 'hello_host_app'));
@ -277,10 +254,34 @@ Future<void> main() async {
);
}
section('Run platform unit tests');
await testWithNewiOSSimulator('TestAdd2AppSim', (String deviceId) =>
inDirectory(objectiveCHostApp, () =>
exec(
'xcodebuild',
<String>[
'-workspace',
'Host.xcworkspace',
'-scheme',
'Host',
'-configuration',
'Debug',
'-destination',
'id=$deviceId',
'test',
'CODE_SIGNING_ALLOWED=NO',
'CODE_SIGNING_REQUIRED=NO',
'CODE_SIGN_IDENTITY=-',
'EXPANDED_CODE_SIGN_IDENTITY=-',
'COMPILER_INDEX_STORE_ENABLE=NO',
],
)
)
);
section('Fail building existing Objective-C iOS app if flutter script fails');
int xcodebuildExitCode = 0;
await inDirectory(objectiveCHostApp, () async {
xcodebuildExitCode = await exec(
final int xcodebuildExitCode = await inDirectory<int>(objectiveCHostApp, () =>
exec(
'xcodebuild',
<String>[
'-workspace',
@ -298,8 +299,8 @@ Future<void> main() async {
'COMPILER_INDEX_STORE_ENABLE=NO',
],
canFail: true,
);
});
)
);
if (xcodebuildExitCode != 65) { // 65 returned on PhaseScriptExecution failure.
return TaskResult.failure('Host Objective-C app build succeeded though flutter script failed');

View File

@ -7,6 +7,8 @@ import 'dart:convert';
import 'utils.dart';
typedef SimulatorFunction = Future<void> Function(String deviceId);
void _checkExitCode(int code) {
if (code != 0) {
throw Exception(
@ -99,3 +101,85 @@ Future<bool> containsBitcode(String pathToBinary) async {
});
return !emptyBitcodeMarkerFound;
}
/// Creates and boots a new simulator, passes the new simulator's identifier to
/// `testFunction`, then shuts down and deletes simulator.
Future<void> testWithNewiOSSimulator(
String deviceName,
SimulatorFunction testFunction, {
String deviceTypeId = 'com.apple.CoreSimulator.SimDeviceType.iPhone-11',
}) async {
// Xcode 11.4 simctl create makes the runtime argument optional, and defaults to latest.
// TODO(jmagman): Remove runtime parsing when devicelab upgrades to Xcode 11.4 https://github.com/flutter/flutter/issues/54889
final String availableRuntimes = await eval(
'xcrun',
<String>[
'simctl',
'list',
'runtimes',
],
workingDirectory: flutterDirectory.path,
);
String iOSSimRuntime;
final RegExp iOSRuntimePattern = RegExp(r'iOS .*\) - (.*)');
for (final String runtime in LineSplitter.split(availableRuntimes)) {
// These seem to be in order, so allow matching multiple lines so it grabs
// the last (hopefully latest) one.
final RegExpMatch iOSRuntimeMatch = iOSRuntimePattern.firstMatch(runtime);
if (iOSRuntimeMatch != null) {
iOSSimRuntime = iOSRuntimeMatch.group(1).trim();
continue;
}
}
if (iOSSimRuntime == null) {
throw 'No iOS simulator runtime found. Available runtimes:\n$availableRuntimes';
}
final String deviceId = await eval(
'xcrun',
<String>[
'simctl',
'create',
deviceName,
deviceTypeId,
iOSSimRuntime,
],
workingDirectory: flutterDirectory.path,
);
await eval(
'xcrun',
<String>[
'simctl',
'boot',
deviceId,
],
workingDirectory: flutterDirectory.path,
);
await testFunction(deviceId);
if (deviceId != null && deviceId != '') {
await eval(
'xcrun',
<String>[
'simctl',
'shutdown',
deviceId
],
canFail: true,
workingDirectory: flutterDirectory.path,
);
await eval(
'xcrun',
<String>[
'simctl',
'delete',
deviceId],
canFail: true,
workingDirectory: flutterDirectory.path,
);
}
}

View File

@ -1,69 +0,0 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
.DS_Store
## Build generated
build/
DerivedData/
Pods/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
iOSInjectionProject/

View File

@ -1,15 +0,0 @@
platform :ios, '12.0'
flutter_application_path = 'flutterapp/'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'ios_add2app' do
install_all_flutter_pods(flutter_application_path)
end
target 'ios_add2appTests' do
inherit! :search_paths
install_flutter_engine_pod
pod 'EarlGrey'
end

View File

@ -1,28 +0,0 @@
# iOS Add2App Test
This application demonstrates some basic functionality for Add2App,
along with a native iOS ViewController as a baseline and to demonstrate
interaction.
The following functionality is currently implemented:
1. A regular iOS view controller (UIViewController), similar to the default
`flutter create` template (NativeViewController.m).
1. A FlutterViewController subclass that takes over full screen. Demos showing
this both from a cold/fresh engine state and a warm engine state
(FullScreenViewController.m).
1. A demo of pushing a FlutterViewController on as a child view.
1. A demo of showing both the native and the Flutter views using a platform
channel to interact with each other (HybridViewController.m).
1. A demo of showing two FlutterViewControllers simultaneously
(DualViewController.m).
A few key things are tested here (IntegrationTests.m):
1. The ability to pre-warm the engine and attach/detatch a ViewController from
it.
1. The ability to use platform channels to communicate between views.
1. The ability to simultaneously run two instances of the engine.
1. That a FlutterViewController can be freed when no longer in use (also tested
from FlutterViewControllerTests.m).
1. That a FlutterEngine can be freed when no longer in use.

View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
# Copyright 2014 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
cd "$(dirname "$0")"
pushd flutterapp
../../../../bin/flutter build ios --debug --simulator --no-codesign
popd
pod install
os_version=$(xcrun --show-sdk-version --sdk iphonesimulator)
PRETTY="cat"
if which xcpretty; then
PRETTY="xcpretty"
fi
set -o pipefail && xcodebuild \
-workspace ios_add2app.xcworkspace \
-scheme ios_add2appTests \
-sdk "iphonesimulator$os_version" \
-destination "OS=$os_version,name=iPhone X" test | $PRETTY

View File

@ -1,42 +0,0 @@
.DS_Store
.dart_tool/
.packages
.pub/
.idea/
.vagrant/
.sconsign.dblite
.svn/
*.swp
profile
DerivedData/
.generated/
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
xcuserdata
*.moved-aside
*.pyc
*sync/
Icon?
.tags*
build/
.android/
.ios/
.flutter-plugins
.flutter-plugins-dependencies

View File

@ -1,10 +0,0 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 06179457d553b96b4d7421a08ac90535ca2c9632
channel: unknown
project_type: module

View File

@ -1,654 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objects = {
/* Begin PBXBuildFile section */
09C65652A2B48A21C94FF831 /* EarlGrey.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DE1EF0F5719FBB45225A9EC3 /* EarlGrey.framework */; };
24D2933821A29628008787A5 /* IntegrationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D2933721A29628008787A5 /* IntegrationTests.m */; };
24E221BA21A28A0B008ADF09 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E221B921A28A0B008ADF09 /* AppDelegate.m */; };
24E221C821A28A0C008ADF09 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E221C721A28A0C008ADF09 /* main.m */; };
24E221DB21A28B23008ADF09 /* HybridViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E221D021A28B22008ADF09 /* HybridViewController.m */; };
24E221DC21A28B23008ADF09 /* DualFlutterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E221D121A28B22008ADF09 /* DualFlutterViewController.m */; };
24E221DD21A28B23008ADF09 /* FullScreenViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E221D321A28B23008ADF09 /* FullScreenViewController.m */; };
24E221DE21A28B23008ADF09 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E221D421A28B23008ADF09 /* MainViewController.m */; };
24E221DF21A28B23008ADF09 /* NativeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E221D621A28B23008ADF09 /* NativeViewController.m */; };
24E221E021A28B23008ADF09 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 24E221D721A28B23008ADF09 /* Launch Screen.storyboard */; };
24E221E221A28B36008ADF09 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 24E221E121A28B36008ADF09 /* Assets.xcassets */; };
24E7A1FE21A2AF26003A7FAD /* FlutterViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E7A1FD21A2AF26003A7FAD /* FlutterViewControllerTests.m */; };
4C21FEB4D629B570C74073D1 /* libPods-ios_add2appTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F90B141A9A8A680033E97924 /* libPods-ios_add2appTests.a */; };
8BDD73EC12DFA6CD2AC4EEDA /* EarlGrey.framework in EarlGrey Copy Files */ = {isa = PBXBuildFile; fileRef = DE1EF0F5719FBB45225A9EC3 /* EarlGrey.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
DB9A200AFEB7AAE22B4E12E4 /* libPods-ios_add2app.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A318514E0307AE0FF0EFC76 /* libPods-ios_add2app.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
24D2933A21A29628008787A5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 24E221AD21A28A0B008ADF09 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 24E221B421A28A0B008ADF09;
remoteInfo = ios_add2app;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
C155689B0EB46CB1FF251109 /* EarlGrey Copy Files */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "$(TEST_HOST)/../";
dstSubfolderSpec = 0;
files = (
8BDD73EC12DFA6CD2AC4EEDA /* EarlGrey.framework in EarlGrey Copy Files */,
);
name = "EarlGrey Copy Files";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
16D27B9BE77DC8804292A9A9 /* Pods-ios_add2appUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios_add2appUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ios_add2appUITests/Pods-ios_add2appUITests.release.xcconfig"; sourceTree = "<group>"; };
24D2933521A29627008787A5 /* ios_add2appTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ios_add2appTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
24D2933721A29628008787A5 /* IntegrationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IntegrationTests.m; sourceTree = "<group>"; };
24D2933921A29628008787A5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
24E221B521A28A0B008ADF09 /* ios_add2app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ios_add2app.app; sourceTree = BUILT_PRODUCTS_DIR; };
24E221B821A28A0B008ADF09 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
24E221B921A28A0B008ADF09 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
24E221C621A28A0C008ADF09 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
24E221C721A28A0C008ADF09 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
24E221CF21A28B22008ADF09 /* FullScreenViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FullScreenViewController.h; sourceTree = "<group>"; };
24E221D021A28B22008ADF09 /* HybridViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HybridViewController.m; sourceTree = "<group>"; };
24E221D121A28B22008ADF09 /* DualFlutterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DualFlutterViewController.m; sourceTree = "<group>"; };
24E221D221A28B23008ADF09 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
24E221D321A28B23008ADF09 /* FullScreenViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FullScreenViewController.m; sourceTree = "<group>"; };
24E221D421A28B23008ADF09 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
24E221D521A28B23008ADF09 /* DualFlutterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DualFlutterViewController.h; sourceTree = "<group>"; };
24E221D621A28B23008ADF09 /* NativeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeViewController.m; sourceTree = "<group>"; };
24E221D721A28B23008ADF09 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
24E221D821A28B23008ADF09 /* HybridViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HybridViewController.h; sourceTree = "<group>"; };
24E221D921A28B23008ADF09 /* NativeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeViewController.h; sourceTree = "<group>"; };
24E221E121A28B36008ADF09 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
24E7A1FD21A2AF26003A7FAD /* FlutterViewControllerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FlutterViewControllerTests.m; sourceTree = "<group>"; };
36DA6BEAA5127D74EC6E3E13 /* Pods-ios_add2appUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios_add2appUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ios_add2appUITests/Pods-ios_add2appUITests.debug.xcconfig"; sourceTree = "<group>"; };
52EA0B290EEBC1D28BF6E803 /* libPods-ios_add2appUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ios_add2appUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
74266A4D94FA1C3157B5B560 /* Pods-ios_add2appTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios_add2appTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ios_add2appTests/Pods-ios_add2appTests.debug.xcconfig"; sourceTree = "<group>"; };
762E954C71D922C091619CD4 /* Pods-ios_add2app-ios_add2appTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios_add2app-ios_add2appTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ios_add2app-ios_add2appTests/Pods-ios_add2app-ios_add2appTests.debug.xcconfig"; sourceTree = "<group>"; };
7A318514E0307AE0FF0EFC76 /* libPods-ios_add2app.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ios_add2app.a"; sourceTree = BUILT_PRODUCTS_DIR; };
83017A33946358F55BAE24E1 /* Pods-ios_add2appTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios_add2appTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ios_add2appTests/Pods-ios_add2appTests.release.xcconfig"; sourceTree = "<group>"; };
98A4882F55A3E107DFCB67D8 /* Pods-ios_add2app-ios_add2appTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios_add2app-ios_add2appTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ios_add2app-ios_add2appTests/Pods-ios_add2app-ios_add2appTests.release.xcconfig"; sourceTree = "<group>"; };
A18D4CDABD6795975FD6B49F /* Pods-ios_add2app.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios_add2app.release.xcconfig"; path = "Pods/Target Support Files/Pods-ios_add2app/Pods-ios_add2app.release.xcconfig"; sourceTree = "<group>"; };
CCFA174387D083C931FB85D0 /* Pods-ios_add2app.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios_add2app.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ios_add2app/Pods-ios_add2app.debug.xcconfig"; sourceTree = "<group>"; };
DE1EF0F5719FBB45225A9EC3 /* EarlGrey.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EarlGrey.framework; path = Pods/EarlGrey/EarlGrey/EarlGrey.framework; sourceTree = SOURCE_ROOT; };
F90B141A9A8A680033E97924 /* libPods-ios_add2appTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ios_add2appTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
24D2933221A29627008787A5 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
09C65652A2B48A21C94FF831 /* EarlGrey.framework in Frameworks */,
4C21FEB4D629B570C74073D1 /* libPods-ios_add2appTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
24E221B221A28A0B008ADF09 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DB9A200AFEB7AAE22B4E12E4 /* libPods-ios_add2app.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
24D2933621A29628008787A5 /* ios_add2appTests */ = {
isa = PBXGroup;
children = (
24D2933721A29628008787A5 /* IntegrationTests.m */,
24E7A1FD21A2AF26003A7FAD /* FlutterViewControllerTests.m */,
24D2933921A29628008787A5 /* Info.plist */,
);
path = ios_add2appTests;
sourceTree = "<group>";
};
24E221AC21A28A0B008ADF09 = {
isa = PBXGroup;
children = (
24E221B721A28A0B008ADF09 /* ios_add2app */,
24D2933621A29628008787A5 /* ios_add2appTests */,
24E221B621A28A0B008ADF09 /* Products */,
F8E51775C9B1473BB9A1386D /* Pods */,
8403FDDD872DC11EF3710BB4 /* Frameworks */,
);
sourceTree = "<group>";
};
24E221B621A28A0B008ADF09 /* Products */ = {
isa = PBXGroup;
children = (
24E221B521A28A0B008ADF09 /* ios_add2app.app */,
24D2933521A29627008787A5 /* ios_add2appTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
24E221B721A28A0B008ADF09 /* ios_add2app */ = {
isa = PBXGroup;
children = (
24E221E121A28B36008ADF09 /* Assets.xcassets */,
24E221D521A28B23008ADF09 /* DualFlutterViewController.h */,
24E221D121A28B22008ADF09 /* DualFlutterViewController.m */,
24E221CF21A28B22008ADF09 /* FullScreenViewController.h */,
24E221D321A28B23008ADF09 /* FullScreenViewController.m */,
24E221D821A28B23008ADF09 /* HybridViewController.h */,
24E221D021A28B22008ADF09 /* HybridViewController.m */,
24E221D721A28B23008ADF09 /* Launch Screen.storyboard */,
24E221D221A28B23008ADF09 /* MainViewController.h */,
24E221D421A28B23008ADF09 /* MainViewController.m */,
24E221D921A28B23008ADF09 /* NativeViewController.h */,
24E221D621A28B23008ADF09 /* NativeViewController.m */,
24E221B821A28A0B008ADF09 /* AppDelegate.h */,
24E221B921A28A0B008ADF09 /* AppDelegate.m */,
24E221C621A28A0C008ADF09 /* Info.plist */,
24E221C721A28A0C008ADF09 /* main.m */,
);
path = ios_add2app;
sourceTree = "<group>";
};
8403FDDD872DC11EF3710BB4 /* Frameworks */ = {
isa = PBXGroup;
children = (
7A318514E0307AE0FF0EFC76 /* libPods-ios_add2app.a */,
DE1EF0F5719FBB45225A9EC3 /* EarlGrey.framework */,
52EA0B290EEBC1D28BF6E803 /* libPods-ios_add2appUITests.a */,
F90B141A9A8A680033E97924 /* libPods-ios_add2appTests.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
F8E51775C9B1473BB9A1386D /* Pods */ = {
isa = PBXGroup;
children = (
CCFA174387D083C931FB85D0 /* Pods-ios_add2app.debug.xcconfig */,
A18D4CDABD6795975FD6B49F /* Pods-ios_add2app.release.xcconfig */,
36DA6BEAA5127D74EC6E3E13 /* Pods-ios_add2appUITests.debug.xcconfig */,
16D27B9BE77DC8804292A9A9 /* Pods-ios_add2appUITests.release.xcconfig */,
74266A4D94FA1C3157B5B560 /* Pods-ios_add2appTests.debug.xcconfig */,
83017A33946358F55BAE24E1 /* Pods-ios_add2appTests.release.xcconfig */,
762E954C71D922C091619CD4 /* Pods-ios_add2app-ios_add2appTests.debug.xcconfig */,
98A4882F55A3E107DFCB67D8 /* Pods-ios_add2app-ios_add2appTests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
24D2933421A29627008787A5 /* ios_add2appTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 24D2933C21A29628008787A5 /* Build configuration list for PBXNativeTarget "ios_add2appTests" */;
buildPhases = (
DE5CDCD8B3565EAB9F38F455 /* [CP] Check Pods Manifest.lock */,
24D2933121A29627008787A5 /* Sources */,
24D2933221A29627008787A5 /* Frameworks */,
24D2933321A29627008787A5 /* Resources */,
C155689B0EB46CB1FF251109 /* EarlGrey Copy Files */,
E32E699BE7026038F5987095 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
24D2933B21A29628008787A5 /* PBXTargetDependency */,
);
name = ios_add2appTests;
productName = ios_add2appTests;
productReference = 24D2933521A29627008787A5 /* ios_add2appTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
24E221B421A28A0B008ADF09 /* ios_add2app */ = {
isa = PBXNativeTarget;
buildConfigurationList = 24E221CB21A28A0C008ADF09 /* Build configuration list for PBXNativeTarget "ios_add2app" */;
buildPhases = (
4375EE880A727341E9C9A57D /* [CP] Check Pods Manifest.lock */,
52B3E7E8995E582399C42407 /* [CP-User] Run Flutter Build ios_add2app_flutter Script */,
24E221B121A28A0B008ADF09 /* Sources */,
24E221B221A28A0B008ADF09 /* Frameworks */,
24E221B321A28A0B008ADF09 /* Resources */,
7FADF19EC61F97E525982780 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = ios_add2app;
productName = ios_add2app;
productReference = 24E221B521A28A0B008ADF09 /* ios_add2app.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
24E221AD21A28A0B008ADF09 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = Flutter.io;
TargetAttributes = {
24D2933421A29627008787A5 = {
CreatedOnToolsVersion = 10.0;
TestTargetID = 24E221B421A28A0B008ADF09;
};
24E221B421A28A0B008ADF09 = {
CreatedOnToolsVersion = 10.0;
};
};
};
buildConfigurationList = 24E221B021A28A0B008ADF09 /* Build configuration list for PBXProject "ios_add2app" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 24E221AC21A28A0B008ADF09;
productRefGroup = 24E221B621A28A0B008ADF09 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
24E221B421A28A0B008ADF09 /* ios_add2app */,
24D2933421A29627008787A5 /* ios_add2appTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
24D2933321A29627008787A5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
24E221B321A28A0B008ADF09 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
24E221E021A28B23008ADF09 /* Launch Screen.storyboard in Resources */,
24E221E221A28B36008ADF09 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
4375EE880A727341E9C9A57D /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-ios_add2app-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
52B3E7E8995E582399C42407 /* [CP-User] Run Flutter Build ios_add2app_flutter Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/flutterapp/.metadata",
"${SRCROOT}/flutterapp/.ios/Flutter/App.framework/App",
"${SRCROOT}/flutterapp/.ios/Flutter/engine/Flutter.framework/Flutter",
"${SRCROOT}/flutterapp/.ios/Flutter/flutter_export_environment.sh",
);
name = "[CP-User] Run Flutter Build ios_add2app_flutter Script";
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\nset -u\nsource \"${SRCROOT}/flutterapp/.ios/Flutter/flutter_export_environment.sh\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build";
};
7FADF19EC61F97E525982780 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ios_add2app/Pods-ios_add2app-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ios_add2app/Pods-ios_add2app-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ios_add2app/Pods-ios_add2app-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
DE5CDCD8B3565EAB9F38F455 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-ios_add2appTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E32E699BE7026038F5987095 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ios_add2appTests/Pods-ios_add2appTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ios_add2appTests/Pods-ios_add2appTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ios_add2appTests/Pods-ios_add2appTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
24D2933121A29627008787A5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
24E7A1FE21A2AF26003A7FAD /* FlutterViewControllerTests.m in Sources */,
24D2933821A29628008787A5 /* IntegrationTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
24E221B121A28A0B008ADF09 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
24E221C821A28A0C008ADF09 /* main.m in Sources */,
24E221DE21A28B23008ADF09 /* MainViewController.m in Sources */,
24E221DD21A28B23008ADF09 /* FullScreenViewController.m in Sources */,
24E221DC21A28B23008ADF09 /* DualFlutterViewController.m in Sources */,
24E221DB21A28B23008ADF09 /* HybridViewController.m in Sources */,
24E221DF21A28B23008ADF09 /* NativeViewController.m in Sources */,
24E221BA21A28A0B008ADF09 /* AppDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
24D2933B21A29628008787A5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 24E221B421A28A0B008ADF09 /* ios_add2app */;
targetProxy = 24D2933A21A29628008787A5 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
24D2933D21A29628008787A5 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 74266A4D94FA1C3157B5B560 /* Pods-ios_add2appTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = S8QB4VV633;
INFOPLIST_FILE = ios_add2appTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.test.ios-add2appTests";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ios_add2app.app/ios_add2app";
};
name = Debug;
};
24D2933E21A29628008787A5 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 83017A33946358F55BAE24E1 /* Pods-ios_add2appTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = S8QB4VV633;
INFOPLIST_FILE = ios_add2appTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.test.ios-add2appTests";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ios_add2app.app/ios_add2app";
};
name = Release;
};
24E221C921A28A0C008ADF09 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_PEDANTIC = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
WARNING_CFLAGS = "-Wno-gnu";
WARNING_LDFLAGS = (
"-Wall",
"-Werror",
);
};
name = Debug;
};
24E221CA21A28A0C008ADF09 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_PEDANTIC = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
WARNING_CFLAGS = "-Wno-gnu";
WARNING_LDFLAGS = (
"-Wall",
"-Werror",
);
};
name = Release;
};
24E221CC21A28A0C008ADF09 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CCFA174387D083C931FB85D0 /* Pods-ios_add2app.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = S8QB4VV633;
INFOPLIST_FILE = ios_add2app/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.test.ios-add2app";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
24E221CD21A28A0C008ADF09 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A18D4CDABD6795975FD6B49F /* Pods-ios_add2app.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = S8QB4VV633;
INFOPLIST_FILE = ios_add2app/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.test.ios-add2app";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
24D2933C21A29628008787A5 /* Build configuration list for PBXNativeTarget "ios_add2appTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
24D2933D21A29628008787A5 /* Debug */,
24D2933E21A29628008787A5 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
24E221B021A28A0B008ADF09 /* Build configuration list for PBXProject "ios_add2app" */ = {
isa = XCConfigurationList;
buildConfigurations = (
24E221C921A28A0C008ADF09 /* Debug */,
24E221CA21A28A0C008ADF09 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
24E221CB21A28A0C008ADF09 /* Build configuration list for PBXNativeTarget "ios_add2app" */ = {
isa = XCConfigurationList;
buildConfigurations = (
24E221CC21A28A0C008ADF09 /* Debug */,
24E221CD21A28A0C008ADF09 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 24E221AD21A28A0B008ADF09 /* Project object */;
}

View File

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "NO">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "24D2933421A29627008787A5"
BuildableName = "ios_add2appTests.xctest"
BlueprintName = "ios_add2appTests"
ReferencedContainer = "container:ios_add2app.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
<EnvironmentVariables>
<EnvironmentVariable
key = "DYLD_INSERT_LIBRARIES"
value = "@executable_path/EarlGrey.framework/EarlGrey"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:ios_add2app.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>

View File

@ -1,8 +0,0 @@
<?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>

View File

@ -1,13 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <UIKit/UIKit.h>
#import <Flutter/Flutter.h>
@interface AppDelegate : FlutterAppDelegate
@property(nonatomic, strong) FlutterEngine* engine;
@property(nonatomic, strong) FlutterBasicMessageChannel* reloadMessageChannel;
@end

View File

@ -1,53 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "AppDelegate.h"
#import "MainViewController.h"
@interface AppDelegate ()
@end
static NSString *_kReloadChannelName = @"reload";
@implementation AppDelegate {
MainViewController *_mainViewController;
UINavigationController *_navigationController;
FlutterEngine *_engine;
FlutterBasicMessageChannel *_reloadMessageChannel;
}
- (FlutterEngine *)engine {
return _engine;
}
- (FlutterBasicMessageChannel *)reloadMessabeChannel {
return _reloadMessageChannel;
}
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
_mainViewController = [[MainViewController alloc] init];
_navigationController = [[UINavigationController alloc]
initWithRootViewController:_mainViewController];
_navigationController.navigationBar.translucent = NO;
_engine = [[FlutterEngine alloc] initWithName:@"test" project:nil];
[_engine runWithEntrypoint:nil];
_reloadMessageChannel = [[FlutterBasicMessageChannel alloc]
initWithName:_kReloadChannelName
binaryMessenger:_engine.binaryMessenger
codec:[FlutterStringCodec sharedInstance]];
self.window.rootViewController = _navigationController;
[self.window makeKeyAndVisible];
return YES;
}
@end

View File

@ -1,122 +0,0 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -1,6 +0,0 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -1,43 +0,0 @@
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>Launch Screen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="© 2018 The Flutter Authors. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="obG-Y5-kRd">
<rect key="frame" x="0.0" y="626" width="375" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ios_add2app" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
<rect key="frame" x="0.0" y="202" width="375" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="centerX" secondItem="obG-Y5-kRd" secondAttribute="centerX" id="5cz-MP-9tL"/>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
<constraint firstItem="obG-Y5-kRd" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" symbolic="YES" id="SfN-ll-jLj"/>
<constraint firstAttribute="bottom" secondItem="obG-Y5-kRd" secondAttribute="bottom" constant="20" id="Y44-ml-fuU"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" constant="20" symbolic="YES" id="x7j-FC-K8j"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -1,12 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

View File

@ -1,27 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(dnfield): This belongs in the engine repo.
#import <Flutter/Flutter.h>
#import <XCTest/XCTest.h>
@interface ViewControllerRelease : XCTestCase
@end
@implementation ViewControllerRelease
- (void)testReleaseFlutterViewController {
__weak FlutterEngine* weakEngine;
@autoreleasepool {
FlutterViewController* viewController = [[FlutterViewController alloc]
init];
weakEngine = viewController.engine;
[viewController viewWillAppear:NO];
[viewController viewDidDisappear:NO];
}
XCTAssertNil(weakEngine, @"Engine failed to release.");
}
@end

View File

@ -1,186 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <EarlGrey/EarlGrey.h>
#import <XCTest/XCTest.h>
#import "../ios_add2app/AppDelegate.h"
#import "../ios_add2app/DualFlutterViewController.h"
#import "../ios_add2app/FullScreenViewController.h"
#import "../ios_add2app/MainViewController.h"
#import "../ios_add2app/HybridViewController.h"
@interface FlutterTests : XCTestCase
@end
@implementation FlutterTests {
int _flutterWarmEngineTaps;
}
- (instancetype)init {
self = [super init];
if (self) {
_flutterWarmEngineTaps = 0;
}
return self;
}
- (void)expectSemanticsNotification:(FlutterViewController*)viewController {
[self expectationForNotification:FlutterSemanticsUpdateNotification object:viewController handler:nil];
[viewController.engine ensureSemanticsEnabled];
[self waitForExpectationsWithTimeout:30.0 handler:nil];
}
- (void)testFullScreenCanPop {
[[EarlGrey selectElementWithMatcher:grey_keyWindow()]
assertWithMatcher:grey_sufficientlyVisible()];
[[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Full Screen (Cold)")]
performAction:grey_tap()];
__weak FlutterViewController *weakViewController;
@autoreleasepool {
UINavigationController *navController =
(UINavigationController *)((AppDelegate *)
[[UIApplication sharedApplication]
delegate])
.window.rootViewController;
weakViewController =
(FullScreenViewController *)navController.visibleViewController;
[self expectSemanticsNotification:weakViewController];
GREYAssertNotNil(weakViewController,
@"Expected non-nil FullScreenViewController.");
}
[[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(@"POP")]
performAction:grey_tap()];
// EarlGrey v1 isn't good at detecting this yet - 2.0 will be able to do it
int tries = 10;
double delay = 1.0;
while (weakViewController != nil && tries != 0) {
CFRunLoopRunInMode(kCFRunLoopDefaultMode, delay, false);
tries--;
}
[[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Native iOS View")]
assertWithMatcher:grey_sufficientlyVisible()];
GREYAssertNil(weakViewController,
@"Expected FullScreenViewController to be deallocated.");
}
- (void)testDualFlutterView {
[[EarlGrey selectElementWithMatcher:grey_keyWindow()]
assertWithMatcher:grey_sufficientlyVisible()];
[[EarlGrey
selectElementWithMatcher:grey_buttonTitle(@"Dual Flutter View (Cold)")]
performAction:grey_tap()];
@autoreleasepool {
UINavigationController *navController =
(UINavigationController *)((AppDelegate *)
[[UIApplication sharedApplication]
delegate])
.window.rootViewController;
DualFlutterViewController *viewController =
(DualFlutterViewController *)navController.visibleViewController;
GREYAssertNotNil(viewController,
@"Expected non-nil DualFlutterViewController.");
[self expectSemanticsNotification:viewController.topFlutterViewController];
[self expectSemanticsNotification:viewController.bottomFlutterViewController];
}
// Verify that there are two Flutter views with the expected marquee text.
[[[EarlGrey
selectElementWithMatcher:grey_accessibilityLabel(@"This is Marquee")]
atIndex:0] assertWithMatcher:grey_notNil()];
[[[EarlGrey
selectElementWithMatcher:grey_accessibilityLabel(@"This is Marquee")]
atIndex:1] assertWithMatcher:grey_notNil()];
[[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Back")]
performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Native iOS View")]
assertWithMatcher:grey_sufficientlyVisible()];
}
- (void)testHybridView {
[[EarlGrey selectElementWithMatcher:grey_keyWindow()]
assertWithMatcher:grey_sufficientlyVisible()];
[[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Hybrid View (Warm)")]
performAction:grey_tap()];
@autoreleasepool {
UINavigationController *navController =
(UINavigationController *)((AppDelegate *)
[[UIApplication sharedApplication]
delegate])
.window.rootViewController;
HybridViewController *viewController =
(HybridViewController *)navController.visibleViewController;
GREYAssertNotNil(viewController.flutterViewController,
@"Expected non-nil FlutterViewController.");
[self expectSemanticsNotification:viewController.flutterViewController];
}
[self validateCountsFlutter:@"Platform" count:0];
[self validateCountsPlatform:@"Flutter" count:_flutterWarmEngineTaps];
static const int platformTapCount = 4;
static const int flutterTapCount = 6;
for (int i = _flutterWarmEngineTaps; i < flutterTapCount;
i++, _flutterWarmEngineTaps++) {
[[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(
@"Increment via Flutter")]
performAction:grey_tap()];
}
[self validateCountsFlutter:@"Platform" count:0];
[self validateCountsPlatform:@"Flutter" count:_flutterWarmEngineTaps];
for (int i = 0; i < platformTapCount; i++) {
[[EarlGrey
selectElementWithMatcher:grey_accessibilityLabel(@"Increment via iOS")]
performAction:grey_tap()];
}
[self validateCountsFlutter:@"Platform" count:platformTapCount];
[self validateCountsPlatform:@"Flutter" count:_flutterWarmEngineTaps];
[[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Back")]
performAction:grey_tap()];
[[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Native iOS View")]
assertWithMatcher:grey_sufficientlyVisible()];
}
/** Validates that the text labels showing the number of button taps match the
* expected counts. */
- (void)validateCountsFlutter:(NSString *)labelPrefix count:(int)flutterCount {
NSString *flutterCountStr =
[NSString stringWithFormat:@"%@ button tapped %d times.", labelPrefix,
flutterCount];
// TODO(https://github.com/flutter/flutter/issues/17988): Flutter doesn't
// expose accessibility IDs, so the best we can do is to search for an element
// with the text we expect.
[[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(flutterCountStr)]
assertWithMatcher:grey_sufficientlyVisible()];
}
- (void)validateCountsPlatform:(NSString *)labelPrefix
count:(int)platformCount {
NSString *platformCountStr =
[NSString stringWithFormat:@"%@ button tapped %d times.", labelPrefix,
platformCount];
[[[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"counter_on_iOS")]
assertWithMatcher:grey_text(platformCountStr)]
assertWithMatcher:grey_sufficientlyVisible()];
}
@end

View File

@ -0,0 +1,98 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@import XCTest;
@interface FlutterUITests : XCTestCase
@end
@implementation FlutterUITests
- (void)setUp {
self.continueAfterFailure = NO;
}
- (void)testFullScreenColdPop {
XCUIApplication *app = [[XCUIApplication alloc] init];
[app launch];
[app.buttons[@"Full Screen (Cold)"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 0 times."] waitForExistenceWithTimeout:1.0]);
[app.otherElements[@"Increment via Flutter"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 1 time."] waitForExistenceWithTimeout:1.0]);
// Back navigation.
[app.buttons[@"POP"] tap];
XCTAssertTrue([app.navigationBars[@"Flutter iOS Demos Home"] waitForExistenceWithTimeout:1.0]);
}
- (void)testFullScreenWarm {
XCUIApplication *app = [[XCUIApplication alloc] init];
[app launch];
[app.buttons[@"Full Screen (Warm)"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 0 times."] waitForExistenceWithTimeout:1.0]);
[app.otherElements[@"Increment via Flutter"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 1 time."] waitForExistenceWithTimeout:1.0]);
// Back navigation.
[app.buttons[@"POP"] tap];
XCTAssertTrue([app.navigationBars[@"Flutter iOS Demos Home"] waitForExistenceWithTimeout:1.0]);
}
- (void)testFlutterViewWarm {
XCUIApplication *app = [[XCUIApplication alloc] init];
[app launch];
[app.buttons[@"Flutter View (Warm)"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 0 times."] waitForExistenceWithTimeout:1.0]);
[app.otherElements[@"Increment via Flutter"] tap];
XCTAssertTrue([app.otherElements[@"Button tapped 1 time."] waitForExistenceWithTimeout:1.0]);
// Back navigation.
[app.buttons[@"POP"] tap];
XCTAssertTrue([app.navigationBars[@"Flutter iOS Demos Home"] waitForExistenceWithTimeout:1.0]);
}
- (void)testHybridViewWarm {
XCUIApplication *app = [[XCUIApplication alloc] init];
[app launch];
[app.buttons[@"Hybrid View (Warm)"] tap];
XCTAssertTrue([app.staticTexts[@"Flutter button tapped 0 times."] waitForExistenceWithTimeout:1.0]);
XCTAssertTrue(app.otherElements[@"Platform button tapped 0 times."].exists);
[app.otherElements[@"Increment via Flutter"] tap];
XCTAssertTrue([app.staticTexts[@"Flutter button tapped 1 time."] waitForExistenceWithTimeout:1.0]);
XCTAssertTrue(app.otherElements[@"Platform button tapped 0 times."].exists);
[app.buttons[@"Increment via iOS"] tap];
XCTAssertTrue([app.staticTexts[@"Flutter button tapped 1 time."] waitForExistenceWithTimeout:1.0]);
XCTAssertTrue(app.otherElements[@"Platform button tapped 1 time."].exists);
// Back navigation.
[app.navigationBars[@"Hybrid Flutter/Native"].buttons[@"Flutter iOS Demos Home"] tap];
XCTAssertTrue([app.navigationBars[@"Flutter iOS Demos Home"] waitForExistenceWithTimeout:1.0]);
}
- (void)testDualCold {
XCUIApplication *app = [[XCUIApplication alloc] init];
[app launch];
[app.buttons[@"Dual Flutter View (Cold)"] tap];
// There are two marquees.
XCTAssertTrue([app.otherElements[@"This is Marquee"] waitForExistenceWithTimeout:1.0]);
XCTAssertEqual([app.otherElements matchingType:XCUIElementTypeOther identifier:@"This is Marquee"].count, 2);
// Back navigation.
[app.navigationBars[@"Dual Flutter Views"].buttons[@"Flutter iOS Demos Home"] tap];
XCTAssertTrue([app.navigationBars[@"Flutter iOS Demos Home"] waitForExistenceWithTimeout:1.0]);
}
@end

View File

@ -13,7 +13,7 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>

View File

@ -3,29 +3,61 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 51;
objects = {
/* Begin PBXBuildFile section */
4AF9D63425F74F0694CAB07D /* libPods-Host.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E20960BD8B505D605FE82853 /* libPods-Host.a */; };
74F97866215AB9E8005A0F04 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 74F97865215AB9E8005A0F04 /* AppDelegate.m */; };
74F97869215AB9E8005A0F04 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 74F97868215AB9E8005A0F04 /* ViewController.m */; };
74F9786C215AB9E8005A0F04 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74F9786A215AB9E8005A0F04 /* Main.storyboard */; };
74F9786E215AB9E9005A0F04 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 74F9786D215AB9E9005A0F04 /* Assets.xcassets */; };
74F97871215AB9E9005A0F04 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 74F9786F215AB9E9005A0F04 /* LaunchScreen.storyboard */; };
74F97874215AB9E9005A0F04 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 74F97873215AB9E9005A0F04 /* main.m */; };
7E06ECD9FAEFCA4A0ED04D6E /* libPods-FlutterUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 327E8CC22A494E7D7155FB58 /* libPods-FlutterUITests.a */; };
F7C2661424AC18D00085742D /* DualFlutterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C2660E24AC18D00085742D /* DualFlutterViewController.m */; };
F7C2661524AC18D00085742D /* FullScreenViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C2660F24AC18D00085742D /* FullScreenViewController.m */; };
F7C2661624AC18D00085742D /* HybridViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C2661124AC18D00085742D /* HybridViewController.m */; };
F7C2661B24AC18DD0085742D /* NativeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C2661824AC18DD0085742D /* NativeViewController.m */; };
F7C2661C24AC18DD0085742D /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C2661A24AC18DD0085742D /* MainViewController.m */; };
F7C2664624AC1E3A0085742D /* FlutterUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F7C2664524AC1E3A0085742D /* FlutterUITests.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
F7C2664824AC1E3A0085742D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 74F97859215AB9E8005A0F04 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 74F97860215AB9E8005A0F04;
remoteInfo = Host;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
167171877EDE2F421DEC809C /* Pods-FlutterUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FlutterUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FlutterUITests/Pods-FlutterUITests.debug.xcconfig"; sourceTree = "<group>"; };
327E8CC22A494E7D7155FB58 /* libPods-FlutterUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FlutterUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
41D0C662C99CDA4C35B51C32 /* Pods-Host.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Host.release.xcconfig"; path = "Pods/Target Support Files/Pods-Host/Pods-Host.release.xcconfig"; sourceTree = "<group>"; };
74F97861215AB9E8005A0F04 /* Host.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Host.app; sourceTree = BUILT_PRODUCTS_DIR; };
74F97864215AB9E8005A0F04 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
74F97865215AB9E8005A0F04 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
74F97867215AB9E8005A0F04 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
74F97868215AB9E8005A0F04 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
74F9786B215AB9E8005A0F04 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
74F9786D215AB9E9005A0F04 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
74F97870215AB9E9005A0F04 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
74F97872215AB9E9005A0F04 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
74F97873215AB9E9005A0F04 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8E6751F293967EE3DFF4178A /* Pods-FlutterUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FlutterUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-FlutterUITests/Pods-FlutterUITests.release.xcconfig"; sourceTree = "<group>"; };
91B7D4263BFD246A27391225 /* Pods-Host.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Host.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Host/Pods-Host.debug.xcconfig"; sourceTree = "<group>"; };
E20960BD8B505D605FE82853 /* libPods-Host.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Host.a"; sourceTree = BUILT_PRODUCTS_DIR; };
F7C2660E24AC18D00085742D /* DualFlutterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DualFlutterViewController.m; sourceTree = "<group>"; };
F7C2660F24AC18D00085742D /* FullScreenViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FullScreenViewController.m; sourceTree = "<group>"; };
F7C2661024AC18D00085742D /* HybridViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HybridViewController.h; sourceTree = "<group>"; };
F7C2661124AC18D00085742D /* HybridViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HybridViewController.m; sourceTree = "<group>"; };
F7C2661224AC18D00085742D /* FullScreenViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FullScreenViewController.h; sourceTree = "<group>"; };
F7C2661324AC18D00085742D /* DualFlutterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DualFlutterViewController.h; sourceTree = "<group>"; };
F7C2661724AC18DD0085742D /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = "<group>"; };
F7C2661824AC18DD0085742D /* NativeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NativeViewController.m; sourceTree = "<group>"; };
F7C2661924AC18DD0085742D /* NativeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeViewController.h; sourceTree = "<group>"; };
F7C2661A24AC18DD0085742D /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
F7C2664324AC1E3A0085742D /* FlutterUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FlutterUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
F7C2664524AC1E3A0085742D /* FlutterUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FlutterUITests.m; sourceTree = "<group>"; };
F7C2664724AC1E3A0085742D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -33,6 +65,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4AF9D63425F74F0694CAB07D /* libPods-Host.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F7C2664024AC1E3A0085742D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7E06ECD9FAEFCA4A0ED04D6E /* libPods-FlutterUITests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -43,6 +84,7 @@
isa = PBXGroup;
children = (
74F97863215AB9E8005A0F04 /* Host */,
F7C2664424AC1E3A0085742D /* FlutterUITests */,
74F97862215AB9E8005A0F04 /* Products */,
74F9788B215AC328005A0F04 /* Frameworks */,
A4A9971F50C4EE357B74B6E0 /* Pods */,
@ -53,6 +95,7 @@
isa = PBXGroup;
children = (
74F97861215AB9E8005A0F04 /* Host.app */,
F7C2664324AC1E3A0085742D /* FlutterUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -60,11 +103,18 @@
74F97863215AB9E8005A0F04 /* Host */ = {
isa = PBXGroup;
children = (
F7C2661724AC18DD0085742D /* MainViewController.h */,
F7C2661A24AC18DD0085742D /* MainViewController.m */,
F7C2661924AC18DD0085742D /* NativeViewController.h */,
F7C2661824AC18DD0085742D /* NativeViewController.m */,
F7C2661324AC18D00085742D /* DualFlutterViewController.h */,
F7C2660E24AC18D00085742D /* DualFlutterViewController.m */,
F7C2661224AC18D00085742D /* FullScreenViewController.h */,
F7C2660F24AC18D00085742D /* FullScreenViewController.m */,
F7C2661024AC18D00085742D /* HybridViewController.h */,
F7C2661124AC18D00085742D /* HybridViewController.m */,
74F97864215AB9E8005A0F04 /* AppDelegate.h */,
74F97865215AB9E8005A0F04 /* AppDelegate.m */,
74F97867215AB9E8005A0F04 /* ViewController.h */,
74F97868215AB9E8005A0F04 /* ViewController.m */,
74F9786A215AB9E8005A0F04 /* Main.storyboard */,
74F9786D215AB9E9005A0F04 /* Assets.xcassets */,
74F9786F215AB9E9005A0F04 /* LaunchScreen.storyboard */,
74F97872215AB9E9005A0F04 /* Info.plist */,
@ -76,6 +126,8 @@
74F9788B215AC328005A0F04 /* Frameworks */ = {
isa = PBXGroup;
children = (
E20960BD8B505D605FE82853 /* libPods-Host.a */,
327E8CC22A494E7D7155FB58 /* libPods-FlutterUITests.a */,
);
name = Frameworks;
sourceTree = "<group>";
@ -83,10 +135,23 @@
A4A9971F50C4EE357B74B6E0 /* Pods */ = {
isa = PBXGroup;
children = (
91B7D4263BFD246A27391225 /* Pods-Host.debug.xcconfig */,
41D0C662C99CDA4C35B51C32 /* Pods-Host.release.xcconfig */,
167171877EDE2F421DEC809C /* Pods-FlutterUITests.debug.xcconfig */,
8E6751F293967EE3DFF4178A /* Pods-FlutterUITests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
F7C2664424AC1E3A0085742D /* FlutterUITests */ = {
isa = PBXGroup;
children = (
F7C2664524AC1E3A0085742D /* FlutterUITests.m */,
F7C2664724AC1E3A0085742D /* Info.plist */,
);
path = FlutterUITests;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -94,9 +159,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 74F97877215AB9E9005A0F04 /* Build configuration list for PBXNativeTarget "Host" */;
buildPhases = (
DF650341152DB73976A358C2 /* [CP] Check Pods Manifest.lock */,
C954A75BD5C4F1EEA5AFF464 /* [CP-User] Run Flutter Build hello Script */,
74F9785D215AB9E8005A0F04 /* Sources */,
74F9785E215AB9E8005A0F04 /* Frameworks */,
74F9785F215AB9E8005A0F04 /* Resources */,
83F5A04FAA44C2FFFC4CBFBA /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -107,6 +175,27 @@
productReference = 74F97861215AB9E8005A0F04 /* Host.app */;
productType = "com.apple.product-type.application";
};
F7C2664224AC1E3A0085742D /* FlutterUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = F7C2664A24AC1E3A0085742D /* Build configuration list for PBXNativeTarget "FlutterUITests" */;
buildPhases = (
09D119997F3FFD16DBA33278 /* [CP] Check Pods Manifest.lock */,
5F3CDDFEC2CA4EEE4767777D /* [CP-User] Run Flutter Build hello Script */,
F7C2663F24AC1E3A0085742D /* Sources */,
F7C2664024AC1E3A0085742D /* Frameworks */,
F7C2664124AC1E3A0085742D /* Resources */,
5EABD4D6B64D840CAF712234 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
F7C2664924AC1E3A0085742D /* PBXTargetDependency */,
);
name = FlutterUITests;
productName = FlutterUITests;
productReference = F7C2664324AC1E3A0085742D /* FlutterUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@ -119,6 +208,10 @@
74F97860215AB9E8005A0F04 = {
CreatedOnToolsVersion = 10.0;
};
F7C2664224AC1E3A0085742D = {
CreatedOnToolsVersion = 12.0;
TestTargetID = 74F97860215AB9E8005A0F04;
};
};
};
buildConfigurationList = 74F9785C215AB9E8005A0F04 /* Build configuration list for PBXProject "Host" */;
@ -135,6 +228,7 @@
projectRoot = "";
targets = (
74F97860215AB9E8005A0F04 /* Host */,
F7C2664224AC1E3A0085742D /* FlutterUITests */,
);
};
/* End PBXProject section */
@ -146,34 +240,165 @@
files = (
74F97871215AB9E9005A0F04 /* LaunchScreen.storyboard in Resources */,
74F9786E215AB9E9005A0F04 /* Assets.xcassets in Resources */,
74F9786C215AB9E8005A0F04 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F7C2664124AC1E3A0085742D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
09D119997F3FFD16DBA33278 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-FlutterUITests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
5EABD4D6B64D840CAF712234 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FlutterUITests/Pods-FlutterUITests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FlutterUITests/Pods-FlutterUITests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FlutterUITests/Pods-FlutterUITests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
5F3CDDFEC2CA4EEE4767777D /* [CP-User] Run Flutter Build hello Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/../hello/.metadata",
"${SRCROOT}/../hello/.ios/Flutter/App.framework/App",
"${SRCROOT}/../hello/.ios/Flutter/engine/Flutter.framework/Flutter",
"${SRCROOT}/../hello/.ios/Flutter/flutter_export_environment.sh",
);
name = "[CP-User] Run Flutter Build hello Script";
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../hello/.ios/Flutter/flutter_export_environment.sh\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build";
};
83F5A04FAA44C2FFFC4CBFBA /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Host/Pods-Host-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Host/Pods-Host-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Host/Pods-Host-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
C954A75BD5C4F1EEA5AFF464 /* [CP-User] Run Flutter Build hello Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/../hello/.metadata",
"${SRCROOT}/../hello/.ios/Flutter/App.framework/App",
"${SRCROOT}/../hello/.ios/Flutter/engine/Flutter.framework/Flutter",
"${SRCROOT}/../hello/.ios/Flutter/flutter_export_environment.sh",
);
name = "[CP-User] Run Flutter Build hello Script";
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\nset -u\nsource \"${SRCROOT}/../hello/.ios/Flutter/flutter_export_environment.sh\"\n\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build";
};
DF650341152DB73976A358C2 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Host-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
74F9785D215AB9E8005A0F04 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74F97869215AB9E8005A0F04 /* ViewController.m in Sources */,
F7C2661524AC18D00085742D /* FullScreenViewController.m in Sources */,
F7C2661424AC18D00085742D /* DualFlutterViewController.m in Sources */,
F7C2661C24AC18DD0085742D /* MainViewController.m in Sources */,
74F97874215AB9E9005A0F04 /* main.m in Sources */,
F7C2661624AC18D00085742D /* HybridViewController.m in Sources */,
F7C2661B24AC18DD0085742D /* NativeViewController.m in Sources */,
74F97866215AB9E8005A0F04 /* AppDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F7C2663F24AC1E3A0085742D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F7C2664624AC1E3A0085742D /* FlutterUITests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
74F9786A215AB9E8005A0F04 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
74F9786B215AB9E8005A0F04 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
/* Begin PBXTargetDependency section */
F7C2664924AC1E3A0085742D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 74F97860215AB9E8005A0F04 /* Host */;
targetProxy = F7C2664824AC1E3A0085742D /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
74F9786F215AB9E9005A0F04 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
@ -299,10 +524,11 @@
};
74F97878215AB9E9005A0F04 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 91B7D4263BFD246A27391225 /* Pods-Host.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = S8QB4VV633;
INFOPLIST_FILE = Host/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@ -316,10 +542,11 @@
};
74F97879215AB9E9005A0F04 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 41D0C662C99CDA4C35B51C32 /* Pods-Host.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = S8QB4VV633;
INFOPLIST_FILE = Host/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@ -331,6 +558,48 @@
};
name = Release;
};
F7C2664B24AC1E3A0085742D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 167171877EDE2F421DEC809C /* Pods-FlutterUITests.debug.xcconfig */;
buildSettings = {
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = S8QB4VV633;
INFOPLIST_FILE = FlutterUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.flutterio.FlutterUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = Host;
};
name = Debug;
};
F7C2664C24AC1E3A0085742D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8E6751F293967EE3DFF4178A /* Pods-FlutterUITests.release.xcconfig */;
buildSettings = {
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = S8QB4VV633;
INFOPLIST_FILE = FlutterUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.flutterio.FlutterUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = Host;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -352,6 +621,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F7C2664A24AC1E3A0085742D /* Build configuration list for PBXNativeTarget "FlutterUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F7C2664B24AC1E3A0085742D /* Debug */,
F7C2664C24AC1E3A0085742D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 74F97859215AB9E8005A0F04 /* Project object */;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "24E221B421A28A0B008ADF09"
BuildableName = "ios_add2app.app"
BlueprintName = "ios_add2app"
ReferencedContainer = "container:ios_add2app.xcodeproj">
BlueprintIdentifier = "74F97860215AB9E8005A0F04"
BuildableName = "Host.app"
BlueprintName = "Host"
ReferencedContainer = "container:Host.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@ -28,6 +28,16 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F7C2664224AC1E3A0085742D"
BuildableName = "FlutterUITests.xctest"
BlueprintName = "FlutterUITests"
ReferencedContainer = "container:Host.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
@ -44,10 +54,10 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "24E221B421A28A0B008ADF09"
BuildableName = "ios_add2app.app"
BlueprintName = "ios_add2app"
ReferencedContainer = "container:ios_add2app.xcodeproj">
BlueprintIdentifier = "74F97860215AB9E8005A0F04"
BuildableName = "Host.app"
BlueprintName = "Host"
ReferencedContainer = "container:Host.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
@ -61,10 +71,10 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "24E221B421A28A0B008ADF09"
BuildableName = "ios_add2app.app"
BlueprintName = "ios_add2app"
ReferencedContainer = "container:ios_add2app.xcodeproj">
BlueprintIdentifier = "74F97860215AB9E8005A0F04"
BuildableName = "Host.app"
BlueprintName = "Host"
ReferencedContainer = "container:Host.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>

View File

@ -6,4 +6,8 @@
#import <Flutter/Flutter.h>
@interface AppDelegate : FlutterAppDelegate
@property(nonatomic, strong) FlutterEngine* engine;
@property(nonatomic, strong) FlutterBasicMessageChannel* reloadMessageChannel;
@end

View File

@ -3,6 +3,51 @@
// found in the LICENSE file.
#import "AppDelegate.h"
#import "MainViewController.h"
@interface AppDelegate ()
@end
static NSString *_kReloadChannelName = @"reload";
@implementation AppDelegate {
MainViewController *_mainViewController;
UINavigationController *_navigationController;
FlutterEngine *_engine;
FlutterBasicMessageChannel *_reloadMessageChannel;
}
- (FlutterEngine *)engine {
return _engine;
}
- (FlutterBasicMessageChannel *)reloadMessabeChannel {
return _reloadMessageChannel;
}
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
_mainViewController = [[MainViewController alloc] init];
_navigationController = [[UINavigationController alloc]
initWithRootViewController:_mainViewController];
_navigationController.navigationBar.translucent = NO;
_engine = [[FlutterEngine alloc] initWithName:@"test" project:nil];
[_engine runWithEntrypoint:nil];
_reloadMessageChannel = [[FlutterBasicMessageChannel alloc]
initWithName:_kReloadChannelName
binaryMessenger:_engine.binaryMessenger
codec:[FlutterStringCodec sharedInstance]];
self.window.rootViewController = _navigationController;
[self.window makeKeyAndVisible];
return YES;
}
@implementation AppDelegate
@end

View File

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -13,8 +16,30 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="© 2018 The Flutter Authors. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="obG-Y5-kRd">
<rect key="frame" x="0.0" y="626" width="375" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ios_add2app" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
<rect key="frame" x="0.0" y="202" width="375" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<constraints>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="centerX" secondItem="obG-Y5-kRd" secondAttribute="centerX" id="5cz-MP-9tL"/>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
<constraint firstItem="obG-Y5-kRd" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" symbolic="YES" id="SfN-ll-jLj"/>
<constraint firstAttribute="bottom" secondItem="obG-Y5-kRd" secondAttribute="bottom" constant="20" id="Y44-ml-fuU"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" constant="20" symbolic="YES" id="x7j-FC-K8j"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

View File

@ -22,8 +22,6 @@
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>

View File

@ -23,7 +23,7 @@
[super viewDidLoad];
[self.view setFrame:self.view.window.bounds];
self.title = @"Flutter iOS Demos";
self.title = @"Flutter iOS Demos Home";
self.view.backgroundColor = UIColor.whiteColor;
_stackView = [[UIStackView alloc] initWithFrame:self.view.frame];

View File

@ -1,8 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end

View File

@ -1,30 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ViewController.h"
#import <Flutter/Flutter.h>
#import <FlutterPluginRegistrant/GeneratedPluginRegistrant.h>
@implementation ViewController
// Boiler-plate add-to-app demo. Not integration tested anywhere.
- (void)viewDidLoad {
[super viewDidLoad];
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button addTarget:self
action:@selector(handleButtonAction)
forControlEvents:UIControlEventTouchUpInside];
[button setTitle:@"Press me" forState:UIControlStateNormal];
[button setBackgroundColor:[UIColor blueColor]];
button.frame = CGRectMake(80.0, 210.0, 160.0, 40.0);
[self.view addSubview:button];
}
- (void)handleButtonAction {
FlutterViewController* flutterViewController = [[FlutterViewController alloc] init];
[GeneratedPluginRegistrant registerWithRegistry:flutterViewController];
[self presentViewController:flutterViewController animated:false completion:nil];
}
@end

View File

@ -6,7 +6,7 @@
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

View File

@ -5,4 +5,9 @@ load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'Host' do
install_all_flutter_pods flutter_application_path
target 'FlutterUITests' do
inherit! :search_paths
install_all_flutter_pods flutter_application_path
end
end

View File

@ -1,8 +1,34 @@
# iOS host app
Used by the `module_test_ios.dart` device lab test.
iOS host app for a Flutter module created using
```
$ flutter create -t module hello
```
and placed in a sibling folder to (a clone of) the host app.
Used by the `module_test_ios.dart` device lab test.
`flutterapp/lib/marquee.dart` and `flutterapp/lib/main.dart`
must be copied into the new module `lib` for platform unit tests
to pass.
This application demonstrates some basic functionality for Add2App,
along with a native iOS ViewController as a baseline and to demonstrate
interaction.
1. A regular iOS view controller (UIViewController), similar to the default
`flutter create` template (NativeViewController.m).
1. A FlutterViewController subclass that takes over full screen. Demos showing
this both from a cold/fresh engine state and a warm engine state
(FullScreenViewController.m).
1. A demo of pushing a FlutterViewController on as a child view.
1. A demo of showing both the native and the Flutter views using a platform
channel to interact with each other (HybridViewController.m).
1. A demo of showing two FlutterViewControllers simultaneously
(DualViewController.m).
A few key things are tested here (FlutterUITests.m):
1. The ability to pre-warm the engine and attach/detatch a ViewController from
it.
1. The ability to use platform channels to communicate between views.
1. The ability to simultaneously run two instances of the engine.