I have a EC2 mac instance with a fastlane script, that builds and sign a ios application. Its working fine in the instance, but when i run the same script through a jenkins script, I’m getting the following error
error: Target release_unpack_ios failed: Exception: Failed to codesign /Users/ec2-user/Library/Developer/Xcode/DerivedData/Runner-bgxywyggdiwupudhpkonmwvznobh/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Flutter.framework/Flutter with identity XXXXXXXX
I have tried to unlock the keychain as mentioned in this post,
security -v unlock-keychain -p "{$PASSWORD}" "/Users/ec2-user/Library/Keychains/login.keychain-db"
I have also tried the key-partition approach to fix the issue as mentioned here
security set-key-partition-list -v -S apple-tool:,apple: -s -k [Login Keychain Password] [Login Keychain Path]
I have tried everything, I'm out of ideas and any help would be highly appreciated.