Re-signing of the IPA, which contains the structure

I am rewriting an iOS application (using iResign) to upload it to the App Store; and as part of this I change the package identifier. I only have IPA (not source code).

The application contains a third-party structure.

Failure seems to be going well; but when I boot using Application Loader, I get the following error:

ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle signature contains code signing entitlements that are not supported on iOS. Specifically, value 'XXXXXXXXXX.COM.XYZA' for key 'application-identifier' in 'Payload/APPNAME.app/Frameworks/FRAMEWORKNAME.framework/FRAMEWORKNAME' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier." 

(Obviously, I changed the values ​​shown in CAPS)

I assume the problem is that the application identifier in my rights.plist matches the Bundle identifier in my application, but does not match the Bundle identifier in the framework.

To exclude this, I set the same Bundle identifier in the framework and application. This allowed me to upload to the app store; but failed with the error when I tried to install the application on the iPad.

Do I need to provide a separate permissions file for the framework? How can I get around this problem?

UPDATE : just to eliminate this, I tried to use the wildcard wildcard profile and the plugin with permissions; but it gives the same error

+5
source share
3 answers

You must also re-sign the framework.

Just open your .ipa and find the frameworks used in

Payload / MyApp.app / Wireframes

Try signing them using the command below

 /usr/bin/codesign -f -s "iPhone Developer: Some Body (XXXXXXXXXX)" --entitlements entitlements.plist Payload/MyApp.app/Frameworks/* 

After that, rewrite it.

In addition, many people got good results with AirSign.

+3
source

You may be late and you can solve the problem. But I hope that my answer will help you and other people.

I assume that you have already tried the 'codesign -f -s' iPhone Distribution: .... "' command to resign or sign application / frameworks / built-in libraries. I usually use this command to resign my applications, but all of a sudden it stopped working when I upgraded to iOS 10 and xcode 8.2, and I have the same problem as with a third-party structure in my IPA file.

So, I did some research and found that Xcode uses this command to sign the application

 /usr/bin/codesign '-vvv' '--force' '--sign' 'CFE5D63E6.......1CBCF2271B844' '--preserve-metadata=identifier,resource-rules' '--entitlements' '/var/folders/86/kd0n_tjd56v9thg5x5qwnx500000gp/T/XcodeDistPipeline.uqv/entitlementsWgXqGE' '/var/folders/86/kd0n_tjd56v9thg5x5qwnx500000gp/T/XcodeDistPipeline.uqv/Root/Payload/FrameworkTesting.app/Frameworks/......' 

Please note that the identifier is "CFE5D63E6 ....... 1CBCF2271B844"! This is the identifier of your certificate. So this is the solution to get the code to work.

  • Use this command to display all the identifiers of your certificates.

    security find-identity -v -p codesigning

You will get a list similar to this:

  1) 4BEC631CE717.......8C7CB311093548D4 "iPhone Developer: xxxx (xxxxx)" 2) 4BEC631......BB678C7CB311093548D4 "iPhone Developer: xxxx (xxxx)" 3) .......D45590A63E99A27D2977C573..... "iPhone Developer: xxxx (xxxx)" 4) CF........6FDD78ECB161CBCF2271B844 "iPhone Distribution: xxxx (xxxx)" 5) C4973F........352F620D2F49 "iPhone Developer: xxxx (xxxx)" 6) 225........B6D70672E880479860ED6 "iPhone Distribution: xxxx (xxxx)" 6 valid identities found 
  1. Use this command to sign your application / frameworks / libraries

    codesign -vvv --force --sign "[select identifier above]" Payload /yourAppp.app/Frameworks/yourFramework.framework

    codesign -vvv --force --sign "[select identifier above]" --entencesments.plist Payload / yourAppp.app

Hope this helps!

0
source

Assuming that you perform all your usual actions, such as deleting the application signature, then delete the old signature in the frameworks and cancel this framework without regard to rights:

 rm -r Payload/"$ipaExe"/Frameworks/*/_CodeSignature codesign -f -s "$certificate" Payload/"$ipaExe"/Frameworks/* 

Then sign your application:

 codesign -f -s "$certificate" --entitlements $entitlementFile Payload/"$ipaExe" 
0
source

All Articles