• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Preprocess Info.plist for Single-File Tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preprocess Info.plist for Single-File Tool


  • Subject: Re: Preprocess Info.plist for Single-File Tool
  • From: Karl Moskowski <email@hidden>
  • Date: Sat, 16 May 2009 15:30:56 -0400


On 16-May-09, at 3:08 PM, Jerry Krinock wrote:

I've added Info.plist files to my single-file tool products as
explained in Apple's Code Signing Guide [1].  It seems that, exactly
as has been reported by K. Moskowski [2], Info.plist preprocessing
does not work.

Apparently, this technique embeds the Info.plist into the product
executable.  But when I examine the product with otool -sv __TEXT
__info_plist, I see that the ${YADDA.YADDA} symbols are still in there
even after I delete the product, touch the Info.plist source, clean,
rebuild, etc.

I hope maybe someone can tell me the trick I'm missing, because I have
had trouble in the past getting Xcode to "notice" Info.plist changes.
Otherwise, if no one replies with a reason why this should not work as
expected I'll file a bug next week.  This is Xcode 3.1.2.

Thanks,

Jerry Krinock

[1] http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#/
/apple_ref/doc/uid/TP40005929-CH4-DontLinkElementID_6

[2] http://www.cocoabuilder.com/archive/message/xcode/2009/3/4/27550

I tried the plist compiler tool that was suggested in the thread Jerry mentioned, but it turned out to be overkill for what I needed to do. For my needs, defaults served the purpose.


First, I added a shell script build phase to my tool's target:
# copy the plist from the source dir to the build dir
PLIST="$CONFIGURATION_TEMP_DIR"/My-Info
cp "$SRCROOT/My-Info.plist" "$PLIST.plist"
# change the values in the copy
defaults write "$PLIST" Key1 Value1
defaults write "$PLIST" Key2 Value2
# echo the result to the build log
defaults read "$PLIST"

Then I changed the Other Linker Flag in the target to use the customized Info.plist:
-sectcreate __TEXT __info_plist "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$ (EFFECTIVE_PLATFORM_NAME)/My-Info.plist"


I filed a bug asking for an Xcode enhancement to enable Info.plist preprocessing for tools. It was closed as a duplicate of rdar:// 4722772, in case anyone wants to increase.

----
Karl Moskowski <email@hidden>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Java Debugger in XCode 3.1.2 hangs when inspecting variables
  • Next by Date: Re: warning: declaration does not declare anything
  • Previous by thread: Preprocess Info.plist for Single-File Tool
  • Next by thread: warning: declaration does not declare anything
  • Index(es):
    • Date
    • Thread