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
5f44b2d4
Commit
5f44b2d4
authored
Aug 23, 2016
by
Todd Volkert
Committed by
GitHub
Aug 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make `flutter build ios --simulator` default to debug builds (#5540)
parent
bfbbef10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
build_ios.dart
packages/flutter_tools/lib/src/commands/build_ios.dart
+12
-2
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+5
-1
No files found.
packages/flutter_tools/lib/src/commands/build_ios.dart
View file @
5f44b2d4
...
...
@@ -17,7 +17,15 @@ import 'build.dart';
class
BuildIOSCommand
extends
BuildSubCommand
{
BuildIOSCommand
()
{
usesTargetOption
();
addBuildModeFlags
();
argParser
.
addFlag
(
'debug'
,
negatable:
false
,
help:
'Build a debug version of your app (default mode for iOS simulator builds).'
);
argParser
.
addFlag
(
'profile'
,
negatable:
false
,
help:
'Build a version of your app specialized for performance profiling.'
);
argParser
.
addFlag
(
'release'
,
negatable:
false
,
help:
'Build a release version of your app (default mode for device builds).'
);
argParser
.
addFlag
(
'simulator'
,
help:
'Build for the iOS simulator instead of the device.'
);
argParser
.
addFlag
(
'codesign'
,
negatable:
true
,
defaultsTo:
true
,
help:
'Codesign the application bundle (only available on device builds).'
);
...
...
@@ -31,6 +39,9 @@ class BuildIOSCommand extends BuildSubCommand {
@override
Future
<
int
>
runInProject
()
async
{
bool
forSimulator
=
argResults
[
'simulator'
];
defaultBuildMode
=
forSimulator
?
BuildMode
.
debug
:
BuildMode
.
release
;
await
super
.
runInProject
();
if
(
getCurrentHostPlatform
()
!=
HostPlatform
.
darwin_x64
)
{
printError
(
'Building for iOS is only supported on the Mac.'
);
...
...
@@ -44,7 +55,6 @@ class BuildIOSCommand extends BuildSubCommand {
return
1
;
}
bool
forSimulator
=
argResults
[
'simulator'
];
bool
shouldCodesign
=
argResults
[
'codesign'
];
if
(!
forSimulator
&&
!
shouldCodesign
)
{
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
5f44b2d4
...
...
@@ -70,7 +70,7 @@ abstract class FlutterCommand extends Command {
}
void
addBuildModeFlags
({
bool
defaultToRelease:
true
})
{
_
defaultBuildMode
=
defaultToRelease
?
BuildMode
.
release
:
BuildMode
.
debug
;
defaultBuildMode
=
defaultToRelease
?
BuildMode
.
release
:
BuildMode
.
debug
;
argParser
.
addFlag
(
'debug'
,
negatable:
false
,
...
...
@@ -83,6 +83,10 @@ abstract class FlutterCommand extends Command {
help:
'Build a release version of your app
${defaultToRelease ? ' (default mode)' : ''}
.'
);
}
set
defaultBuildMode
(
BuildMode
buildMode
)
{
_defaultBuildMode
=
buildMode
;
}
BuildMode
getBuildMode
()
{
List
<
bool
>
modeFlags
=
<
bool
>[
argResults
[
'debug'
],
argResults
[
'profile'
],
argResults
[
'release'
]];
if
(
modeFlags
.
where
((
bool
flag
)
=>
flag
).
length
>
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