Pull iOS build templates from flutter tools vs engine artifacts (#4526)
This commit is contained in:
parent
c9bcf1074e
commit
2099d3789c
@ -64,3 +64,26 @@ void ensureDirectoryExists(String filePath) {
|
||||
return;
|
||||
syncFs.directory(dirPath).create(recursive: true);
|
||||
}
|
||||
|
||||
/// Recursively copies a folder from `srcPath` to `destPath`
|
||||
void copyFolderSync(String srcPath, String destPath) {
|
||||
dart_io.Directory srcDir = new dart_io.Directory(srcPath);
|
||||
if (!srcDir.existsSync())
|
||||
throw new Exception('Source directory "${srcDir.path}" does not exist, nothing to copy');
|
||||
|
||||
dart_io.Directory destDir = new dart_io.Directory(destPath);
|
||||
if (!destDir.existsSync())
|
||||
destDir.createSync(recursive: true);
|
||||
|
||||
srcDir.listSync().forEach((dart_io.FileSystemEntity entity) {
|
||||
String newPath = path.join(destDir.path, path.basename(entity.path));
|
||||
if (entity is dart_io.File) {
|
||||
dart_io.File newFile = new dart_io.File(newPath);
|
||||
newFile.writeAsBytesSync(entity.readAsBytesSync());
|
||||
} else if (entity is dart_io.Directory) {
|
||||
copyFolderSync(entity.path, newPath);
|
||||
} else {
|
||||
throw new Exception('${entity.path} is neither File nor Directory');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ import '../application_package.dart';
|
||||
import '../base/context.dart';
|
||||
import '../base/process.dart';
|
||||
import '../build_info.dart';
|
||||
import '../cache.dart';
|
||||
import '../flx.dart' as flx;
|
||||
import '../globals.dart';
|
||||
import '../services.dart';
|
||||
@ -114,12 +113,9 @@ Future<XcodeBuildResult> buildXcodeProject({
|
||||
return new XcodeBuildResult(false);
|
||||
}
|
||||
} else {
|
||||
updateXcodeGeneratedProperties(flutterProjectPath, mode, target);
|
||||
updateXcodeGeneratedProperties(flutterProjectPath, mode, target);
|
||||
}
|
||||
|
||||
if (!_validateEngineRevision(app))
|
||||
return new XcodeBuildResult(false);
|
||||
|
||||
if (!_checkXcodeVersion())
|
||||
return new XcodeBuildResult(false);
|
||||
|
||||
@ -200,31 +196,6 @@ bool _checkXcodeVersion() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool _validateEngineRevision(ApplicationPackage app) {
|
||||
String skyRevision = Cache.engineRevision;
|
||||
String iosRevision = _getIOSEngineRevision(app);
|
||||
|
||||
if (iosRevision != skyRevision) {
|
||||
printError("Error: incompatible sky_engine revision.");
|
||||
printStatus('sky_engine revision: $skyRevision, iOS engine revision: $iosRevision');
|
||||
return false;
|
||||
} else {
|
||||
printTrace('sky_engine revision: $skyRevision, iOS engine revision: $iosRevision');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
String _getIOSEngineRevision(ApplicationPackage app) {
|
||||
File revisionFile = new File(path.join(app.rootPath, 'REVISION'));
|
||||
if (revisionFile.existsSync()) {
|
||||
// The format is 'REVISION-mode'. We only need the revision.
|
||||
String revisionStamp = revisionFile.readAsStringSync().trim();
|
||||
return revisionStamp.split('-')[0];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Future<Null> _addServicesToBundle(Directory bundle) async {
|
||||
List<Map<String, String>> services = <Map<String, String>>[];
|
||||
printTrace("Trying to resolve native pub services.");
|
||||
|
@ -7,52 +7,11 @@ import 'dart:io';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import '../base/process.dart';
|
||||
import '../base/file_system.dart' show copyFolderSync;
|
||||
import '../build_info.dart';
|
||||
import '../cache.dart';
|
||||
import '../globals.dart';
|
||||
|
||||
bool _inflateXcodeArchive(String directory, List<int> archiveBytes) {
|
||||
printStatus('Unzipping Xcode project to local directory...');
|
||||
|
||||
// We cannot use ArchiveFile because this archive contains files that are exectuable
|
||||
// and there is currently no provision to modify file permissions during
|
||||
// or after creation. See https://github.com/dart-lang/sdk/issues/15078.
|
||||
// So we depend on the platform to unzip the archive for us.
|
||||
|
||||
Directory tempDir = Directory.systemTemp.createTempSync('flutter_xcode');
|
||||
File tempFile = new File(path.join(tempDir.path, 'FlutterXcode.zip'))..createSync();
|
||||
tempFile.writeAsBytesSync(archiveBytes);
|
||||
|
||||
try {
|
||||
Directory dir = new Directory(directory);
|
||||
|
||||
// Remove the old generated project if one is present
|
||||
if (dir.existsSync())
|
||||
dir.deleteSync(recursive: true);
|
||||
|
||||
// Create the directory so unzip can write to it
|
||||
dir.createSync(recursive: true);
|
||||
|
||||
// Unzip the Xcode project into the new empty directory
|
||||
runCheckedSync(<String>['/usr/bin/unzip', tempFile.path, '-d', dir.path]);
|
||||
} catch (error) {
|
||||
printTrace('$error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Cleanup the temp directory after unzipping
|
||||
tempDir.deleteSync(recursive: true);
|
||||
|
||||
// Verify that we have an Xcode project
|
||||
Directory flutterProj = new Directory(path.join(directory, 'FlutterApplication.xcodeproj'));
|
||||
if (!flutterProj.existsSync()) {
|
||||
printError("${flutterProj.path} does not exist");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
import '../version.dart';
|
||||
|
||||
void updateXcodeGeneratedProperties(String projectPath, BuildMode mode, String target) {
|
||||
StringBuffer localsBuffer = new StringBuffer();
|
||||
@ -93,7 +52,7 @@ bool xcodeProjectRequiresUpdate(BuildMode mode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (revisionFile.readAsStringSync() != '${Cache.engineRevision}-${getModeName(mode)}') {
|
||||
if (revisionFile.readAsStringSync() != _getCurrentXcodeRevisionString(mode)) {
|
||||
printTrace("The revision stamp and the Flutter engine revision differ or the build mode has changed.");
|
||||
printTrace("Project needs to be updated.");
|
||||
return true;
|
||||
@ -104,36 +63,27 @@ bool xcodeProjectRequiresUpdate(BuildMode mode) {
|
||||
}
|
||||
|
||||
Future<int> setupXcodeProjectHarness(String flutterProjectPath, BuildMode mode, String target) async {
|
||||
// Step 1: Fetch the archive from the cloud
|
||||
// Step 1: Copy templates into user project directory
|
||||
String iosFilesPath = path.join(flutterProjectPath, 'ios');
|
||||
String xcodeprojPath = path.join(iosFilesPath, '.generated');
|
||||
String xcodeProjectPath = path.join(iosFilesPath, '.generated');
|
||||
String templatesPath = path.join(Cache.flutterRoot, 'packages', 'flutter_tools', 'templates', 'build-ios');
|
||||
copyFolderSync(templatesPath, xcodeProjectPath);
|
||||
|
||||
Directory toolDir = tools.getEngineArtifactsDirectory(TargetPlatform.ios, mode);
|
||||
File archiveFile = new File(path.join(toolDir.path, 'FlutterXcode.zip'));
|
||||
List<int> archiveBytes = archiveFile.readAsBytesSync();
|
||||
|
||||
if (archiveBytes.isEmpty) {
|
||||
printError('Error: No archive bytes received.');
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Step 2: Inflate the archive into the user project directory
|
||||
bool result = _inflateXcodeArchive(xcodeprojPath, archiveBytes);
|
||||
if (!result) {
|
||||
printError('Could not inflate the Xcode project archive.');
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Step 3: Populate the Generated.xcconfig with project specific paths
|
||||
// Step 2: Populate the Generated.xcconfig with project specific paths
|
||||
updateXcodeGeneratedProperties(flutterProjectPath, mode, target);
|
||||
|
||||
// Step 4: Write the REVISION file
|
||||
File revisionFile = new File(path.join(xcodeprojPath, 'REVISION'));
|
||||
// Step 3: Write the REVISION file
|
||||
File revisionFile = new File(path.join(xcodeProjectPath, 'REVISION'));
|
||||
revisionFile.createSync();
|
||||
revisionFile.writeAsStringSync('${Cache.engineRevision}-${getModeName(mode)}');
|
||||
revisionFile.writeAsStringSync(_getCurrentXcodeRevisionString(mode));
|
||||
|
||||
// Step 5: Tell the user the location of the generated project.
|
||||
// Step 4: Tell the user the location of the generated project.
|
||||
printStatus('Xcode project created in $iosFilesPath/.');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
String _getCurrentXcodeRevisionString(BuildMode mode) => (new StringBuffer()
|
||||
..write('${FlutterVersion.getVersion().frameworkRevision}')
|
||||
..write('-${tools.isLocalEngine ? tools.engineBuildPath : getModeName(mode)}')
|
||||
).toString();
|
||||
|
1
packages/flutter_tools/templates/.gitignore
vendored
Normal file
1
packages/flutter_tools/templates/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
xcuserdata
|
@ -0,0 +1 @@
|
||||
#include "Generated.xcconfig"
|
@ -0,0 +1,396 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
976042271CFB91C5006EFB43 /* Flutter.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */; };
|
||||
9760422B1CFB925B006EFB43 /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 976042281CFB925B006EFB43 /* app.flx */; };
|
||||
9760422D1CFB925B006EFB43 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9760422A1CFB925B006EFB43 /* Flutter.framework */; };
|
||||
9760422E1CFB92B0006EFB43 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9760422A1CFB925B006EFB43 /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
9766DC6F1CFB93D50041C027 /* app.dylib in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9766DC6D1CFB93C80041C027 /* app.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
|
||||
9E07CFA91BE8280A00BCD8DE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9E07CFA81BE8280A00BCD8DE /* Assets.xcassets */; };
|
||||
9E07CFBA1BE82DFF00BCD8DE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E07CF9D1BE8280A00BCD8DE /* main.m */; };
|
||||
9EA2FB801C6D2D6B00670B03 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9EA2FB7F1C6D2D6B00670B03 /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9E07CFB91BE82D2600BCD8DE /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
9766DC6F1CFB93D50041C027 /* app.dylib in Embed Frameworks */,
|
||||
9760422E1CFB92B0006EFB43 /* Flutter.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
976042261CFB91C5006EFB43 /* Flutter.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Flutter.xcconfig; path = Flutter/Flutter.xcconfig; sourceTree = "<group>"; };
|
||||
976042281CFB925B006EFB43 /* app.flx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = app.flx; path = Flutter/app.flx; sourceTree = "<group>"; };
|
||||
9760422A1CFB925B006EFB43 /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
|
||||
9766DC6D1CFB93C80041C027 /* app.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = app.dylib; path = Flutter/app.dylib; sourceTree = "<group>"; };
|
||||
9E07CF9A1BE8280A00BCD8DE /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9E07CF9D1BE8280A00BCD8DE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
9E07CFA81BE8280A00BCD8DE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = ../Assets.xcassets; sourceTree = SOURCE_ROOT; };
|
||||
9E07CFAD1BE8280A00BCD8DE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../Info.plist; sourceTree = SOURCE_ROOT; };
|
||||
9EA2FB7F1C6D2D6B00670B03 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ../LaunchScreen.storyboard; sourceTree = SOURCE_ROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
9E07CF971BE8280A00BCD8DE /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9760422D1CFB925B006EFB43 /* Flutter.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
976042251CFB918B006EFB43 /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9766DC6D1CFB93C80041C027 /* app.dylib */,
|
||||
976042281CFB925B006EFB43 /* app.flx */,
|
||||
9760422A1CFB925B006EFB43 /* Flutter.framework */,
|
||||
976042261CFB91C5006EFB43 /* Flutter.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9E07CF7C1BE7F4D200BCD8DE = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
976042251CFB918B006EFB43 /* Flutter */,
|
||||
9E07CF9B1BE8280A00BCD8DE /* Runner */,
|
||||
9E07CF871BE7F4D200BCD8DE /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9E07CF871BE7F4D200BCD8DE /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9E07CF9A1BE8280A00BCD8DE /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9E07CF9B1BE8280A00BCD8DE /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9E07CFA81BE8280A00BCD8DE /* Assets.xcassets */,
|
||||
9EA2FB7F1C6D2D6B00670B03 /* LaunchScreen.storyboard */,
|
||||
9E07CFAD1BE8280A00BCD8DE /* Info.plist */,
|
||||
9E07CF9C1BE8280A00BCD8DE /* Supporting Files */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9E07CF9C1BE8280A00BCD8DE /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9E07CF9D1BE8280A00BCD8DE /* main.m */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
9E07CF991BE8280A00BCD8DE /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 9E07CFB01BE8280A00BCD8DE /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
977A86B01CF4C31F00432945 /* ShellScript */,
|
||||
9E07CF961BE8280A00BCD8DE /* Sources */,
|
||||
9E07CF971BE8280A00BCD8DE /* Frameworks */,
|
||||
9E07CF981BE8280A00BCD8DE /* Resources */,
|
||||
9E07CFB91BE82D2600BCD8DE /* Embed Frameworks */,
|
||||
9EA2FB831C6E940F00670B03 /* Copy Native Service Assets */,
|
||||
9E046CD71C9CA1AC00A1E391 /* Copy Extra Assets */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 9E07CF9A1BE8280A00BCD8DE /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
9E07CF7D1BE7F4D200BCD8DE /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0710;
|
||||
ORGANIZATIONNAME = Flutter;
|
||||
TargetAttributes = {
|
||||
9E07CF991BE8280A00BCD8DE = {
|
||||
CreatedOnToolsVersion = 7.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 9E07CF801BE7F4D200BCD8DE /* Build configuration list for PBXProject "FlutterApplication" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 9E07CF7C1BE7F4D200BCD8DE;
|
||||
productRefGroup = 9E07CF871BE7F4D200BCD8DE /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
9E07CF991BE8280A00BCD8DE /* Runner */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
9E07CF981BE8280A00BCD8DE /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9760422B1CFB925B006EFB43 /* app.flx in Resources */,
|
||||
976042271CFB91C5006EFB43 /* Flutter.xcconfig in Resources */,
|
||||
9EA2FB801C6D2D6B00670B03 /* LaunchScreen.storyboard in Resources */,
|
||||
9E07CFA91BE8280A00BCD8DE /* Assets.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
977A86B01CF4C31F00432945 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh";
|
||||
};
|
||||
9E046CD71C9CA1AC00A1E391 /* Copy Extra Assets */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Copy Extra Assets";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "RESOURCES_DIR=${SOURCE_ROOT}/../Resources\nAPPLICATION_BUNDLE=${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}\n\nshopt -s dotglob\n\nif [ -d \"${RESOURCES_DIR}\" ]; then\n ditto ${RESOURCES_DIR}/ ${APPLICATION_BUNDLE}\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9EA2FB831C6E940F00670B03 /* Copy Native Service Assets */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Copy Native Service Assets";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "SERVICE_FRAMEWORKS_DIR=${SOURCE_ROOT}/Frameworks\nSERVICE_DEFINITIONS=${SOURCE_ROOT}/ServiceDefinitions.json\nAPPLICATION_BUNDLE=${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}\n\n# Copy Service Dylibs\nif [ -d \"${SERVICE_FRAMEWORKS_DIR}\" ]; then\nditto ${SERVICE_FRAMEWORKS_DIR} ${APPLICATION_BUNDLE}/Frameworks\nfi\n\nif [[ -n \"${EXPANDED_CODE_SIGN_IDENTITY}\" ]]; then\n\n# Codesign Service Dylibs if an identity is provided.\nDYLIBS=\"${APPLICATION_BUNDLE}/Frameworks/*.dylib\"\nfor dylib in $DYLIBS; do\nxcrun codesign \\\n --force \\\n --sign ${EXPANDED_CODE_SIGN_IDENTITY} \\\n --preserve-metadata=identifier,entitlements \\\n --timestamp=none \\\n \"${dylib}\" \\\n\ndone\n\nfi\n\n# Copy Service Definitions\nif [ -f \"${SERVICE_DEFINITIONS}\" ]; then\ncp ${SERVICE_DEFINITIONS} ${APPLICATION_BUNDLE}/\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
9E07CF961BE8280A00BCD8DE /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9E07CFBA1BE82DFF00BCD8DE /* main.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
9E07CF8C1BE7F4D200BCD8DE /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
9E07CF8D1BE7F4D200BCD8DE /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
9E07CFAE1BE8280A00BCD8DE /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Tools/common",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = ../Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/FlutterApplication/Generated",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
9E07CFAF1BE8280A00BCD8DE /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 976042261CFB91C5006EFB43 /* Flutter.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Tools/common",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = ../Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/FlutterApplication/Generated",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
9E07CF801BE7F4D200BCD8DE /* Build configuration list for PBXProject "FlutterApplication" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
9E07CF8C1BE7F4D200BCD8DE /* Debug */,
|
||||
9E07CF8D1BE7F4D200BCD8DE /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
9E07CFB01BE8280A00BCD8DE /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
9E07CFAE1BE8280A00BCD8DE /* Debug */,
|
||||
9E07CFAF1BE8280A00BCD8DE /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 9E07CF7D1BE7F4D200BCD8DE /* Project object */;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:FlutterApplication.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9E07CF991BE8280A00BCD8DE"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:FlutterApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9E07CF991BE8280A00BCD8DE"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:FlutterApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</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">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9E07CF991BE8280A00BCD8DE"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:FlutterApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
<CommandLineArgument
|
||||
argument = "--no-redirect-to-syslog"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "--observatory-port=8181"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
</CommandLineArguments>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9E07CF991BE8280A00BCD8DE"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:FlutterApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9E07CF851BE7F4D200BCD8DE"
|
||||
BuildableName = "FlutterApplication.framework"
|
||||
BlueprintName = "FlutterApplication"
|
||||
ReferencedContainer = "container:FlutterApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</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">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9E07CF851BE7F4D200BCD8DE"
|
||||
BuildableName = "FlutterApplication.framework"
|
||||
BlueprintName = "FlutterApplication"
|
||||
ReferencedContainer = "container:FlutterApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "9E07CF851BE7F4D200BCD8DE"
|
||||
BuildableName = "FlutterApplication.framework"
|
||||
BlueprintName = "FlutterApplication"
|
||||
ReferencedContainer = "container:FlutterApplication.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -0,0 +1,14 @@
|
||||
<?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>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>9E07CF991BE8280A00BCD8DE</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
12
packages/flutter_tools/templates/build-ios/Runner/main.m
Normal file
12
packages/flutter_tools/templates/build-ios/Runner/main.m
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright 2016 The Chromium 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>
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
FlutterInit(argc, argv);
|
||||
return UIApplicationMain(argc, (char**)argv, nil,
|
||||
NSStringFromClass([FlutterAppDelegate class]));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user