Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
500 views
in Technique[技术] by (71.8m points)

ios - xcode info.plist build variable ${PRODUCT_NAME:rfc1034identifier} seems completely undocumented?

I'm trying to find documentation that describe the syntax and possibilities suggested by the construction ${PRODUCT_NAME:rfc1034identifier}. Obviously this turns into some version of the product name, but where is the documentation that describes how? I just grepped the entire /Developer directory, and got nothing useful.

I'm not looking for the narrow definition of what happens to this particular variable, I want to know about all such modifiers like rfc1034identifier.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

By using strings I also dug out the following things that look like they're related to :rfc1034identifier:

  • :quote - adds backslashes before whitespaces (and more), for use in shell scripts
  • :identifier - replaces whitespace, slashes (and more) with underscores
  • :rfc1034identifier - replaces whitespace, slashes (and more) with dashes
  • :dir - don't know, observed replace with ./ in some cases
  • :abs - don't know

Exact command:

strings /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/A/DevToolsCore|grep '^:'

There are more things that look like interesting modifiers (for example, :char-range=%@), but I couldn't get these to work. There's only one example of :char-range on the net, and it's from a crash log for Xcode.

Someone asked how do we know it's a modifier specification. Well, we know because it works on multiple variables in build settings. Plist preprocessor probably uses the same mechanisms to resolve build variables as does the build system.

Hack Saw, if you get a response via that bug report, don't forget to keep us informed :-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...