-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken signature when embedding helper app inside main app bundle. #15594
Comments
The way you are doing this looks it should work, and I believe it used to (since I personally wrote that sample). The problem is that the msbuild that did signing was rewritten and is getting confused:
and is assuming that you have obj files that match the files you have copied in. When @rolfbjarne returns from vacation he can comment on if this still is the best way to add files, but until then you can hack around by adding these two lines to your CopyOurFiles target:
|
Thank you! I can confirm that workaround works perfectly and I was able to adapt it to the production project build process. |
Works for me too! |
We recently rewrote our codesigning logic, and an assumption was made that we should sign every *.dylib in the app bundle (because otherwise Apple will reject any app submissions). Unfortunately we didn't include any way to opt out of this new behavior, so I'll have to implement that. |
…to be signed. Fixes xamarin#15594. Fixes xamarin#15594.
…to be signed. Fixes xamarin#15594. Add support for two new MSBuild item groups: * CodesignBundle: lists additional app bundles inside the main bundle which should be signed (typically manually copied into the app bundle by the developer). * SkipCodesignItems: lists files we'd sign by default, but which shouldn't be signed. Fixes xamarin#15594.
Steps to Reproduce
Release
configuration with VS Mac or withmsbuild /p:Configuration=Release -bl ./signTest1.sln
main/bin/Release
folderExpected Behavior
(See Additional details section below for some details about what I'm trying to do here)
Both
Main.app
and embedded./Main.app/Contents/SharedSupport/helper.app
are signed correctly, so output should beThe
Main.app
as a whole should be able to pass Apple's notarizatoin.Actual Behavior
The signature of
helper.app
is broken due to the changed files inside the app bundleIf we send
Main.app
to the notarization, we will got the error about this broken signature.Additionally, if we check the signature of the
helper.app
in the it's original locationhelper/bin/Release
then we got correct signatureEnvironment
Version information
Problem can be reproduced on VS mac 2022 (full detail below) and on latest VS mac 2019.
Build Logs
msbuild.binlog.zip
Example Project (If Possible)
signTest1.zip
Additional details
I need to embedded helper application (
helper.app
) inside my main application appbundle. And all this should be signed to be able to pass notarization process.To do so, I do the following
main.csproj
to copy ready-to-use (built and signed)helper.app
fromhelper/bin/Relese
into theSharedSupport
folder inside themain.app
appbundle.main.app
appbundle.The solution is based on this sample https://github.com/xamarin/mac-samples/tree/main/UseMSBuildToCopyFilesToBundleExample.
The part added into the 'main.csproj' is following
This solution worked fine for a long time in VS219, but stopped worked in the latest VS2019 build and in VS2022.
For me this issue is critical as I can't build a release of my app. And I also can't downgrade VS as there is no links for older versions available.
Update: problem is also reproducible for net6 sdk-style project. The workaround mentioned below is also works in such a case.
The text was updated successfully, but these errors were encountered: