fix(cli): sign bundled frameworks before signing the Apple app - #5864
LucaCappelletti94 wants to merge 1 commit into
Conversation
|
@nicoburns thanks for running the CI. The Playwright failures seem to be also failing on I tested locally your #5843 fix and looks very related to #5834 and #5859. I believe any of them fixes the issue, but I also suspect all of them are in "just need a reviewer" limbo. I'll check yours out more precisely to see whether I can provide any feedback myself, but of course it won't count as a reviewer. Still, maybe it'll speed things along. I'll rebase when any of them land. |
b9ca52d to
f90859e
Compare
|
@nicoburns I have rebased on main after you merged #5843 so now the CI may tentatively pass. |
|
@nicoburns thanks again for triggering workflow, all looks green so I will be waiting for a review. Talking about reviews, do you need me to take a look at any PRs to take a bit of work out of your plate? |
A device build of an app with a
#[manganis::ffi] extern "Swift"plugin fails to install with "No code signature found", becausecodesign_applesigns only the outer.appand leavesDioxusSwiftPlugins.frameworkunsigned.codesignwithout--deepdoes not sign nested code, so afterdx build --codesignthe framework reports "code object is not signed at all". The simulator skips nested signatures, which is why simulator builds work. Bundled-sysdylibs have the same problem.With this PR,
codesign_applenow signs each framework and dylib inFrameworkswith the same identity before the app, as Xcode does. Symlinks are skipped, since dev builds point them at dylibs outside the bundle.Codesign recursion only reaches nested code that already carries its own valid signature. A framework built fresh in this same build starts unsigned, so there is nothing for the outer signature to recurse onto, it needs its own pass first.
Widget extensions will likely need a follow-up, since each
.appexneeds its own entitlements and provisioning profile. #5466 contains a similar loop, and whichever lands second drops the duplicate, but that PR seems stuck since April.Fixes #5889