Skip to content

Move iOS codesigning into assemble build target - #77664

Merged
jmagman merged 1 commit into
flutter:masterfrom
jmagman:assemble-codesigning
Mar 9, 2021
Merged

jmagman merged 1 commit into
flutter:masterfrom
jmagman:assemble-codesigning

Conversation

@jmagman

@jmagman jmagman commented Mar 9, 2021 •

Copy link
Copy Markdown
Member
  1. Pass the codesigning identity into flutter assemble debug_ios_bundle_flutter_assets.
  2. Move App.framework codesigning out of xcode_backend thinning and into the IosAssetBundle (debug_ios_bundle_flutter_assets etc) assemble target as the last step of building that framework. This allows codesigning to be skipped if the App.framework doesn't need to be rebuilt.
  3. Move Flutter.framework codesigning out of xcode_backend and into the UnpackIOS (debug_unpack_ios etc) assemble target as the last step of copying around that framework.
  4. Flutter.framework is codesigned with Headers and Modules directories (necessary for linking) which means those directories can't be removed during embedding, or the codesigning validation on install will fail. So stop removing those directories from the final embedded app (they are really small).

Confirmed when the code signing identity changes, the frameworks are re-signed (because the assemble inputs changed).

Added unit tests, but also covered by ios_content_validation_test.

Second compilation getting faster (see #77420):

$ dart bin/run.dart -t hello_world_ios__compile
...
    "debug_full_compile_millis": 18347,
    "debug_second_compile_millis": 9663

Part of #67580
See also #77329 and #77007

@jmagman jmagman added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. t: xcode "xcodebuild" on iOS and general Xcode project management labels Mar 9, 2021
@jmagman jmagman self-assigned this Mar 9, 2021
@google-cla google-cla Bot added the cla: yes label Mar 9, 2021

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to stop filtering out Headers and Modules directories or the codesigning done before the copy became invalid.

Comment on lines 239 to 241

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed now, the clang command will throw if it fails.

return _processUtils.run(
<String>[...xcrunCommand(), 'clang', ...args],
throwOnError: true,
);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These didn't need to be async.

@jmagman
jmagman force-pushed the assemble-codesigning branch from c9b6c39 to 3c097c3 Compare March 9, 2021 02:51
@jmagman
jmagman requested a review from jonahwilliams March 9, 2021 18:56

@jonahwilliams jonahwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jonahwilliams

Copy link
Copy Markdown
Contributor

(Thats a nice improvement!)

@jmagman
jmagman merged commit 7b1aec7 into flutter:master Mar 9, 2021
@jmagman
jmagman deleted the assemble-codesigning branch March 9, 2021 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants