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
36a7c657
Commit
36a7c657
authored
Feb 17, 2016
by
Chinmay Garde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Perform an engine version check on start and update the Xcode project if necessary
parent
77103c01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
device_ios.dart
packages/flutter_tools/lib/src/ios/device_ios.dart
+2
-2
setup_xcodeproj.dart
packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart
+19
-0
No files found.
packages/flutter_tools/lib/src/ios/device_ios.dart
View file @
36a7c657
...
...
@@ -560,8 +560,8 @@ String _getIOSEngineRevision(ApplicationPackage app) {
}
Future
<
bool
>
_buildIOSXcodeProject
(
ApplicationPackage
app
,
{
bool
buildForDevice
})
async
{
if
(
!
FileSystemEntity
.
isDirectorySync
(
app
.
localPath
))
{
printTrace
(
'
Path "
${path.absolute(app.localPath)}
" does not exist.
Initializing the Xcode project.'
);
if
(
xcodeProjectRequiresUpdate
(
))
{
printTrace
(
'Initializing the Xcode project.'
);
if
((
await
setupXcodeProjectHarness
())
!=
0
)
{
printError
(
'Could not initialize the Xcode project.'
);
return
false
;
...
...
packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart
View file @
36a7c657
...
...
@@ -111,6 +111,25 @@ void _setupXcodeProjXcconfig(String filePath) {
localsFile
.
writeAsStringSync
(
localsBuffer
.
toString
());
}
bool
xcodeProjectRequiresUpdate
(
)
{
File
revisionFile
=
new
File
(
path
.
join
(
Directory
.
current
.
path
,
'ios'
,
'.generated'
,
'REVISION'
));
// If the revision stamp does not exist, the Xcode project definitely requires
// an update
if
(!
revisionFile
.
existsSync
())
{
printTrace
(
"A revision stamp does not exist. The Xcode project has never been initialized."
);
return
true
;
}
if
(
revisionFile
.
readAsStringSync
()
!=
ArtifactStore
.
engineRevision
)
{
printTrace
(
"The revision stamp and the Flutter engine revision differ. Project needs to be updated."
);
return
true
;
}
printTrace
(
"Xcode project is up to date."
);
return
false
;
}
Future
<
int
>
setupXcodeProjectHarness
()
async
{
// Step 1: Fetch the archive from the cloud
String
iosFilesPath
=
path
.
join
(
Directory
.
current
.
path
,
'ios'
);
...
...
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