Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
978973fa
Commit
978973fa
authored
Feb 12, 2016
by
Chinmay Garde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iOS: Inflate the Xcode project into a "Generated" subdirectory
parent
cd96855e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
ios.dart
packages/flutter_tools/lib/src/commands/ios.dart
+7
-4
No files found.
packages/flutter_tools/lib/src/commands/ios.dart
View file @
978973fa
...
...
@@ -59,6 +59,11 @@ class IOSCommand extends FlutterCommand {
tempFile
.
writeAsBytesSync
(
archiveBytes
);
try
{
// Remove the old generated project if one is present
runCheckedSync
([
'/bin/rm'
,
'-rf'
,
directory
]);
// Create the directory so unzip can write to it
runCheckedSync
([
'/bin/mkdir'
,
'-p'
,
directory
]);
// Unzip the Xcode project into the new empty directory
runCheckedSync
([
'/usr/bin/unzip'
,
tempFile
.
path
,
'-d'
,
directory
]);
}
catch
(
error
)
{
return
false
;
...
...
@@ -111,7 +116,7 @@ class IOSCommand extends FlutterCommand {
Future
<
int
>
_runInitCommand
()
async
{
// Step 1: Fetch the archive from the cloud
String
xcodeprojPath
=
path
.
join
(
Directory
.
current
.
path
,
"ios"
);
String
xcodeprojPath
=
path
.
join
(
Directory
.
current
.
path
,
"ios"
,
"Generated"
);
List
<
int
>
archiveBytes
=
await
_fetchXcodeArchive
();
if
(
archiveBytes
.
isEmpty
)
{
...
...
@@ -122,9 +127,7 @@ class IOSCommand extends FlutterCommand {
// Step 2: Inflate the archive into the user project directory
bool
result
=
await
_inflateXcodeArchive
(
xcodeprojPath
,
archiveBytes
);
if
(!
result
)
{
printError
(
"Error: Could not init the Xcode project: the 'ios' directory already exists."
);
printError
(
"To proceed, remove the 'ios' directory and try again."
);
printError
(
"Warning: You may have made manual changes to files in the 'ios' directory."
);
printError
(
"Could not inflate the Xcode project archive."
);
return
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment