Skip to content

Commit

Permalink
Fix iOS project by updating the Podfile to latest Flutter master.
Browse files Browse the repository at this point in the history
  • Loading branch information
Iiro Krankka committed May 28, 2018
1 parent 639f590 commit 409f43c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 34 deletions.
15 changes: 7 additions & 8 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ end
target 'Runner' do
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf Pods/.symlinks')
system('mkdir -p Pods/.symlinks/flutter')
system('mkdir -p Pods/.symlinks/plugins')
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')

# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
Expand All @@ -40,16 +39,16 @@ target 'Runner' do
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('Pods', '.symlinks', 'flutter', File.basename(p[:path]))
File.symlink(p[:path], symlink)
pod 'Flutter', :path => symlink
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}

# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('Pods', '.symlinks', 'plugins', File.basename(p[:path]))
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
Expand All @@ -61,4 +60,4 @@ post_install do |installer|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
end
36 changes: 10 additions & 26 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
8F9BD0135D9E0D3E2D80022E /* [CP] Embed Pods Frameworks */,
83DCF2B1EAD4FD9CDE4631F4 /* [CP] Copy Pods Resources */,
1C6B0672594D338BE5F1EF58 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -223,52 +222,37 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
83DCF2B1EAD4FD9CDE4631F4 /* [CP] Copy Pods Resources */ = {
1C6B0672594D338BE5F1EF58 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
);
name = "[CP] Copy Pods Resources";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
8F9BD0135D9E0D3E2D80022E /* [CP] Embed Pods Frameworks */ = {
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/.symlinks/flutter/ios/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
name = "Thin Binary";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
Expand Down

0 comments on commit 409f43c

Please sign in to comment.