--resource-rules has been deprecated in mac os x >= 10.10

IosIphoneCode SigningIpaOsx Yosemite

Ios Problem Overview


I tried to resign my ipa file with new provisioning profile on Mac Os 10.10 with iResign app but I got this warning: "Warning: --resource-rules has been deprecated in Mac OS X >= 10.10".

What should I do now?

Ios Solutions


Solution 1 - Ios

Click on your project > Targets > Select your target > Build Settings >

Code Signing Resource Rules Path

and add :

$(SDKROOT)/ResourceRules.plist

enter image description here

Solution 2 - Ios

Since Xcode 7, the Code Signing Resource Rules Path build setting must be left empty or else this warning is produced.

Technical Note TN2206 provides the details:

> Resource Rules > > Systems before OS X Mavericks v10.9 documented a > signing feature (--resource-rules) to control which files in a bundle > should be sealed by a code signature. This feature has been obsoleted > for Mavericks. Code signatures made in Mavericks and later always seal > all files in a bundle; there is no need to specify this explicitly any > more. This also means that the Code Signing Resource Rules Path build > setting in Xcode should no longer be used and should be left blank. > > It is thus no longer possible to exclude parts of a bundle from the > signature. Bundles should be treated as read-only once they have been > signed.

Solution 3 - Ios

After Xcode 7 previous solutions stopped working. A new one was pointed by Rishi Goel (in https://stackoverflow.com/a/32762413/2252465)

  1. Remove CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist

  2. Find the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication script and update it.
    Find the lines including the following code in the script

    my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements,resource-rules",
                      "--sign", $opt{sign},
                      "--resource-rules=$destApp/ResourceRules.plist");
    

change it to:

    my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements",
                      "--sign", $opt{sign});

Solution 4 - Ios

I found workaround: if you run the iResign app from XCode — then you will resign app without problem (warning will appears in console instead of popup). But if you close XCode and run app alone — then popup will back to you!

BTW: bug found :) The condition

if (systemVersionFloat < 10.9f)

Is broken for Yosemite 10.10. Funny.

Thanks,

Solution 5 - Ios

Try adding below arguments in xcodebuild command.

-sdk iphoneos CODE_SIGN_RESOURCE_RULES_PATH='$(SDKROOT)/ResourceRules.plist' 

Solution 6 - Ios

If you are resigning app using terminal then you can even omit resource-rules while performing code sign, as there is no need to externally specify which resource to sign and which to not. Now it is mandatory to sign all the resources inside package.

To resign app using terminal you can follow below steps:

unzip MyApp.ipa

rm -rf Payload/MyApp.app/_CodeSignature/

cp ~/Desktop/MyAdHoc.mobileprovision Payload/MyApp.app/embedded.mobileprovision 

codesign -f -s "iPhone Distribution: Code signing Certificate for Enterprise or Ad-hoc app" Payload/MyApp.app

zip -qr MyApp_Resigned.ipa Payload/

Solution 7 - Ios

I just opened my existing iOS app in Xcode 7 GM (from Xcode 6.4) and saw this deprecation warning.

It's interesting that answers and comments are saying to update the 'Code Signing Resource Rules Path' and they also reference Mac apps.

In my case, the project had this key and value already set by default (I never set it). The warning is about resource rules being deprecated too.

For me, deleting the value of the 'Code Signing Resource Rules Path' removed the warning. I have not submitted a new build this way so I may have to come back and update this answer.

Just thought it was interesting that my answer is opposite what everyone else was seeing.

Solution 8 - Ios

If you comment out the two --resource-rules parameters from the arguments list, where the iResign app calls the codesign task, then you don't have to change the project build settings for the app's project.

I don't like the idea of having to modify the build settings for every project I want to work with, just so that I can resign it.

I rebuilt the resign tool, and copied it to my Applications directory, so that I don't have to open it in Xcode.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionhiennv92View Question on Stackoverflow
Solution 1 - IosDaniView Answer on Stackoverflow
Solution 2 - IosRicardo Sanchez-SaezView Answer on Stackoverflow
Solution 3 - IosRodrigo PintoView Answer on Stackoverflow
Solution 4 - IosSergey KopanevView Answer on Stackoverflow
Solution 5 - IosChintan PrajapatiView Answer on Stackoverflow
Solution 6 - IostechnerdView Answer on Stackoverflow
Solution 7 - IosChad PavliskaView Answer on Stackoverflow
Solution 8 - IosSheamusView Answer on Stackoverflow