iOS SDK is not signed with latest code signature and app doesn't compile


I added the Piwik SDK to an iOS project by following the documentation. In my Podfile I added: pod 'PiwikPROSDK', '1.1.5', but the build on device always failed with non-descriptive errors.

I tried to understand the problem by integrating the xcframework directly without using Cocoapods and I received a better error when building to device:

Unable to install "AppName"
Code: -402620375
User Info: {
    DVTErrorCreationDateKey = "2022-11-19 18:11:03 +0000";
    IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
The code signature version is no longer supported.

While searching the error I found This document by Apple and it seems that the problem is that the PiwikProSDK framework for iOS is built with an old and unsupported signature version. From Apple’s documentation:

To check whether an app called has the new signature, you can use the codesign utility:

% codesign -dv /path/to/

Look in the output for a string such as CodeDirectory v=20500. For any value of vless than 20400, you need to re-sign your app.

If your app contains nested code, such as an app extension, a framework, or a bundled watchOS app, sign each item separately, starting with the most deeply nested executable, and working your way out; then sign your main app last

This is the output of the command when executed on the PiwikProSDK Framework:

codesign -dv PiwikPROSDK.xcframework/ios-arm64_i386_x86_64-simulator/PiwikPROSDK.framework                                         
Format=bundle with generic
CodeDirectory v=20100 size=193 flags=0x2(adhoc) hashes=1+3 location=embedded
Info.plist entries=20
TeamIdentifier=not set
Sealed Resources version=2 rules=10 files=8
Internal requirements count=0 size=12

As you can see, CodeDirectory returns v=20100 but it should be at least 20500.

Hello @dzamir,

We’ll check this and get back to you with feedback.

I tried to replicate the problem in an empty Xcode project with the same Podfile but it compiled successfully.

At the end I updated all the CocoaPods on my (big) project and I can now compile on device and submit to store.