Hey, I started getting `Failed to verify code sign...
# multiplatform
f
Hey, I started getting
Failed to verify code signature
when installing an iOS app that uses dynamic Kotlin module. If I switch to static, everything seems to work. Has anyone encountered similar problem? I couldn't find anything recent here kodee sad Kotlin version: `2.1.21`; XCode version:
16.3
Full error message:
Unable to Install “[App Name]” This app cannot be installed because its integrity could not be verified. Failed to verify code signature of .../[App Name].app/Frameworks/[Framework Name].framework : 0xe800801c (No code signature found.)
t
@Timofey Solonin any ideas?
t
Hey, can you please add:
Copy code
# gradle.properties
org.gradle.logging.level=info
and share the logs from the
gradlew
call in Xcode. In the UI you can find these logs in: • View -> Navigators -> Reports • Find the failed build and one of the steps there will be a shell script phase with a
./gradlew embedAndSign...
call and all the relevant logs Could you please also share the:
Copy code
codesign -d -vvv /path/to/[Framework Name].framework
output You can submit these in a YouTrack ticket if you don't want to share them publicly
👌 1
t
f
Hey, thank you for the quick response kodee loving I uploaded all info here:
2025_05_27_22KwNZZt1jgm1ZeZd5kfAd
I forgot to mention that the
codesign
output is for fremework in the build folder. None of the paths in the error message were valid. Maybe it's only temporary and deleted after the build
And I tried it again and the codesign returns (
... /shared/build/xcode-frameworks/Beta\ Debug/iphoneos18.4/<Name>.framework
) > code object is not signed at all > In architecture: arm64 Not sure what is happening kodee sad Ping me if you need anything else
And I am using the new KMP plugin. Not sure if it is relevant
t
You mentioned that you run the script in pre-build action. Is there a reason you need to do this? Could you please move or duplicate the
./gradlew embedAndSign...
call in the application target's script phase. Does this help with the signing issue?
f
I have pre-build action because the iOS project is modularized into sevaral SPM modules. And AFAIK build phase script does not provide the framework in time to be consumed from all modules. But I am not sure I 100% understand what is happening 😅 All I know that pre-build action solved this issue for me. But I'll try to duplicate the step to have it both as a pre-build action and build/script phase
It looks like it works correctly now with the dynamic framework. I duplicated the
embedAndSignAppleFrameworkForXcode
task, so now I have it as a pre-build action and build phase script. Do you know what the underlying issue is? Should I take this as a workaround and create a YouTrack issue? 🤔
t
Should I take this as a workaround
Yes
Do you know what the underlying issue is?
In short, this pre-build workflow wasn't designed to work with dynamic libraries, but we don't warn about this anywhere. The issue is that pre-build script doesn't expose a code signing identity we can use to sign the binary, so we don't sign it and this is the error that you see. I will create an issue and link it in this thread later
👍 1
f
Thank you very much kodee loving
t
thank you color 1
thank you frog 1