Cocoapods | Frameworks | Archiving fails

Earlier this week I realised that we had no new builds for our for quite a while. Checking the Jenkins logs, revealed that suddenly we had code signing problems.

Before the builds started to fail, one small change with big impact was made. We started to use use_frameworks! with Cocoapods.

Further the log revealed that there were problems with code signing the libraries which we added via Cocoapods. Checking the Pods.xcproject file, showed that the code sign identity for debug and release builds is iOS Developer, which doesn’t make that much sense.

Interestingly it was working on my local machine, since it used a wild card provisioning profile, which was not available on our Jenkins slave.

Adding a post install hook, which changes the code signing identity for Release builds to iOS Distribution, actually fixes the problem.

However I would suggest that this setting should always be inherited from the parent project, rather than using some hardcoded value which might or might not work.