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
114185f6
Unverified
Commit
114185f6
authored
Jan 19, 2022
by
Jenn Magder
Committed by
GitHub
Jan 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass 'build ios' device ID into xcodebuild (#96669)
parent
25b2edbd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
build_ios.dart
packages/flutter_tools/lib/src/commands/build_ios.dart
+1
-0
build_ios_test.dart
...er_tools/test/commands.shard/hermetic/build_ios_test.dart
+35
-2
No files found.
packages/flutter_tools/lib/src/commands/build_ios.dart
View file @
114185f6
...
...
@@ -269,6 +269,7 @@ abstract class _BuildIOSSubCommand extends BuildSubCommand {
codesign:
shouldCodesign
,
configOnly:
configOnly
,
buildAction:
xcodeBuildAction
,
deviceID:
globals
.
deviceManager
?.
specifiedDeviceId
,
);
if
(!
result
.
success
)
{
...
...
packages/flutter_tools/test/commands.shard/hermetic/build_ios_test.dart
View file @
114185f6
...
...
@@ -112,7 +112,13 @@ void main() {
// Creates a FakeCommand for the xcodebuild call to build the app
// in the given configuration.
FakeCommand
_setUpFakeXcodeBuildHandler
({
bool
verbose
=
false
,
bool
simulator
=
false
,
int
exitCode
=
0
,
void
Function
()
onRun
})
{
FakeCommand
_setUpFakeXcodeBuildHandler
({
bool
verbose
=
false
,
bool
simulator
=
false
,
String
deviceId
,
int
exitCode
=
0
,
void
Function
()
onRun
,
})
{
return
FakeCommand
(
command:
<
String
>[
'xcrun'
,
...
...
@@ -132,10 +138,16 @@ void main() {
'-sdk'
,
if
(
simulator
)
...<
String
>[
'iphonesimulator'
,
]
else
...<
String
>[
'iphoneos'
,
],
if
(
deviceId
!=
null
)
...<
String
>[
'-destination'
,
'id=
$deviceId
'
,
]
else
if
(
simulator
)
...<
String
>[
'-destination'
,
'generic/platform=iOS Simulator'
,
]
else
...<
String
>[
'iphoneos'
,
'-destination'
,
'generic/platform=iOS'
,
],
...
...
@@ -220,6 +232,27 @@ void main() {
XcodeProjectInterpreter:
()
=>
FakeXcodeProjectInterpreterWithBuildSettings
(),
});
testUsingContext
(
'ios build invokes xcode build with device ID'
,
()
async
{
final
BuildCommand
command
=
BuildCommand
();
_createMinimalMockProjectFiles
();
await
createTestCommandRunner
(
command
).
run
(
const
<
String
>[
'build'
,
'ios'
,
'--no-pub'
,
'--device-id'
,
'1234'
]
);
expect
(
testLogger
.
statusText
,
contains
(
'build/ios/iphoneos/Runner.app'
));
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
FakeProcessManager
.
list
(<
FakeCommand
>[
xattrCommand
,
_setUpFakeXcodeBuildHandler
(
deviceId:
'1234'
,
onRun:
()
{
fileSystem
.
directory
(
'build/ios/Release-iphoneos/Runner.app'
).
createSync
(
recursive:
true
);
}),
_setUpRsyncCommand
(),
]),
Platform:
()
=>
macosPlatform
,
XcodeProjectInterpreter:
()
=>
FakeXcodeProjectInterpreterWithBuildSettings
(),
});
testUsingContext
(
'ios simulator build invokes xcode build'
,
()
async
{
final
BuildCommand
command
=
BuildCommand
();
_createMinimalMockProjectFiles
();
...
...
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