project.pbcproj
This file list all information required to build an XCode project. It would usually be written and read by XCode. From the command line, xcodebuild can read this file but not write it.
Information in the file (simplified list):
nitc :: PbxprojectTemplate :: _asset_files
All asset files added to the app packagenitc :: PbxprojectTemplate :: _source_files
All body/implementation source files to be compilednitc :: PbxprojectTemplate :: asset_files
All asset files added to the app packagenitc :: PbxprojectTemplate :: asset_files=
All asset files added to the app packagenitc :: PbxprojectTemplate :: source_files
All body/implementation source files to be compilednitc :: PbxprojectTemplate :: source_files=
All body/implementation source files to be compilednitc $ PbxprojectTemplate :: SELF
Type of this instance, automatically specialized in every classnitc $ PbxprojectTemplate :: rendering
Service used to render the content of the template.nitc :: PbxprojectTemplate :: _asset_files
All asset files added to the app packagetemplate :: Template :: _is_frozen
Is the template allowing more modification (add
)
template :: Template :: _is_writing
Flag to avoid infinite recursivity if a template contains itselftemplate :: Template :: _render_done
Flag to avoid multiple renderingnitc :: PbxprojectTemplate :: _source_files
All body/implementation source files to be compilednitc :: PbxprojectTemplate :: asset_files
All asset files added to the app packagenitc :: PbxprojectTemplate :: asset_files=
All asset files added to the app packagecore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
core :: Writable :: defaultinit
template :: Template :: defaultinit
template :: Template :: is_frozen=
Is the template allowing more modification (add
)
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
template :: Template :: is_writing
Flag to avoid infinite recursivity if a template contains itselftemplate :: Template :: is_writing=
Flag to avoid infinite recursivity if a template contains itselfcore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).template :: Template :: render_done=
Flag to avoid multiple renderingnitc :: PbxprojectTemplate :: source_files
All body/implementation source files to be compilednitc :: PbxprojectTemplate :: source_files=
All body/implementation source files to be compiledcore :: Writable :: write_to_bytes
Likewrite_to
but return a new Bytes (may be quite large)
core :: Writable :: write_to_file
Likewrite_to
but take care of creating the file
core :: Writable :: write_to_string
Likewrite_to
but return a new String (may be quite large).
# Template for a PBX project file, usually a `project.pbcproj`
#
# This file list all information required to build an XCode project.
# It would usually be written and read by XCode.
# From the command line, xcodebuild can read this file but not write it.
#
# Information in the file (simplified list):
#
# * Compilable source files
# * Asset files
# * Build configurations (Release and debug modes, cflags, etc.)
# * List of files composing the project
class PbxprojectTemplate
super Template
# Name of the project
var name: String
# OTHER_CFLAGS
var cflags = "" is writable
# All body/implementation source files to be compiled
private var source_files = new Array[PbxFile]
# All asset files added to the app package
private var asset_files = new Array[PbxFile]
# All files used by this project
private var files = new Array[PbxFile]
# Add `file` to this project
fun add_file(file: PbxFile) do file.add_to_project(self)
redef fun rendering
do
add """
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
"""
# List build files (compilable sources and assets) with their reference UUID
for array in [source_files, asset_files] do for file in array do add """
{{{file.build_uuid}}} /* {{{file.doc}}} */ = {
isa = PBXBuildFile;
fileRef = {{{file.ref_uuid}}} /* {{{file.doc}}} */;
};
"""
add """
0F4688411FDF8748004F34D4 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 0F4688401FDF8748004F34D4 /* assets */; };
0FDD07A21C6F8E0E006FF70E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0FDD07A11C6F8E0E006FF70E /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
/* Static generated files */
AF9F83CC1A5F0D21004B62C0 /* {{{name}}}.app */ = {
isa = PBXFileReference;
explicitFileType = wrapper.application;
includeInIndex = 0;
path = {{{name}}}.app;
sourceTree = BUILT_PRODUCTS_DIR;
};
AF9F83D01A5F0D21004B62C0 /* Info.plist */ = {
isa = PBXFileReference;
lastKnownFileType = text.plist.xml;
path = Info.plist;
sourceTree = "<group>";
};
AF9F83DE1A5F0D21004B62C0 /* Base */ = {
isa = PBXFileReference;
lastKnownFileType = file.storyboard;
name = Base;
path = Base.lproj/Main.storyboard;
sourceTree = "<group>";
};
AF9F83E01A5F0D21004B62C0 /* Images.xcassets */ = {
isa = PBXFileReference;
lastKnownFileType = folder.assetcatalog;
path = Images.xcassets;
sourceTree = "<group>";
};
AF9F83E31A5F0D21004B62C0 /* Base */ = {
isa = PBXFileReference;
lastKnownFileType = file.xib;
name = Base;
path = Base.lproj/LaunchScreen.xib;
sourceTree = "<group>";
};
/* Changing generated files */
"""
# Describe all known files
for file in files do add file.description
add """
0F4688401FDF8748004F34D4 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = {{{name}}}/assets; sourceTree = SOURCE_ROOT; };
0FDD07A11C6F8E0E006FF70E /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
AF9F83C91A5F0D21004B62C0 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
AF9F83C31A5F0D21004B62C0 = {
isa = PBXGroup;
children = (
AF9F83CE1A5F0D21004B62C0 /* {{{name}}} */,
AF9F83CD1A5F0D21004B62C0 /* Products */,
0FDD07A11C6F8E0E006FF70E /* LaunchScreen.storyboard */,
);
sourceTree = "<group>";
};
AF9F83CD1A5F0D21004B62C0 /* Products */ = {
isa = PBXGroup;
children = (
AF9F83CC1A5F0D21004B62C0 /* {{{name}}}.app */,
);
name = Products;
sourceTree = "<group>";
};
AF9F83CE1A5F0D21004B62C0 /* {{{name}}} */ = {
isa = PBXGroup;
children = (
0F4688401FDF8748004F34D4 /* assets */,
"""
# Reference all known files
for file in files do add """
{{{file.ref_uuid}}} /* {{{file.doc}}} */,
"""
add """
);
path = {{{name}}};
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
AF9F83CB1A5F0D21004B62C0 /* {{{name}}} */ = {
isa = PBXNativeTarget;
buildConfigurationList = AF9F83F31A5F0D21004B62C0 /* Build configuration list for PBXNativeTarget "{{{name}}}" */;
buildPhases = (
AF9F83C81A5F0D21004B62C0 /* Sources */,
AF9F83C91A5F0D21004B62C0 /* Frameworks */,
AF9F83CA1A5F0D21004B62C0 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = {{{name}}};
productName = {{{name}}};
productReference = AF9F83CC1A5F0D21004B62C0 /* {{{name}}}.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
AF9F83C41A5F0D21004B62C0 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0610;
TargetAttributes = {
AF9F83CB1A5F0D21004B62C0 = {
CreatedOnToolsVersion = 6.1.1;
};
};
};
buildConfigurationList = AF9F83C71A5F0D21004B62C0 /* Build configuration list for PBXProject "{{{name}}}" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = AF9F83C31A5F0D21004B62C0;
productRefGroup = AF9F83CD1A5F0D21004B62C0 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
AF9F83CB1A5F0D21004B62C0 /* {{{name}}} */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
AF9F83CA1A5F0D21004B62C0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
"""
# Reference all asset files by their build UUID
for file in asset_files do add """
{{{file.build_uuid}}} /* {{{file.doc}}} */,
"""
add """
0FDD07A21C6F8E0E006FF70E /* LaunchScreen.storyboard in Resources */,
0F4688411FDF8748004F34D4 /* assets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
AF9F83C81A5F0D21004B62C0 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
"""
# Reference all compilable source files by their build UUID
for file in source_files do add """
{{{file.build_uuid}}} /* {{{file.doc}}} */,
"""
add """
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
AF9F83F11A5F0D21004B62C0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
AF9F83F21A5F0D21004B62C0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
AF9F83F41A5F0D21004B62C0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = {{{name}}}/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_CFLAGS = "{{{cflags.escape_to_c}}}";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
AF9F83F51A5F0D21004B62C0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = {{{name}}}/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_CFLAGS = "{{{cflags.escape_to_c}}}";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
AF9F83C71A5F0D21004B62C0 /* Build configuration list for PBXProject "{{{name}}}" */ = {
isa = XCConfigurationList;
buildConfigurations = (
AF9F83F11A5F0D21004B62C0 /* Debug */,
AF9F83F21A5F0D21004B62C0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
AF9F83F31A5F0D21004B62C0 /* Build configuration list for PBXNativeTarget "{{{name}}}" */ = {
isa = XCConfigurationList;
buildConfigurations = (
AF9F83F41A5F0D21004B62C0 /* Debug */,
AF9F83F51A5F0D21004B62C0 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = AF9F83C41A5F0D21004B62C0 /* Project object */;
}
"""
end
end
src/platform/xcode_templates.nit:134,1--476,3