Mintegral-official / MintegralAdSDK-iOS-new

Mintegral ad sdk for iOS
https://dev.mintegral.com/doc/index.html?file=sdk-m_sdk-ios&lang=en
Other
5 stars 3 forks source link

Unable to Install to Device #11

Closed ddaddy closed 2 years ago

ddaddy commented 2 years ago

I have manually added the frameworks and it works fine in the Simulator, however it will not install to my device with the error: The code signature version is no longer supported..

If I remove the Mintegral frameworks it installs fine.

Looking at the frameworks, they have a _CodeSignature folder which a framework shouldn't have as you can't sign it with your account and then have us install and sign it with our. Can you please remove the signing from the frameworks and release a new build o I can test on my device?

ddaddy commented 2 years ago

If I set them to DO not embed then it works, but do I need them to Embed and Sign for distribution?

ddaddy commented 2 years ago

After some more research, it seems you need to set --generate-entitlement-der in Other Signing Flags to update the signature to v=20400+ as it has v=20200 which is not compatible with iOS 15. I've tried update the signature but it won't upgrade past 20200.

red3 commented 2 years ago

@ddaddy sorry for the late respond, if I understand Embed and Sign correct, Embed and Sign works with dynamic framework and our framework distributed as static framework, so you have to use DO not embed

ddaddy commented 2 years ago

Ah ok, that explains it then. Perhaps add that info to the ReadMe for manual installs? I don't use CocoaPods so it's either SPM or manual install.

I (and some Apple boffins) are still confused as to why we cannot resign it with a v=20400 signature.

ddaddy commented 2 years ago

After some back and forth with some tech's at Apple, they suggest that you are distributing this SDK in an incompatible format!

Apple Dev Forum

Specifically their final comment:

This indicates that the MTGSDK file is a universal static library. Someone has taken that and put in a .framework wrapper. I see folks do this all the time, calling it a static framework, but that’s just nonsense. Static libraries and frameworks are different things. If you try to pretend that a static library is a framework you’ll run into all sorts of weird issues, just like this one.

IMPORTANT Apple does not support this as a build product, and that includes both generating and using it.

Note While the XCFramework format does support static libraries, each element must be a static library. The advent of XCFramework doesn’t improve the story for these so-called static frameworks.

My advice here is that you escalate this to the SDK vendor requesting that they ship build products in a format that Apple supports. If they can’t do that, they have to assume the burden of integrating their build products into your app.

red3 commented 2 years ago

After some more research, it seems you need to set --generate-entitlement-der in Other Signing Flags to update the signature to v=20400+ as it has v=20200 which is not compatible with iOS 15. I've tried update the signature but it won't upgrade past 20200.

@ddaddy maybe the signature with v=20200 was related with the Xcode version we used, can I know what Xcode version you are currently used?

ddaddy commented 2 years ago

Always the latest. 13.4

red3 commented 2 years ago

and you're using the latest xcframework version of MTGSDK, right?

ddaddy commented 2 years ago

Yes. Did you see the Apple Dev Forum link I posted. You can view the signature info with the command codesign -dv filename

red3 commented 2 years ago

Yes. Did you see the Apple Dev Forum link I posted. You can view the signature info with the command codesign -dv filename

Yes, I viewed the Forum link, but I don't think the problem is related to the static library wrapped into a .framework, we and others do this years ago and it works well, and if you try to Embed and Sign a standard static framework you will still get this error. I still highly recommend you to use DO not embed instead of Embed and Sign, I will add this info to the ReadMe for manual installs later.