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
273630c0
Unverified
Commit
273630c0
authored
Jan 07, 2021
by
Jenn Magder
Committed by
GitHub
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude arm64 from valid iOS simulators (#73458)
parent
d3a2db22
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
5 deletions
+47
-5
ios_content_validation_test.dart
dev/devicelab/bin/tasks/ios_content_validation_test.dart
+37
-0
podhelper.rb
packages/flutter_tools/bin/podhelper.rb
+3
-0
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+1
-1
xcodeproj.dart
packages/flutter_tools/lib/src/ios/xcodeproj.dart
+3
-0
xcodeproj_test.dart
.../flutter_tools/test/general.shard/ios/xcodeproj_test.dart
+2
-0
build_ios_config_only_test.dart
...ls/test/integration.shard/build_ios_config_only_test.dart
+1
-4
No files found.
dev/devicelab/bin/tasks/ios_content_validation_test.dart
View file @
273630c0
...
...
@@ -182,6 +182,43 @@ Future<void> main() async {
await
flutter
(
'clean'
);
});
section
(
'Build app for simulator with all available architectures'
);
// Apple Silicon ARM simulators not yet supported.
// Prove (on Xcode 12) Flutter knows to exclude this architecture.
await
inDirectory
(
flutterProject
.
rootPath
,
()
async
{
await
flutter
(
'build'
,
options:
<
String
>[
'ios'
,
'--simulator'
,
'--no-codesign'
,
'--verbose'
,
],
environment:
<
String
,
String
>{
'FLUTTER_XCODE_ONLY_ACTIVE_ARCH'
:
'NO'
});
});
final
String
simulatorAppFrameworkBinary
=
path
.
join
(
flutterProject
.
rootPath
,
'build'
,
'ios'
,
'iphonesimulator'
,
'Runner.app'
,
'Frameworks'
,
'App.framework'
,
'App'
,
);
final
String
archs
=
await
fileType
(
simulatorAppFrameworkBinary
);
if
(!
archs
.
contains
(
'Mach-O 64-bit dynamically linked shared library x86_64'
))
{
throw
TaskResult
.
failure
(
'Unexpected architecture'
);
}
section
(
'Clean build'
);
await
inDirectory
(
flutterProject
.
rootPath
,
()
async
{
await
flutter
(
'clean'
);
});
section
(
'Archive'
);
await
inDirectory
(
flutterProject
.
rootPath
,
()
async
{
...
...
packages/flutter_tools/bin/podhelper.rb
View file @
273630c0
...
...
@@ -68,6 +68,9 @@ def flutter_additional_ios_build_settings(target)
# When deleted, the deployment version will inherit from the higher version derived from the 'Runner' target.
# If the pod only supports a higher version, do not delete to correctly produce an error.
build_configuration
.
build_settings
.
delete
'IPHONEOS_DEPLOYMENT_TARGET'
if
inherit_deployment_target
# Apple Silicon ARM simulators not yet supported.
build_configuration
.
build_settings
[
'EXCLUDED_ARCHS[sdk=iphonesimulator*]'
]
=
'arm64 i386'
end
end
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
273630c0
...
...
@@ -250,7 +250,7 @@ Future<XcodeBuildResult> buildXcodeProject({
if
(
buildForDevice
)
{
buildCommands
.
addAll
(<
String
>[
'-sdk'
,
'iphoneos'
]);
}
else
{
buildCommands
.
addAll
(<
String
>[
'-sdk'
,
'iphonesimulator'
,
'-arch'
,
'x86_64'
]);
buildCommands
.
addAll
(<
String
>[
'-sdk'
,
'iphonesimulator'
]);
}
}
...
...
packages/flutter_tools/lib/src/ios/xcodeproj.dart
View file @
273630c0
...
...
@@ -209,6 +209,9 @@ List<String> _xcodeBuildSettingsLines({
if
(
useMacOSConfig
)
{
// ARM not yet supported https://github.com/flutter/flutter/issues/69221
xcodeBuildSettings
.
add
(
'EXCLUDED_ARCHS=arm64'
);
}
else
{
// Apple Silicon ARM simulators not yet supported.
xcodeBuildSettings
.
add
(
'EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64 i386'
);
}
for
(
final
MapEntry
<
String
,
String
>
config
in
buildInfo
.
toEnvironmentConfig
().
entries
)
{
...
...
packages/flutter_tools/test/general.shard/ios/xcodeproj_test.dart
View file @
273630c0
...
...
@@ -683,12 +683,14 @@ Information about project "Runner":
final
String
contents
=
config
.
readAsStringSync
();
expect
(
contents
.
contains
(
'ARCHS=armv7'
),
isTrue
);
expect
(
contents
.
contains
(
'EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64 i386'
),
isTrue
);
final
File
buildPhaseScript
=
fs
.
file
(
'path/to/project/ios/Flutter/flutter_export_environment.sh'
);
expect
(
buildPhaseScript
.
existsSync
(),
isTrue
);
final
String
buildPhaseScriptContents
=
buildPhaseScript
.
readAsStringSync
();
expect
(
buildPhaseScriptContents
.
contains
(
'ARCHS=armv7'
),
isTrue
);
expect
(
buildPhaseScriptContents
.
contains
(
'"EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64 i386"'
),
isTrue
);
});
testUsingOsxContext
(
'sets TRACK_WIDGET_CREATION=true when trackWidgetCreation is true'
,
()
async
{
...
...
packages/flutter_tools/test/integration.shard/build_ios_config_only_test.dart
View file @
273630c0
...
...
@@ -41,10 +41,7 @@ void main() {
// Config is updated if command succeeded.
expect
(
generatedConfig
,
exists
);
expect
(
generatedConfig
.
readAsStringSync
(),
allOf
(
contains
(
'DART_OBFUSCATION=true'
),
isNot
(
contains
(
'EXCLUDED_ARCHS'
)),
));
expect
(
generatedConfig
.
readAsStringSync
(),
contains
(
'DART_OBFUSCATION=true'
));
// file that only exists if app was fully built.
final
File
frameworkPlist
=
fileSystem
.
file
(
...
...
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