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
9862605f
Commit
9862605f
authored
Jan 25, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1367 from abarth/better_errors
Improve error messages for iOS workflow
parents
dbd39523
91e6b21e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
device_ios.dart
packages/flutter_tools/lib/src/ios/device_ios.dart
+28
-0
No files found.
packages/flutter_tools/lib/src/ios/device_ios.dart
View file @
9862605f
...
...
@@ -509,7 +509,35 @@ class _IOSSimulatorInfo {
_IOSSimulatorInfo
(
this
.
id
,
this
.
name
);
}
final
RegExp
_xcodeVersionRegExp
=
new
RegExp
(
r'Xcode (\d+)\..*'
);
final
String
_xcodeRequirement
=
'Xcode 7.0 or greater is required to develop for iOS.'
;
bool
_checkXcodeVersion
(
)
{
if
(!
Platform
.
isMacOS
)
return
false
;
try
{
String
version
=
runCheckedSync
([
'xcodebuild'
,
'-version'
]);
Match
match
=
_xcodeVersionRegExp
.
firstMatch
(
version
);
if
(
int
.
parse
(
match
[
1
])
<
7
)
{
logging
.
severe
(
'Found "
${match[0]}
".
$_xcodeRequirement
'
);
return
false
;
}
}
catch
(
e
)
{
logging
.
severe
(
'Cannot find "xcodebuid".
$_xcodeRequirement
'
);
return
false
;
}
return
true
;
}
Future
<
bool
>
_buildIOSXcodeProject
(
ApplicationPackage
app
,
bool
isDevice
)
async
{
if
(!
FileSystemEntity
.
isDirectorySync
(
app
.
localPath
))
{
logging
.
severe
(
'Path "
${path.absolute(app.localPath)}
" does not exist.
\n
Did you run `flutter ios --init`?'
);
return
false
;
}
if
(!
_checkXcodeVersion
())
return
false
;
List
<
String
>
command
=
[
'/usr/bin/env'
,
'xcrun'
,
'xcodebuild'
,
'-target'
,
'Runner'
,
'-configuration'
,
'Release'
];
...
...
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