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
573eaf0b
Commit
573eaf0b
authored
Sep 16, 2016
by
Dan Rubel
Committed by
GitHub
Sep 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diagnost XCode signing errors and offer suggestions (#5913)
Fixes
https://github.com/flutter/flutter/issues/5775
parent
14054646
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
build_ios.dart
packages/flutter_tools/lib/src/commands/build_ios.dart
+2
-0
devices.dart
packages/flutter_tools/lib/src/ios/devices.dart
+5
-0
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+32
-3
No files found.
packages/flutter_tools/lib/src/commands/build_ios.dart
View file @
573eaf0b
...
...
@@ -82,6 +82,8 @@ class BuildIOSCommand extends BuildSubCommand {
if
(!
result
.
success
)
{
printError
(
'Encountered error while building for
$logTarget
.'
);
diagnoseXcodeBuildFailure
(
result
);
printError
(
''
);
return
1
;
}
...
...
packages/flutter_tools/lib/src/ios/devices.dart
View file @
573eaf0b
...
...
@@ -191,6 +191,8 @@ class IOSDevice extends Device {
XcodeBuildResult
buildResult
=
await
buildXcodeProject
(
app:
app
,
mode:
mode
,
target:
mainPath
,
buildForDevice:
true
);
if
(!
buildResult
.
success
)
{
printError
(
'Could not build the precompiled application for the device.'
);
diagnoseXcodeBuildFailure
(
buildResult
);
printError
(
''
);
return
new
LaunchResult
.
failed
();
}
...
...
@@ -281,6 +283,9 @@ class IOSDevice extends Device {
if
(
installationResult
!=
0
)
{
printError
(
'Could not install
${bundle.path}
on
$id
.'
);
printError
(
"Try launching XCode and selecting 'Product > Run' to fix the problem:"
);
printError
(
" open ios/Runner.xcodeproj"
);
printError
(
''
);
return
new
LaunchResult
.
failed
();
}
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
573eaf0b
...
...
@@ -163,7 +163,7 @@ Future<XcodeBuildResult> buildXcodeProject({
printStatus
(
result
.
stderr
);
if
(
result
.
stdout
.
isNotEmpty
)
printStatus
(
result
.
stdout
);
return
new
XcodeBuildResult
(
false
);
return
new
XcodeBuildResult
(
false
,
stdout:
result
.
stdout
,
stderr:
result
.
stderr
);
}
else
{
// Look for 'clean build/Release-iphoneos/Runner.app'.
RegExp
regexp
=
new
RegExp
(
r' clean (\S*\.app)$'
,
multiLine:
true
);
...
...
@@ -171,15 +171,44 @@ Future<XcodeBuildResult> buildXcodeProject({
String
outputDir
;
if
(
match
!=
null
)
outputDir
=
path
.
join
(
app
.
appDirectory
,
match
.
group
(
1
));
return
new
XcodeBuildResult
(
true
,
outputDir
);
return
new
XcodeBuildResult
(
true
,
output:
outputDir
);
}
}
void
diagnoseXcodeBuildFailure
(
XcodeBuildResult
result
)
{
File
plistFile
=
new
File
(
'ios/Runner/Info.plist'
);
if
(
plistFile
.
existsSync
())
{
String
plistContent
=
plistFile
.
readAsStringSync
();
if
(
plistContent
.
contains
(
'com.yourcompany'
))
{
printError
(
''
);
printError
(
'It appears that your application still contains the default signing identifier.'
);
printError
(
"Try replacing 'com.yourcompany' with your signing id"
);
printError
(
'in
${plistFile.absolute.path}
'
);
return
;
}
}
if
(
result
.
stdout
?.
contains
(
'Code Sign error'
)
==
true
)
{
printError
(
''
);
printError
(
'It appears that there was a problem signing your application prior to installation on the device.'
);
printError
(
''
);
if
(
plistFile
.
existsSync
())
{
printError
(
'Verify that the CFBundleIdentifier in the Info.plist file is your signing id'
);
printError
(
'
${plistFile.absolute.path}
'
);
printError
(
''
);
}
printError
(
"Try launching XCode and selecting 'Product > Build' to fix the problem:"
);
printError
(
" open ios/Runner.xcodeproj"
);
return
;
}
}
class
XcodeBuildResult
{
XcodeBuildResult
(
this
.
success
,
[
this
.
output
]
);
XcodeBuildResult
(
this
.
success
,
{
this
.
output
,
this
.
stdout
,
this
.
stderr
}
);
final
bool
success
;
final
String
output
;
final
String
stdout
;
final
String
stderr
;
}
final
RegExp
_xcodeVersionRegExp
=
new
RegExp
(
r'Xcode (\d+)\..*'
);
...
...
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