TOP(About this memo)) > 一覧(Flutter) > iOSでビルドされる構成
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
Pods-Runner.debug.xcconfig
を読み込む。#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
If you changed Deployment Target in your Xcode project, open ios/Flutter/AppframeworkInfo.plist in your Flutter app and update the MinimumOSVersion value to match.
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
.symlinks/plugins/image_picker_ios/ios
に本体が格納されている事が示されている。PODS:
〜
- Firebase/Auth (10.18.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 10.18.0)
〜
- firebase_auth (4.14.0):
- Firebase/Auth (= 10.18.0)
- firebase_core
- Flutter
〜
- Flutter (1.0.0)
〜
- image_picker_ios (0.0.1):
- Flutter
- integration_test (0.0.1):
- Flutter
DEPENDENCIES:
〜
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
〜
- Flutter (from `Flutter`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
〜
EXTERNAL SOURCES:
〜
firebase_auth:
:path: ".symlinks/plugins/firebase_auth/ios"
〜
Flutter:
:path: Flutter
〜
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
〜
FlutterではTargetは”Runnner”という名称で生成される。
FlutterのアークテクチャにおけるEmbedder/Runnter に該当する。
以下の役割を持っていると考えられる。
Info.plist
Base.lproj/LaunchScreen.storyboard, Main.storyboard
AppDelegate.swift
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self) // GeneratedPluginRegistrant.mのregisterを呼び出して
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
GeneratedPluginRegistrant.h、GeneratedPluginRegistrant.m
// ios/.symlinks/plugins/integration_test/ios/Classes/IntegrationTestPlugin.m
static NSString *const kIntegrationTestPluginChannel = @"plugins.flutter.io/integration_test";
static NSString *const kMethodTestFinished = @"allTestsFinished";
static NSString *const kMethodScreenshot = @"captureScreenshot";
static NSString *const kMethodConvertSurfaceToImage = @"convertFlutterSurfaceToImage";
static NSString *const kMethodRevertImage = @"revertFlutterImage";
//...
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
// メソッドチャネルの設定
FlutterMethodChannel *channel = [FlutterMethodChannel methodChannelWithName:kIntegrationTestPluginChannel
binaryMessenger:registrar.messenger];
[registrar addMethodCallDelegate:[self instance] channel:channel];
}
- (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result {
// メソッドチャネルによって呼ばれたメソッドのハンドリング
if ([call.method isEqualToString:kMethodTestFinished]) {
self.testResults = call.arguments[@"results"];
// ...
} else if ([call.method isEqualToString:kMethodScreenshot]) {
// ...
} else if ([call.method isEqualToString:kMethodConvertSurfaceToImage]
// ...
} else {
// ...
}
}
Runner-Bridging-Header.h
info.plist
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
[ERROR:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm(42)] Using the Impeller rendering backend.
Building a deployable iOS app requires a selected Development Team with a Provisioning Profile.〜
This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode.
/* Begin PBXGroup section */
/* RunnerTests */ = {
/* RunnerTests.swift */
};
/* CocoaPodsを利用している場合 */
/* Frameworks */ = {
isa = PBXGroup;
children = (
/* Pods_Runner.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* Flutter */ = {
isa = PBXGroup;
children = (
/* AppFrameworkInfo.plist */,
/* Debug.xcconfig */,
/* Release.xcconfig */,
/* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
(mainGroup) = {
isa = PBXGroup;
children = (
/* Flutter */,
/* Runner */,
/* Products */,
/* RunnerTests */,
);
sourceTree = "<group>";
};
/* Products */ = {
isa = PBXGroup;
children = (
/* Runner.app */,
/* RunnerTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
/* Runner */ = {
isa = PBXGroup;
children = (
/* Main.storyboard */,
/* Assets.xcassets */,
/* LaunchScreen.storyboard */,
/* Info.plist */,
/* GeneratedPluginRegistrant.h */,
/* GeneratedPluginRegistrant.m */,
/* AppDelegate.swift */,
/* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXProject section */
/* Project object */ = {
isa = PBXProject;
/* ... */
compatibilityVersion = "Xcode 9.3";
/* ... */
mainGroup = (mainGroup);
/* ... */
targets = (
/* Runner */,
/* RunnerTests */,
);
};
/* End PBXProject section */
/* Begin PBXCopyFilesBuildPhase section */
/* Embed Frameworks */ = {
/* ... */
files = () /* 空になっていた。何が入る? */
/* ... */
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFrameworksBuildPhase section */
/* Frameworks */ = {
/* Pods_Runner.framework in Frameworks */,
/* CocoaPodsを利用している場合のみ。 */
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXResourcesBuildPhase section */
/* Resources */ = {
/* ... */
};
/* Resources */ = {
/* ... */
files = (
/* LaunchScreen.storyboard in Resources */,
/* AppFrameworkInfo.plist in Resources */,
/* Assets.xcassets in Resources */,
/* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
/* Thin Binary */ = {
/* ... */
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
/* ... */
outputPaths = (
);
/* ... */
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
/* Run Script */ = {
/* ... */
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
/* ... */
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
/* Sources */ = {
/* ... */
files = (
/* RunnerTests.swift in Sources */,
);
/* ... */
};
/* Sources */ = {
/* ... */
files = (
/* AppDelegate.swift in Sources */,
/* GeneratedPluginRegistrant.m in Sources */,
);
/* ... */
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXNativeTarget section */
/* RunnerTests */ = {
/* ... */
buildPhases = (
/* Sources */,
/* Resources */,
);
};
/* Runner */ = {
/* ... */
buildPhases = (
/* Run Script */,
/* Sources */,
/* Frameworks */,
/* Resources */,
/* Embed Frameworks */,
/* Thin Binary */,
);
/* ... */
};
/* End PBXNativeTarget section */
/* Begin XCConfigurationList section */
/* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
/* Debug */,
/* Release */,
/* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
/* Debug */,
/* Release */,
/* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
/* Debug */,
/* Release */,
/* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCBuildConfiguration section */
/* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
/* ... */
};
name = Profile;
};
/* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = /* Release.xcconfig */;
buildSettings = {
/* ... */
}
name = Profile;
};
/* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
/* ... */
};
name = Debug;
};
/* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
/* ... */
};
name = Release;
};
/* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
/* ... */
};
name = Profile;
};
/* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
/* ... */
};
name = Debug;
};
/* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
/* ... */
};
name = Release;
};
/* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = /* Debug.xcconfig */;
buildSettings = {
/* ... */
};
name = Debug;
};
/* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = /* Release.xcconfig */;
buildSettings = {
/* ... */
};
name = Release;
};
/* End XCBuildConfiguration section */
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
/* GeneratedPluginRegistrant.m in Sources */
/* RunnerTests.swift in Sources */
/* AppFrameworkInfo.plist in Resources */
/* AppDelegate.swift in Sources */
/* Main.storyboard in Resources */
/* Assets.xcassets in Resources */
/* LaunchScreen.storyboard in Resources */
/* Pods_Runner.framework in Frameworks */ /* CocoaPodsを利用している場合 */
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
/* ... */
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
/* ... */
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
/* GeneratedPluginRegistrant.h */
/* GeneratedPluginRegistrant.m */
/* Pods_Runner.framework */ /* CocoaPodsを利用している場合 */
/* RunnerTests.swift */
/* RunnerTests.xctest */
/* AppFrameworkInfo.plist */
/* Runner-Bridging-Header.h */
/* AppDelegate.swift */
/* Debug.xcconfig */
/* Release.xcconfig */
/* Generated.xcconfig */
/* Runner.app */
/* Base */
/* Assets.xcassets */
/* Base */
/* Info.plist */
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
/* ... */
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
/* ... */
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
/* ... */
/* End PBXNativeTarget section */
/* Begin PBXProject section */
/* ... */
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
/* ... */
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
/* ... */
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
/* ... */
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
/* ... */
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
/* Main.storyboard */ = {
/* ... */
};
/* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
/* ... */
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
/* ... */
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
/* ... */
/* End XCConfigurationList section */
};
rootObject = /* Project object */;
}