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
a25dca4a
Unverified
Commit
a25dca4a
authored
Nov 12, 2021
by
Jenn Magder
Committed by
GitHub
Nov 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ad-hoc codesign Flutter.framework when code signing is disabled (#93556)
parent
4ec54e29
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
14 deletions
+40
-14
ios.dart
packages/flutter_tools/lib/src/build_system/targets/ios.dart
+2
-2
ios_test.dart
...ols/test/general.shard/build_system/targets/ios_test.dart
+38
-12
No files found.
packages/flutter_tools/lib/src/build_system/targets/ios.dart
View file @
a25dca4a
...
@@ -625,9 +625,9 @@ Future<void> _createStubAppFramework(File outputFile, Environment environment,
...
@@ -625,9 +625,9 @@ Future<void> _createStubAppFramework(File outputFile, Environment environment,
}
}
void
_signFramework
(
Environment
environment
,
String
binaryPath
,
BuildMode
buildMode
)
{
void
_signFramework
(
Environment
environment
,
String
binaryPath
,
BuildMode
buildMode
)
{
final
String
codesignIdentity
=
environment
.
defines
[
kCodesignIdentity
];
String
codesignIdentity
=
environment
.
defines
[
kCodesignIdentity
];
if
(
codesignIdentity
==
null
||
codesignIdentity
.
isEmpty
)
{
if
(
codesignIdentity
==
null
||
codesignIdentity
.
isEmpty
)
{
return
;
codesignIdentity
=
'-'
;
}
}
final
ProcessResult
result
=
environment
.
processManager
.
runSync
(<
String
>[
final
ProcessResult
result
=
environment
.
processManager
.
runSync
(<
String
>[
'codesign'
,
'codesign'
,
...
...
packages/flutter_tools/test/general.shard/build_system/targets/ios_test.dart
View file @
a25dca4a
...
@@ -72,7 +72,8 @@ void main() {
...
@@ -72,7 +72,8 @@ void main() {
testUsingContext
(
'DebugUniversalFramework creates simulator binary'
,
()
async
{
testUsingContext
(
'DebugUniversalFramework creates simulator binary'
,
()
async
{
environment
.
defines
[
kIosArchs
]
=
'x86_64'
;
environment
.
defines
[
kIosArchs
]
=
'x86_64'
;
environment
.
defines
[
kSdkRoot
]
=
'path/to/iPhoneSimulator.sdk'
;
environment
.
defines
[
kSdkRoot
]
=
'path/to/iPhoneSimulator.sdk'
;
processManager
.
addCommand
(
final
String
appFrameworkPath
=
environment
.
buildDir
.
childDirectory
(
'App.framework'
).
childFile
(
'App'
).
path
;
processManager
.
addCommands
(<
FakeCommand
>[
FakeCommand
(
command:
<
String
>[
FakeCommand
(
command:
<
String
>[
'xcrun'
,
'xcrun'
,
'clang'
,
'clang'
,
...
@@ -98,12 +99,17 @@ void main() {
...
@@ -98,12 +99,17 @@ void main() {
'-isysroot'
,
'-isysroot'
,
'path/to/iPhoneSimulator.sdk'
,
'path/to/iPhoneSimulator.sdk'
,
'-o'
,
'-o'
,
environment
.
buildDir
appFrameworkPath
,
.
childDirectory
(
'App.framework'
)
.
childFile
(
'App'
)
.
path
,
]),
]),
);
FakeCommand
(
command:
<
String
>[
'codesign'
,
'--force'
,
'--sign'
,
'-'
,
'--timestamp=none'
,
appFrameworkPath
,
]),
]);
await
const
DebugUniversalFramework
().
build
(
environment
);
await
const
DebugUniversalFramework
().
build
(
environment
);
expect
(
processManager
.
hasRemainingExpectations
,
isFalse
);
expect
(
processManager
.
hasRemainingExpectations
,
isFalse
);
...
@@ -116,7 +122,8 @@ void main() {
...
@@ -116,7 +122,8 @@ void main() {
testUsingContext
(
'DebugUniversalFramework creates expected binary with arm64 only arch'
,
()
async
{
testUsingContext
(
'DebugUniversalFramework creates expected binary with arm64 only arch'
,
()
async
{
environment
.
defines
[
kIosArchs
]
=
'arm64'
;
environment
.
defines
[
kIosArchs
]
=
'arm64'
;
environment
.
defines
[
kSdkRoot
]
=
'path/to/iPhoneOS.sdk'
;
environment
.
defines
[
kSdkRoot
]
=
'path/to/iPhoneOS.sdk'
;
processManager
.
addCommand
(
final
String
appFrameworkPath
=
environment
.
buildDir
.
childDirectory
(
'App.framework'
).
childFile
(
'App'
).
path
;
processManager
.
addCommands
(<
FakeCommand
>[
FakeCommand
(
command:
<
String
>[
FakeCommand
(
command:
<
String
>[
'xcrun'
,
'xcrun'
,
'clang'
,
'clang'
,
...
@@ -129,12 +136,17 @@ void main() {
...
@@ -129,12 +136,17 @@ void main() {
'.tmp_rand0'
,
'flutter_tools_stub_source.rand0'
,
'debug_app.cc'
)),
'.tmp_rand0'
,
'flutter_tools_stub_source.rand0'
,
'debug_app.cc'
)),
...
_kSharedConfig
,
...
_kSharedConfig
,
'-o'
,
'-o'
,
environment
.
buildDir
appFrameworkPath
,
.
childDirectory
(
'App.framework'
)
.
childFile
(
'App'
)
.
path
,
]),
]),
);
FakeCommand
(
command:
<
String
>[
'codesign'
,
'--force'
,
'--sign'
,
'-'
,
'--timestamp=none'
,
appFrameworkPath
,
]),
]);
await
const
DebugUniversalFramework
().
build
(
environment
);
await
const
DebugUniversalFramework
().
build
(
environment
);
expect
(
processManager
.
hasRemainingExpectations
,
isFalse
);
expect
(
processManager
.
hasRemainingExpectations
,
isFalse
);
...
@@ -317,6 +329,7 @@ void main() {
...
@@ -317,6 +329,7 @@ void main() {
FakeCommand
lipoCommandNonFatResult
;
FakeCommand
lipoCommandNonFatResult
;
FakeCommand
lipoVerifyArm64Command
;
FakeCommand
lipoVerifyArm64Command
;
FakeCommand
bitcodeStripCommand
;
FakeCommand
bitcodeStripCommand
;
FakeCommand
adHocCodesignCommand
;
setUp
(()
{
setUp
(()
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
...
@@ -353,6 +366,15 @@ void main() {
...
@@ -353,6 +366,15 @@ void main() {
'-o'
,
'-o'
,
binary
.
path
,
binary
.
path
,
]);
]);
adHocCodesignCommand
=
FakeCommand
(
command:
<
String
>[
'codesign'
,
'--force'
,
'--sign'
,
'-'
,
'--timestamp=none'
,
binary
.
path
,
]);
});
});
testWithoutContext
(
'iphonesimulator'
,
()
async
{
testWithoutContext
(
'iphonesimulator'
,
()
async
{
...
@@ -389,6 +411,7 @@ void main() {
...
@@ -389,6 +411,7 @@ void main() {
'-verify_arch'
,
'-verify_arch'
,
'x86_64'
,
'x86_64'
,
]),
]),
adHocCodesignCommand
,
]);
]);
await
const
DebugUnpackIOS
().
build
(
environment
);
await
const
DebugUnpackIOS
().
build
(
environment
);
...
@@ -538,6 +561,7 @@ void main() {
...
@@ -538,6 +561,7 @@ void main() {
copyPhysicalFrameworkCommand
,
copyPhysicalFrameworkCommand
,
lipoCommandNonFatResult
,
lipoCommandNonFatResult
,
lipoVerifyArm64Command
,
lipoVerifyArm64Command
,
adHocCodesignCommand
,
]);
]);
await
const
DebugUnpackIOS
().
build
(
environment
);
await
const
DebugUnpackIOS
().
build
(
environment
);
...
@@ -587,6 +611,7 @@ void main() {
...
@@ -587,6 +611,7 @@ void main() {
'armv7'
,
'armv7'
,
binary
.
path
,
binary
.
path
,
]),
]),
adHocCodesignCommand
,
]);
]);
await
const
DebugUnpackIOS
().
build
(
environment
);
await
const
DebugUnpackIOS
().
build
(
environment
);
...
@@ -658,6 +683,7 @@ void main() {
...
@@ -658,6 +683,7 @@ void main() {
lipoCommandNonFatResult
,
lipoCommandNonFatResult
,
lipoVerifyArm64Command
,
lipoVerifyArm64Command
,
bitcodeStripCommand
,
bitcodeStripCommand
,
adHocCodesignCommand
,
]);
]);
await
const
DebugUnpackIOS
().
build
(
environment
);
await
const
DebugUnpackIOS
().
build
(
environment
);
...
...
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