17

I was used to sign my app with the following command

codesign --resource-rules=ResourceRules.plist -f -s "SIGNER_NAME" MYAPP.app

After installing Yosemite and XCode 6.1 it gives the following warning:

Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!

So I tried to remove the "--resource-rules" but now it gives the following (blocking) error:

invalid resource specification rule(s)

Is there any right way to codesign ?

Sirio
  • 991
  • 2
  • 12
  • 27

2 Answers2

23

Over on this post They answer your question. That post is more targeted towards using a build server (Jenkins CLI) but the answer is the same for you (and the author of the answer points out that it is NOT unique to Jenkins).

For the purpose of answering the question on this page, here is their answer:

Open the "Build Settings" tab of your project. Searched "Code Signing Resource Rules Path", it was empty for me. Change to: $(SDKROOT)/ResourceRules.plist

credits goes to Adams Blair who described this problem with SDK2.2

https://stackoverflow.com/a/7919137/2124345

This solution doesn't remove the warning itself. But i'm pretty sure that warning isn't a problem. The problem is that without this setting ResourceRules.plist files isn't generated in Payload folder, and build process stops because file is missing.

And again, it's not related with jenkins plugin at all. Same error happens with xcrun -sdk iphoneos PackageApplication. Jenkins just calling this command line as a build step.

Community
  • 1
  • 1
g_blott
  • 251
  • 1
  • 4
  • 2
    I just had an app rejected because of adding the ResourceRules.plist file to the build settings. Apple sent us a note asking us to remove the file and resubmit. – Greg Oct 28 '14 at 16:20
  • @Greg - What did you end up doing? You need this flag to get an IPA but if they rejected your app, then what's the deal? – Tony Oct 29 '14 at 07:32
  • I ended up removing the ResourceRules.plist file from the project and removing the Code Signing Resource Rules Path from the build settings, then created an archive and submitted that. I didn't check in these changes to our source control though, so that Jenkins can still build the project successfully until I arrive at a better workaround that satisfies both Jenkins and Apple's review. – Greg Oct 29 '14 at 16:04
  • @Greg - Sounds good. Thanks for your input. I was thinking of doing the same. I think the solution might be to pass in a parameter to the Jenkins build arguments which sets the ResourceRules.plist for you so you can have it done during the build time rather than having it inside the project settings. I haven't tried to see if this works yet though. – Tony Nov 01 '14 at 23:17
  • is there a way it can be accomplished by making changes in the build script than making changes in the project setting – Raghav Nov 06 '14 at 08:42
  • @g_blott thanks for the informative response, can I just leave out the ResourceRules.plist file if code signing for iOS8, do you know? – Bradley Thomas Jan 13 '15 at 20:05
  • There's a bug in the PackageApplication script [requiring a patch](http://stackoverflow.com/a/26674605/1245614). – skitheo Aug 18 '15 at 22:23
0

Can you use iReSign? https://github.com/maciekish/iReSign

It's a GUI that allows to sign (or resign) ipa files with mobileProvision certificate.

I tried it with Yosemite and works like a charm.

jos
  • 1,070
  • 12
  • 22