-
Notifications
You must be signed in to change notification settings - Fork 507
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
Code Signing Not Working for AdditionalAppExtensions #15598
Comments
I can confirm this, using cake to build the native component and VSfM to build the managed (just to confirm it wasn't introduced by cake).
From reading my local build log it appears we are copying the extension in, removing it's code signature, but not resigning it locally. You could work around this by manually invoking the codesign command first on the extension and then again on your application, like this (but with the arguments from your build log):
Which seems to work for me:
|
I suspect this has the same refactoring root cause as #15594 |
Thanks for confirming @chamons Yes, it does work fine for me as a workaround to manually code sign extensions then the app -- just less convenient. |
Just in case it helps anyone else who runs into this issue: I'm using fastlane to resign the IPA now, just because it'll resign an IPA in place and is more convenient that writing a shell script to do it. Here's what I'm doing (and this seems to be fine with packages submitted to TestFlight): I downloaded provisioning profile files and put them in a Then I created a
Then you can run the command |
I am having the same issues now I moved to VS 2022. Using Xamarin.iOS 15.12.0.2. Can this be fixed ? |
Yes, I'm working on fixing it. However, I can't promise any dates yet. |
O that would be great, will the fix also apply to the current Xamarin version ? (Not .NET 7) ? |
Until we know the size of the fix (because it is fixed) it will be guessing at this point how risky it would be to backport. |
…to sign. Fixes xamarin#15598. Fixes xamarin#15598.
Thanks for fixing @rolfbjarne! Your PR works well for my app, and App Store Connect accepts the package fine after your changes. |
@adam-russell great, thanks for confirming! |
…to sign. Fixes #15598. (#15829) * Add additional app extensions to the list of items we need to sign. * Improve msbuild test for additional app extensions: * Build for both device and simulator. * Hopefully fix the signing problems that occurred on the bots last time we tried. * Assert that both the container and extension are signed during the build when we build for device. A 10-line fix with 3300 lines of tests... Fixes #15598.
Steps to Reproduce
NativeExtensionEmbedding.zip
Expected Behavior
There is a code signature for NativeTodayExtension.appex inside the IPA
Actual Behavior
The IPA itself is signed, but NativeTodayExtension.appex is not signed. This worked correctly with Xamarin.iOS 15.8.0.5. It is broken with Xamarin.iOS 15.10.0.5 (unless I'm doing something wrong)
Environment
Version information
Build Logs
buildlogs.zip
I ran the same Cake script with Xamarin.iOS 15.8.0.5, then immediately after with 15.10.0.5. 15.8.0.5 produces the correct results, 15.10.0.5 does not.
I've included build logs in this zip for both.
GOOD_Xamarin_iOS_15.8.0.5.binlog
and
BAD_Xamarin_IOS_15.10.0.5.binlog
Example Project (If Possible)
NativeExtensionEmbedding.zip
Additional Details
I ran into this a few days ago when I updated a production build to use Xamarin.iOS 15.10.0.5 without any other major changes, and was initially confused when it started getting rejected by TestFlight/AppStoreConnect.
I tried to make this example as close to possible to the test app that's in this repo:
https://github.com/xamarin/xamarin-macios/tree/main/tests/common/TestProjects/NativeExtensionEmbedding
The only changes were to use distribution provisioning profiles (changing the bundle identifiers slightly so I could use some with real provisioning profiles), changing the managed app to use a release build, and adding the build.cake script at the top level so you can see my build.
I used a distribution cert to make sure it's closer to a real example (sorry, that probably means you need to change the associations on your own machine to actually build the sample).
Hopefully I'm just missing something in the way code signing works now, as it looks to have been rewritten. It looks like a bug to me, though.
(I'm not very familiary with MSBuild, but maybe in Target -> _CollectCodeSigningData, the paths should resolve as those within the IPA folders after the appex has ben copied rather than the original build outputs? I could be completely off, though, since I don't quite follow how the new codesigning flow works.)
The text was updated successfully, but these errors were encountered: