Documentation ¶
Overview ¶
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- type CommentValue
- type FileReferenceAndBase
- type FindGroupCriteria
- type PbxFile
- type PbxFileOptions
- type PbxProject
- func (p *PbxProject) AddBuildPhase(filePathsArray []string, buildPhaseType, comment, target string, ...)
- func (p *PbxProject) AddBuildProperty(prop, value, build_name string)
- func (p *PbxProject) AddCopyfile(filePath string, params ...interface{}) error
- func (p *PbxProject) AddFile(filePath string, params ...interface{}) error
- func (p *PbxProject) AddFramework(filePath string, params ...interface{}) error
- func (p *PbxProject) AddHeaderFile(filePath string, params ...interface{}) error
- func (p *PbxProject) AddHeaderFileWithOptions(filePath string, params ...interface{}) error
- func (p *PbxProject) AddKnownRegion(name string)
- func (p *PbxProject) AddLocalizationVariantGroup(name string) *PbxFile
- func (p *PbxProject) AddPbxGroup(filePathsArray []string, name, path, sourceTree string)
- func (p *PbxProject) AddPluginFile(filePath string, params ...interface{}) error
- func (p *PbxProject) AddProductFile(filePath string, params ...interface{}) error
- func (p *PbxProject) AddResourceFile(filePath string, params ...interface{}) error
- func (p *PbxProject) AddSourceFile(filePath string, params ...interface{}) error
- func (p *PbxProject) AddStaticLibrary(filePath string, params ...interface{}) error
- func (p *PbxProject) AddTarget(name, targetType, subfolder, bundleId string) error
- func (p *PbxProject) AddTargetAttribute(prop, value string, target pegparser.ObjectWithUUID) error
- func (p *PbxProject) AddTargetDependency(target string, dependencyTargets []string)
- func (p *PbxProject) Contents() pegparser.Object
- func (p *PbxProject) Dump(writer io.Writer) error
- func (p *PbxProject) GetBuildProperty(prop, build, targetName string) (props []string)
- func (p *PbxProject) HasKnownRegion(name string) bool
- func (p *PbxProject) Parse() error
- func (p *PbxProject) RemoveBuildProperty(prop, build_name string)
- func (p *PbxProject) RemoveCopyfile(filePath string, params ...interface{}) error
- func (p *PbxProject) RemoveFile(filePath string, params ...interface{}) error
- func (p *PbxProject) RemoveFramework(filePath string, params ...interface{}) error
- func (p *PbxProject) RemoveHeaderFile(filePath string, params ...interface{}) error
- func (p *PbxProject) RemoveKnownRegion(name string)
- func (p *PbxProject) RemovePbxGroup(groupName string)
- func (p *PbxProject) RemovePluginFile(filePath string, params ...interface{}) error
- func (p *PbxProject) RemoveProductFile(filePath string, params ...interface{}) error
- func (p *PbxProject) RemoveResourceFile(filePath string, params ...interface{}) error
- func (p *PbxProject) RemoveSourceFile(filePath string, params ...interface{}) error
- func (p *PbxProject) RemoveTargetAttribute(prop string, target pegparser.ObjectWithUUID) error
- func (p *PbxProject) UpdateBuildProperty(prop, value, build, targetName string)
- func (p *PbxProject) UpdateProductName(name string)
- func (p *PbxProject) WriteSync(options PbxProjectWriterOption) error
- type PbxProjectWriterOption
- type PbxWriter
- type PbxWriterOption
- type Setting
- type StringWriter
Constants ¶
const ( DEFAULT_SOURCETREE = "\"<group>\"" DEFAULT_PRODUCT_SOURCETREE = "BUILT_PRODUCTS_DIR" DEFAULT_FILEENCODING = 4 DEFAULT_GROUP = "Resources" DEFAULT_FILETYPE = "unknown" )
const COMMENT_KEY_SUFFIX = "_comment"
const DEFAULT_ENCODING_VALUE = 4
const (
INDENT = "\t"
)
Variables ¶
var ENCODING_BY_FILETYPE = map[string]int{ "sourcecode.c.h": DEFAULT_ENCODING_VALUE, "sourcecode.c.objc": DEFAULT_ENCODING_VALUE, "sourcecode.swift": DEFAULT_ENCODING_VALUE, "text": DEFAULT_ENCODING_VALUE, "text.plist.xml": DEFAULT_ENCODING_VALUE, "text.script.sh": DEFAULT_ENCODING_VALUE, "text.xcconfig": DEFAULT_ENCODING_VALUE, "text.plist.strings": DEFAULT_ENCODING_VALUE, }
var EXTENSION_BY_FILETYPE = revertMap(FILETYPE_BY_EXTENSION)
var FILETYPE_BY_EXTENSION = map[string]string{
"a": "archive.ar",
"app": "wrapper.application",
"appex": "wrapper.app-extension",
"bundle": "wrapper.plug-in",
"dylib": "compiled.mach-o.dylib",
"framework": "wrapper.framework",
"h": "sourcecode.c.h",
"m": "sourcecode.c.objc",
"markdown": "text",
"mdimporter": "wrapper.cfbundle",
"octest": "wrapper.cfbundle",
"pch": "sourcecode.c.h",
"plist": "text.plist.xml",
"sh": "text.script.sh",
"swift": "sourcecode.swift",
"tbd": "sourcecode.text-based-dylib-definition",
"xcassets": "folder.assetcatalog",
"xcconfig": "text.xcconfig",
"xcdatamodel": "wrapper.xcdatamodel",
"xcodeproj": "wrapper.pb-project",
"xctest": "wrapper.cfbundle",
"xib": "file.xib",
"strings": "text.plist.strings",
}
var GROUP_BY_FILETYPE = map[string]string{
"archive.ar": "Frameworks",
"compiled.mach-o.dylib": "Frameworks",
"sourcecode.text-based-dylib-definition": "Frameworks",
"wrapper.framework": "Frameworks",
"embedded.framework": "Embed Frameworks",
"sourcecode.c.h": "Resources",
"sourcecode.c.objc": "Sources",
"sourcecode.swift": "Sources",
}
var PATH_BY_FILETYPE = map[string]string{
"compiled.mach-o.dylib": "usr/lib/",
"sourcecode.text-based-dylib-definition": "usr/lib/",
"wrapper.framework": "System/Library/Frameworks/",
}
var SOURCETREE_BY_FILETYPE = map[string]string{
"compiled.mach-o.dylib": "SDKROOT",
"sourcecode.text-based-dylib-definition": "SDKROOT",
"wrapper.framework": "SDKROOT",
}
Functions ¶
This section is empty.
Types ¶
type CommentValue ¶
func (CommentValue) ToObject ¶
func (c CommentValue) ToObject() pegparser.Object
type FileReferenceAndBase ¶
type FindGroupCriteria ¶
type PbxFile ¶
type PbxFile struct { Basename string FileRef string LastKnownFileType string Group string CustomFramework bool Dirname string Path string FileEncoding int ExplicitFileType string SourceTree string DefaultEncoding int IncludeInIndex int Settings pegparser.Object Uuid string Target string Models []*PbxFile CurrentModel *PbxFile Plugin bool }
type PbxFileOptions ¶
type PbxProject ¶
type PbxProject struct {
// contains filtered or unexported fields
}
func NewPbxProject ¶
func NewPbxProject(filename string) PbxProject
func (*PbxProject) AddBuildPhase ¶
func (p *PbxProject) AddBuildPhase(filePathsArray []string, buildPhaseType, comment, target string, optionsOrFolderType interface{}, subfolderPath string)
func (*PbxProject) AddBuildProperty ¶
func (p *PbxProject) AddBuildProperty(prop, value, build_name string)
func (*PbxProject) AddCopyfile ¶
func (p *PbxProject) AddCopyfile(filePath string, params ...interface{}) error
func (*PbxProject) AddFile ¶
func (p *PbxProject) AddFile(filePath string, params ...interface{}) error
func (*PbxProject) AddFramework ¶
func (p *PbxProject) AddFramework(filePath string, params ...interface{}) error
func (*PbxProject) AddHeaderFile ¶
func (p *PbxProject) AddHeaderFile(filePath string, params ...interface{}) error
func (*PbxProject) AddHeaderFileWithOptions ¶
func (p *PbxProject) AddHeaderFileWithOptions(filePath string, params ...interface{}) error
func (*PbxProject) AddKnownRegion ¶
func (p *PbxProject) AddKnownRegion(name string)
func (*PbxProject) AddLocalizationVariantGroup ¶
func (p *PbxProject) AddLocalizationVariantGroup(name string) *PbxFile
func (*PbxProject) AddPbxGroup ¶
func (p *PbxProject) AddPbxGroup(filePathsArray []string, name, path, sourceTree string)
func (*PbxProject) AddPluginFile ¶
func (p *PbxProject) AddPluginFile(filePath string, params ...interface{}) error
func (*PbxProject) AddProductFile ¶
func (p *PbxProject) AddProductFile(filePath string, params ...interface{}) error
func (*PbxProject) AddResourceFile ¶
func (p *PbxProject) AddResourceFile(filePath string, params ...interface{}) error
func (*PbxProject) AddSourceFile ¶
func (p *PbxProject) AddSourceFile(filePath string, params ...interface{}) error
func (*PbxProject) AddStaticLibrary ¶
func (p *PbxProject) AddStaticLibrary(filePath string, params ...interface{}) error
func (*PbxProject) AddTarget ¶
func (p *PbxProject) AddTarget(name, targetType, subfolder, bundleId string) error
func (*PbxProject) AddTargetAttribute ¶
func (p *PbxProject) AddTargetAttribute(prop, value string, target pegparser.ObjectWithUUID) error
func (*PbxProject) AddTargetDependency ¶
func (p *PbxProject) AddTargetDependency(target string, dependencyTargets []string)
func (*PbxProject) Contents ¶
func (p *PbxProject) Contents() pegparser.Object
func (*PbxProject) GetBuildProperty ¶
func (p *PbxProject) GetBuildProperty(prop, build, targetName string) (props []string)
func (*PbxProject) HasKnownRegion ¶
func (p *PbxProject) HasKnownRegion(name string) bool
func (*PbxProject) Parse ¶
func (p *PbxProject) Parse() error
func (*PbxProject) RemoveBuildProperty ¶
func (p *PbxProject) RemoveBuildProperty(prop, build_name string)
func (*PbxProject) RemoveCopyfile ¶
func (p *PbxProject) RemoveCopyfile(filePath string, params ...interface{}) error
func (*PbxProject) RemoveFile ¶
func (p *PbxProject) RemoveFile(filePath string, params ...interface{}) error
func (*PbxProject) RemoveFramework ¶
func (p *PbxProject) RemoveFramework(filePath string, params ...interface{}) error
func (*PbxProject) RemoveHeaderFile ¶
func (p *PbxProject) RemoveHeaderFile(filePath string, params ...interface{}) error
func (*PbxProject) RemoveKnownRegion ¶
func (p *PbxProject) RemoveKnownRegion(name string)
func (*PbxProject) RemovePbxGroup ¶
func (p *PbxProject) RemovePbxGroup(groupName string)
func (*PbxProject) RemovePluginFile ¶
func (p *PbxProject) RemovePluginFile(filePath string, params ...interface{}) error
func (*PbxProject) RemoveProductFile ¶
func (p *PbxProject) RemoveProductFile(filePath string, params ...interface{}) error
func (*PbxProject) RemoveResourceFile ¶
func (p *PbxProject) RemoveResourceFile(filePath string, params ...interface{}) error
func (*PbxProject) RemoveSourceFile ¶
func (p *PbxProject) RemoveSourceFile(filePath string, params ...interface{}) error
func (*PbxProject) RemoveTargetAttribute ¶
func (p *PbxProject) RemoveTargetAttribute(prop string, target pegparser.ObjectWithUUID) error
func (*PbxProject) UpdateBuildProperty ¶
func (p *PbxProject) UpdateBuildProperty(prop, value, build, targetName string)
func (*PbxProject) UpdateProductName ¶
func (p *PbxProject) UpdateProductName(name string)
func (*PbxProject) WriteSync ¶
func (p *PbxProject) WriteSync(options PbxProjectWriterOption) error
type PbxProjectWriterOption ¶
type PbxProjectWriterOption struct { }
type PbxWriter ¶
type PbxWriter struct {
// contains filtered or unexported fields
}
func NewPbxWriter ¶
func NewPbxWriter(project *PbxProject, options ...PbxWriterOption) *PbxWriter
type PbxWriterOption ¶
type PbxWriterOption func(w *PbxWriter)
func WithOmitEmpty ¶
func WithOmitEmpty() PbxWriterOption
func WithStringWriter ¶
func WithStringWriter(writer StringWriter) PbxWriterOption