Trying to build a .NET for iOS binding project results in build errors with "The name '_CodeSignature' is reserved and cannot be used." #21981
Description
Apple platform
iOS
Framework version
Other
Affected platform version
.NET 8, .NET 9
Description
I created a NuGet package with .NET for iOS bindings for an .xcframework. I have to build these xcframeworks myself from source to shorten their path due to the Windows long path error in Visual Studio.
Trying to consume this package in a .NET MAUI iOS app which is then submitted to TestFlight results in errors like NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"Asset validation failed\" UserInfo={status=409, detail=Missing or invalid signature. The bundle 'x' at bundle path 'y.framework' is not signed using an Apple submission certificate.
So assuming that the .xcframework needs to be signed first, I code-sign it after I build the xcframework.
But then trying to build the binding project (which generates the NuGet package on build) I get build errors stating "The name '_CodeSignature' is reserved and cannot be used."
Is this a bug on the .NET end, and/or do I have to somehow extract the .xcframework after building the NuGet package without code signing, code-sign, then put the NuGet package back together?
Steps to Reproduce
- Build .NET for iOS binding project with a code-signed xcframework native reference
Did you find any workaround?
No
Build logs
No response