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
67b2ca89
Unverified
Commit
67b2ca89
authored
Mar 03, 2021
by
Jenn Magder
Committed by
GitHub
Mar 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update minimum required version to Xcode 12 (#77025)
parent
679b8c29
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
103 deletions
+23
-103
code_signing.dart
packages/flutter_tools/lib/src/ios/code_signing.dart
+1
-3
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+1
-1
remove_framework_link_and_embedding_migration.dart
...ations/remove_framework_link_and_embedding_migration.dart
+3
-11
xcode.dart
packages/flutter_tools/lib/src/macos/xcode.dart
+5
-2
ios_project_migration_test.dart
...ls/test/general.shard/ios/ios_project_migration_test.dart
+0
-73
xcode_test.dart
...es/flutter_tools/test/general.shard/macos/xcode_test.dart
+9
-9
xcode_validator_test.dart
..._tools/test/general.shard/macos/xcode_validator_test.dart
+1
-1
context.dart
packages/flutter_tools/test/src/context.dart
+3
-3
No files found.
packages/flutter_tools/lib/src/ios/code_signing.dart
View file @
67b2ca89
...
@@ -72,9 +72,7 @@ const String fixWithDevelopmentTeamInstruction = '''
...
@@ -72,9 +72,7 @@ const String fixWithDevelopmentTeamInstruction = '''
open
ios
/
Runner
.
xcworkspace
open
ios
/
Runner
.
xcworkspace
2
-
Select
the
'Runner'
project
in
the
navigator
then
the
'Runner'
target
2
-
Select
the
'Runner'
project
in
the
navigator
then
the
'Runner'
target
in
the
project
settings
in
the
project
settings
3
-
Make
sure
a
'Development Team'
is
selected
.
\
u0020
3
-
Make
sure
a
'Development Team'
is
selected
under
Signing
&
Capabilities
>
Team
.
\
u0020
-
For
Xcode
10
,
look
under
General
>
Signing
>
Team
.
-
For
Xcode
11
and
newer
,
look
under
Signing
&
Capabilities
>
Team
.
You
may
need
to:
You
may
need
to:
-
Log
in
with
your
Apple
ID
in
Xcode
first
-
Log
in
with
your
Apple
ID
in
Xcode
first
-
Ensure
you
have
a
valid
unique
Bundle
ID
-
Ensure
you
have
a
valid
unique
Bundle
ID
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
67b2ca89
...
@@ -106,7 +106,7 @@ Future<XcodeBuildResult> buildXcodeProject({
...
@@ -106,7 +106,7 @@ Future<XcodeBuildResult> buildXcodeProject({
}
}
final
List
<
ProjectMigrator
>
migrators
=
<
ProjectMigrator
>[
final
List
<
ProjectMigrator
>
migrators
=
<
ProjectMigrator
>[
RemoveFrameworkLinkAndEmbeddingMigration
(
app
.
project
,
globals
.
logger
,
globals
.
xcode
,
globals
.
flutterUsage
),
RemoveFrameworkLinkAndEmbeddingMigration
(
app
.
project
,
globals
.
logger
,
globals
.
flutterUsage
),
XcodeBuildSystemMigration
(
app
.
project
,
globals
.
logger
),
XcodeBuildSystemMigration
(
app
.
project
,
globals
.
logger
),
ProjectBaseConfigurationMigration
(
app
.
project
,
globals
.
logger
),
ProjectBaseConfigurationMigration
(
app
.
project
,
globals
.
logger
),
ProjectBuildLocationMigration
(
app
.
project
,
globals
.
logger
),
ProjectBuildLocationMigration
(
app
.
project
,
globals
.
logger
),
...
...
packages/flutter_tools/lib/src/ios/migrations/remove_framework_link_and_embedding_migration.dart
View file @
67b2ca89
...
@@ -8,8 +8,6 @@ import '../../base/common.dart';
...
@@ -8,8 +8,6 @@ import '../../base/common.dart';
import
'../../base/file_system.dart'
;
import
'../../base/file_system.dart'
;
import
'../../base/logger.dart'
;
import
'../../base/logger.dart'
;
import
'../../base/project_migrator.dart'
;
import
'../../base/project_migrator.dart'
;
import
'../../base/version.dart'
;
import
'../../macos/xcode.dart'
;
import
'../../project.dart'
;
import
'../../project.dart'
;
import
'../../reporting/reporting.dart'
;
import
'../../reporting/reporting.dart'
;
...
@@ -20,15 +18,12 @@ class RemoveFrameworkLinkAndEmbeddingMigration extends ProjectMigrator {
...
@@ -20,15 +18,12 @@ class RemoveFrameworkLinkAndEmbeddingMigration extends ProjectMigrator {
RemoveFrameworkLinkAndEmbeddingMigration
(
RemoveFrameworkLinkAndEmbeddingMigration
(
IosProject
project
,
IosProject
project
,
Logger
logger
,
Logger
logger
,
Xcode
xcode
,
Usage
usage
,
Usage
usage
,
)
:
_xcodeProjectInfoFile
=
project
.
xcodeProjectInfoFile
,
)
:
_xcodeProjectInfoFile
=
project
.
xcodeProjectInfoFile
,
_xcode
=
xcode
,
_usage
=
usage
,
_usage
=
usage
,
super
(
logger
);
super
(
logger
);
final
File
_xcodeProjectInfoFile
;
final
File
_xcodeProjectInfoFile
;
final
Xcode
_xcode
;
final
Usage
_usage
;
final
Usage
_usage
;
@override
@override
...
@@ -100,13 +95,10 @@ class RemoveFrameworkLinkAndEmbeddingMigration extends ProjectMigrator {
...
@@ -100,13 +95,10 @@ class RemoveFrameworkLinkAndEmbeddingMigration extends ProjectMigrator {
}
}
if
(
line
.
contains
(
'/* App.framework '
)
||
line
.
contains
(
'/* Flutter.framework '
))
{
if
(
line
.
contains
(
'/* App.framework '
)
||
line
.
contains
(
'/* Flutter.framework '
))
{
// Print scary message if the user is on Xcode 11.4 or greater, or if Xcode isn't installed.
// Print scary message.
final
bool
xcodeIsInstalled
=
_xcode
.
isInstalled
;
if
(!
xcodeIsInstalled
||
_xcode
.
currentVersion
>=
Version
(
11
,
4
,
0
))
{
UsageEvent
(
'ios-migration'
,
'remove-frameworks'
,
label:
'failure'
,
flutterUsage:
_usage
).
send
();
UsageEvent
(
'ios-migration'
,
'remove-frameworks'
,
label:
'failure'
,
flutterUsage:
_usage
).
send
();
throwToolExit
(
'Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.'
);
throwToolExit
(
'Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.'
);
}
}
}
return
line
;
return
line
;
}
}
...
...
packages/flutter_tools/lib/src/macos/xcode.dart
View file @
67b2ca89
...
@@ -29,8 +29,11 @@ import '../ios/mac.dart';
...
@@ -29,8 +29,11 @@ import '../ios/mac.dart';
import
'../ios/xcodeproj.dart'
;
import
'../ios/xcodeproj.dart'
;
import
'../reporting/reporting.dart'
;
import
'../reporting/reporting.dart'
;
Version
get
xcodeRequiredVersion
=>
Version
(
11
,
0
,
0
,
text:
'11.0'
);
Version
get
xcodeRequiredVersion
=>
Version
(
12
,
0
,
1
,
text:
'12.0.1'
);
Version
get
xcodeRecommendedVersion
=>
Version
(
12
,
0
,
1
,
text:
'12.0.1'
);
/// Diverging this number from the minimum required version will provide a doctor
/// warning, not error, that users should upgrade Xcode.
Version
get
xcodeRecommendedVersion
=>
xcodeRequiredVersion
;
/// SDK name passed to `xcrun --sdk`. Corresponds to undocumented Xcode
/// SDK name passed to `xcrun --sdk`. Corresponds to undocumented Xcode
/// SUPPORTED_PLATFORMS values.
/// SUPPORTED_PLATFORMS values.
...
...
packages/flutter_tools/test/general.shard/ios/ios_project_migration_test.dart
View file @
67b2ca89
...
@@ -8,12 +8,10 @@ import 'package:file/file.dart';
...
@@ -8,12 +8,10 @@ import 'package:file/file.dart';
import
'package:file/memory.dart'
;
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/project_migrator.dart'
;
import
'package:flutter_tools/src/base/project_migrator.dart'
;
import
'package:flutter_tools/src/base/version.dart'
;
import
'package:flutter_tools/src/ios/migrations/project_base_configuration_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/project_base_configuration_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/project_build_location_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/project_build_location_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/remove_framework_link_and_embedding_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/remove_framework_link_and_embedding_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/xcode_build_system_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/xcode_build_system_migration.dart'
;
import
'package:flutter_tools/src/macos/xcode.dart'
;
import
'package:flutter_tools/src/project.dart'
;
import
'package:flutter_tools/src/project.dart'
;
import
'package:flutter_tools/src/reporting/reporting.dart'
;
import
'package:flutter_tools/src/reporting/reporting.dart'
;
import
'package:meta/meta.dart'
;
import
'package:meta/meta.dart'
;
...
@@ -45,11 +43,9 @@ void main () {
...
@@ -45,11 +43,9 @@ void main () {
BufferLogger
testLogger
;
BufferLogger
testLogger
;
MockIosProject
mockIosProject
;
MockIosProject
mockIosProject
;
File
xcodeProjectInfoFile
;
File
xcodeProjectInfoFile
;
MockXcode
mockXcode
;
setUp
(()
{
setUp
(()
{
memoryFileSystem
=
MemoryFileSystem
.
test
();
memoryFileSystem
=
MemoryFileSystem
.
test
();
mockXcode
=
MockXcode
();
xcodeProjectInfoFile
=
memoryFileSystem
.
file
(
'project.pbxproj'
);
xcodeProjectInfoFile
=
memoryFileSystem
.
file
(
'project.pbxproj'
);
testLogger
=
BufferLogger
.
test
();
testLogger
=
BufferLogger
.
test
();
mockIosProject
=
MockIosProject
();
mockIosProject
=
MockIosProject
();
...
@@ -60,7 +56,6 @@ void main () {
...
@@ -60,7 +56,6 @@ void main () {
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
mockIosProject
,
testLogger
,
testLogger
,
mockXcode
,
testUsage
testUsage
);
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
...
@@ -80,7 +75,6 @@ void main () {
...
@@ -80,7 +75,6 @@ void main () {
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
mockIosProject
,
testLogger
,
testLogger
,
mockXcode
,
testUsage
,
testUsage
,
);
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
...
@@ -101,7 +95,6 @@ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.
...
@@ -101,7 +95,6 @@ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
mockIosProject
,
testLogger
,
testLogger
,
mockXcode
,
testUsage
,
testUsage
,
);
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
...
@@ -129,7 +122,6 @@ keep this 2
...
@@ -129,7 +122,6 @@ keep this 2
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
mockIosProject
,
testLogger
,
testLogger
,
mockXcode
,
testUsage
,
testUsage
,
);
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
...
@@ -147,13 +139,10 @@ keep this 2
...
@@ -147,13 +139,10 @@ keep this 2
xcodeProjectInfoFile
.
writeAsStringSync
(
'''
xcodeProjectInfoFile
.
writeAsStringSync
(
'''
746232531E83B71900CC1A5E /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746232521E83B71900CC1A5E /* App.framework */; };
746232531E83B71900CC1A5E /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746232521E83B71900CC1A5E /* App.framework */; };
'''
);
'''
);
when
(
mockXcode
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcode
.
currentVersion
).
thenReturn
(
Version
(
11
,
4
,
0
));
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
mockIosProject
,
testLogger
,
testLogger
,
mockXcode
,
testUsage
,
testUsage
,
);
);
...
@@ -167,13 +156,10 @@ keep this 2
...
@@ -167,13 +156,10 @@ keep this 2
xcodeProjectInfoFile
.
writeAsStringSync
(
'''
xcodeProjectInfoFile
.
writeAsStringSync
(
'''
9705A1C71CF904A300538480 /* Flutter.framework in Embed Frameworks */,
9705A1C71CF904A300538480 /* Flutter.framework in Embed Frameworks */,
'''
);
'''
);
when
(
mockXcode
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcode
.
currentVersion
).
thenReturn
(
Version
(
11
,
4
,
0
));
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
mockIosProject
,
testLogger
,
testLogger
,
mockXcode
,
testUsage
,
testUsage
,
);
);
expect
(
iosProjectMigration
.
migrate
,
throwsToolExit
(
message:
'Your Xcode project requires migration'
));
expect
(
iosProjectMigration
.
migrate
,
throwsToolExit
(
message:
'Your Xcode project requires migration'
));
...
@@ -186,68 +172,10 @@ keep this 2
...
@@ -186,68 +172,10 @@ keep this 2
xcodeProjectInfoFile
.
writeAsStringSync
(
'''
xcodeProjectInfoFile
.
writeAsStringSync
(
'''
746232531E83B71900CC1A5E /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746232521E83B71900CC1A5E /* App.framework */; };
746232531E83B71900CC1A5E /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746232521E83B71900CC1A5E /* App.framework */; };
'''
);
'''
);
when
(
mockXcode
.
isInstalled
).
thenReturn
(
false
);
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
mockIosProject
,
testLogger
,
testLogger
,
mockXcode
,
testUsage
,
);
expect
(
iosProjectMigration
.
migrate
,
throwsToolExit
(
message:
'Your Xcode project requires migration'
));
expect
(
testUsage
.
events
,
contains
(
const
TestUsageEvent
(
'ios-migration'
,
'remove-frameworks'
,
label:
'failure'
),
));
});
testWithoutContext
(
'migration fails on Xcode < 11.4'
,
()
{
xcodeProjectInfoFile
.
writeAsStringSync
(
'''
746232531E83B71900CC1A5E /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746232521E83B71900CC1A5E /* App.framework */; };
'''
);
when
(
mockXcode
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcode
.
currentVersion
).
thenReturn
(
Version
(
11
,
3
,
0
));
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
testLogger
,
mockXcode
,
testUsage
,
);
expect
(
iosProjectMigration
.
migrate
(),
isTrue
);
expect
(
testUsage
.
events
,
isEmpty
);
expect
(
testLogger
.
errorText
,
isEmpty
);
});
testWithoutContext
(
'migration fails on Xcode 11.4'
,
()
{
xcodeProjectInfoFile
.
writeAsStringSync
(
'''
746232531E83B71900CC1A5E /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746232521E83B71900CC1A5E /* App.framework */; };
'''
);
when
(
mockXcode
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcode
.
currentVersion
).
thenReturn
(
Version
(
11
,
4
,
0
));
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
testLogger
,
mockXcode
,
testUsage
,
);
expect
(
iosProjectMigration
.
migrate
,
throwsToolExit
(
message:
'Your Xcode project requires migration'
));
expect
(
testUsage
.
events
,
contains
(
const
TestUsageEvent
(
'ios-migration'
,
'remove-frameworks'
,
label:
'failure'
),
));
});
testWithoutContext
(
'migration fails on Xcode 12,0'
,
()
{
xcodeProjectInfoFile
.
writeAsStringSync
(
'''
746232531E83B71900CC1A5E /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 746232521E83B71900CC1A5E /* App.framework */; };
'''
);
when
(
mockXcode
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcode
.
currentVersion
).
thenReturn
(
Version
(
12
,
0
,
0
));
final
RemoveFrameworkLinkAndEmbeddingMigration
iosProjectMigration
=
RemoveFrameworkLinkAndEmbeddingMigration
(
mockIosProject
,
testLogger
,
mockXcode
,
testUsage
,
testUsage
,
);
);
expect
(
iosProjectMigration
.
migrate
,
throwsToolExit
(
message:
'Your Xcode project requires migration'
));
expect
(
iosProjectMigration
.
migrate
,
throwsToolExit
(
message:
'Your Xcode project requires migration'
));
...
@@ -565,7 +493,6 @@ keep this 3
...
@@ -565,7 +493,6 @@ keep this 3
}
}
class
MockIosProject
extends
Mock
implements
IosProject
{}
class
MockIosProject
extends
Mock
implements
IosProject
{}
class
MockXcode
extends
Mock
implements
Xcode
{}
class
FakeIOSMigrator
extends
ProjectMigrator
{
class
FakeIOSMigrator
extends
ProjectMigrator
{
FakeIOSMigrator
({
@required
this
.
succeeds
})
FakeIOSMigrator
({
@required
this
.
succeeds
})
...
...
packages/flutter_tools/test/general.shard/macos/xcode_test.dart
View file @
67b2ca89
...
@@ -151,16 +151,16 @@ void main() {
...
@@ -151,16 +151,16 @@ void main() {
testWithoutContext
(
'xcodeVersionSatisfactory is true when version meets minimum'
,
()
{
testWithoutContext
(
'xcodeVersionSatisfactory is true when version meets minimum'
,
()
{
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
1
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
2
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
1
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
});
});
testWithoutContext
(
'xcodeVersionSatisfactory is true when major version exceeds minimum'
,
()
{
testWithoutContext
(
'xcodeVersionSatisfactory is true when major version exceeds minimum'
,
()
{
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
2
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
3
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
0
);
...
@@ -169,7 +169,7 @@ void main() {
...
@@ -169,7 +169,7 @@ void main() {
testWithoutContext
(
'xcodeVersionSatisfactory is true when minor version exceeds minimum'
,
()
{
testWithoutContext
(
'xcodeVersionSatisfactory is true when minor version exceeds minimum'
,
()
{
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
1
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
2
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
3
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
3
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
0
);
...
@@ -178,16 +178,16 @@ void main() {
...
@@ -178,16 +178,16 @@ void main() {
testWithoutContext
(
'xcodeVersionSatisfactory is true when patch version exceeds minimum'
,
()
{
testWithoutContext
(
'xcodeVersionSatisfactory is true when patch version exceeds minimum'
,
()
{
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
1
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
2
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
1
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
2
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
});
});
testWithoutContext
(
'isRecommendedVersionSatisfactory is false when version is less than minimum'
,
()
{
testWithoutContext
(
'isRecommendedVersionSatisfactory is false when version is less than minimum'
,
()
{
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
9
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
11
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
0
);
...
@@ -255,9 +255,9 @@ void main() {
...
@@ -255,9 +255,9 @@ void main() {
testWithoutContext
(
'isInstalledAndMeetsVersionCheck is true when macOS and installed and version is satisfied'
,
()
{
testWithoutContext
(
'isInstalledAndMeetsVersionCheck is true when macOS and installed and version is satisfied'
,
()
{
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
1
);
when
(
mockXcodeProjectInterpreter
.
majorVersion
).
thenReturn
(
1
2
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
minorVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
0
);
when
(
mockXcodeProjectInterpreter
.
patchVersion
).
thenReturn
(
1
);
expect
(
xcode
.
isInstalledAndMeetsVersionCheck
,
isTrue
);
expect
(
xcode
.
isInstalledAndMeetsVersionCheck
,
isTrue
);
expect
(
fakeProcessManager
.
hasRemainingExpectations
,
isFalse
);
expect
(
fakeProcessManager
.
hasRemainingExpectations
,
isFalse
);
...
...
packages/flutter_tools/test/general.shard/macos/xcode_validator_test.dart
View file @
67b2ca89
...
@@ -69,7 +69,7 @@ void main() {
...
@@ -69,7 +69,7 @@ void main() {
expect
(
result
.
type
,
ValidationType
.
partial
);
expect
(
result
.
type
,
ValidationType
.
partial
);
expect
(
result
.
messages
.
last
.
type
,
ValidationMessageType
.
hint
);
expect
(
result
.
messages
.
last
.
type
,
ValidationMessageType
.
hint
);
expect
(
result
.
messages
.
last
.
message
,
contains
(
'Xcode 11.0.0 out of date (12.0.1 is recommended)'
));
expect
(
result
.
messages
.
last
.
message
,
contains
(
'Xcode 11.0.0 out of date (12.0.1 is recommended)'
));
}
);
}
,
skip:
true
);
// Unskip and update when minimum and required check versions diverge.
testWithoutContext
(
'Emits partial status when Xcode EULA not signed'
,
()
async
{
testWithoutContext
(
'Emits partial status when Xcode EULA not signed'
,
()
async
{
when
(
xcode
.
isInstalled
).
thenReturn
(
true
);
when
(
xcode
.
isInstalled
).
thenReturn
(
true
);
...
...
packages/flutter_tools/test/src/context.dart
View file @
67b2ca89
...
@@ -338,16 +338,16 @@ class FakeXcodeProjectInterpreter implements XcodeProjectInterpreter {
...
@@ -338,16 +338,16 @@ class FakeXcodeProjectInterpreter implements XcodeProjectInterpreter {
bool
get
isInstalled
=>
true
;
bool
get
isInstalled
=>
true
;
@override
@override
String
get
versionText
=>
'Xcode 1
1.0
'
;
String
get
versionText
=>
'Xcode 1
2.0.1
'
;
@override
@override
int
get
majorVersion
=>
1
1
;
int
get
majorVersion
=>
1
2
;
@override
@override
int
get
minorVersion
=>
0
;
int
get
minorVersion
=>
0
;
@override
@override
int
get
patchVersion
=>
0
;
int
get
patchVersion
=>
1
;
@override
@override
Future
<
Map
<
String
,
String
>>
getBuildSettings
(
Future
<
Map
<
String
,
String
>>
getBuildSettings
(
...
...
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