Skip to content

Commit d0453d7

Browse files
Add documenation for the BuildSettingInfoSubpaths plist
- Resolves #75
1 parent c81792d commit d0453d7

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

BuildSettingExtractor.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
5395AF4D1A7C6BB60028BE88 /* ReadMe.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = ReadMe.md; sourceTree = "<group>"; };
7373
539A0205234EFA4300193374 /* BuildSettingInfoSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BuildSettingInfoSource.h; sourceTree = "<group>"; };
7474
539A0206234EFA4300193374 /* BuildSettingInfoSource.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BuildSettingInfoSource.m; sourceTree = "<group>"; };
75+
53B3D1EA256031280071ED64 /* BuildSettingInfoSubpathsNotes.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = BuildSettingInfoSubpathsNotes.md; sourceTree = "<group>"; };
7576
53B3D7EE23F6EB6F0039C5B0 /* PreferencesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PreferencesViewController.m; sourceTree = "<group>"; };
7677
53B3D7EF23F6EB6F0039C5B0 /* PreferencesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreferencesViewController.h; sourceTree = "<group>"; };
7778
53B3D7F423F6EDB70039C5B0 /* FileLayoutPreferencesViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FileLayoutPreferencesViewController.h; sourceTree = "<group>"; };
@@ -191,6 +192,7 @@
191192
53719EA719BF4C6D005D3DE0 /* MainMenu.xib */,
192193
53719EAA19BF4C6D005D3DE0 /* Assets.xcassets */,
193194
538196C41A851BB40033CB65 /* BuildSettingInfoSubpaths.plist */,
195+
53B3D1EA256031280071ED64 /* BuildSettingInfoSubpathsNotes.md */,
194196
53719E9919BF4C6D005D3DE0 /* Supporting Files */,
195197
);
196198
path = BuildSettingExtractor;
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# BuildSettingInfoSubpaths
2+
3+
An overview of the structure and keys in the BuildSettingInfoSubpaths.plist file.
4+
5+
## Overview
6+
BuildSettingExtractor gleans information about build settings from files within the Xcode app bundle. The `BuildSettingInfoSubpaths.plist` file is a listing of the paths to those files. All paths in the plist file are relative to the `Xcode.app` app wrapper.
7+
8+
The build setting info is sometimes contained in `.strings` files and sometimes in `.xcspec` files.
9+
10+
## Arrays of subpaths
11+
From release to release of Xcode, sometimes the same logical file will have a new path or file name. For instance, many had _English.lproj_ as part of the path, which was changed to _en.lproj_ in subsequent releases. More recently, file names have been gradually being renamed to use a reverse-DNS naming style.
12+
13+
Rather than keep detailed versioning bookkeeping, each array contains a list of paths, at least one of which should be found. If what is conceptually the same file has a different path or file name in a new release, the new path should be added to the array. Ideally it should be added to the beginning of the array, since it will be found sooner when searching more recent Xcode versions. In practice, these arrays are so short the difference is negligible.
14+
15+
## Keys
16+
### subpaths
17+
#### An array of arrays of subpath strings
18+
Each item is an array of paths representing one logical file containing build setting info. The assumption is that at least one of these paths is valid across all versions of Xcode.
19+
20+
Add an entry to a subpath array in this key if the path or filename of an existing entry has changed in a new version of Xcode. Theoretically, any new file containing build setting info would be added to the _ introducedSubpathsByVersion_ key since the file does not exist in prior versions of Xcode.
21+
22+
### deprecatedSubpathsByVersion
23+
#### A dictionary with Xcode version as the key and an array of arrays of subpath strings as the value.
24+
Each key is a version string matching the version string found for the key `DTXcode` in the Xcode `Info.plist` file. The version number matches the version the file was first removed.
25+
26+
The value for each key is an array that works in the same manner as an entry in the subpaths array.
27+
28+
Add to this key when a build setting info file is removed completely. This prevents a warning / error / test failure when using newer Xcode versions as the build info source, but still allows the file to be successfully included when using older Xcode versions as the build info source.
29+
30+
### introducedSubpathsByVersion
31+
#### A dictionary with Xcode version as the key and an array of arrays of subpath strings as the value.
32+
Each key is a version string matching the version string found for the key `DTXcode` the Xcode `Info.plist` file. The version number matches the version the file first appeared.
33+
34+
The value for each key is an array that works in the same manner as an entry in the subpaths array.
35+
36+
Add to this key when a completely new build setting info file is added. This prevents a warning / error / test failure when using older Xcode versions as the build info source, but allows the file to be successfully included when using newer Xcode versions as the build info source.
37+
38+
Note that, just as with the subpaths values, any subpath introduced here is represented as an array. If the path or filename changes for the same logical file, the new subpath should be added to the array.
39+
40+
### backstopSettingInfo
41+
#### A dictionary with string keys and values
42+
Sometimes Xcode does not have a title or description defined for a build setting, or alternately, the file that provides that information has been elusive.
43+
44+
This dictionary provides that missing information as a backstop in case the information is not found by searching the build info files specified by the other keys.
45+
46+
The keys take the form `\[_BuildSettingName_\]-name` for the human-readable title of the build setting and `\[_BuildSettingName_\]-description` for the description of the setting.
47+
48+
The keys match the format of keys found in the various `.strings` files containing build setting info.

0 commit comments

Comments
 (0)