Documentation ¶
Overview ¶
Example ¶
workspace, err := Open("workspace.xcworkspace") if err != nil { panic(err) } var fileRefLocations []string for _, fileRef := range workspace.FileRefs { pth, err := fileRef.AbsPath("workspace_dir") if err != nil { panic(err) } fileRefLocations = append(fileRefLocations, pth) } for _, group := range workspace.Groups { groupPth, err := group.AbsPath("workspace_dir") if err != nil { panic(err) } for _, fileRef := range group.FileRefs { pth, err := fileRef.AbsPath(groupPth) if err != nil { panic(err) } fileRefLocations = append(fileRefLocations, pth) } } var projects []xcodeproj.XcodeProj for _, fileRefLocation := range fileRefLocations { if !xcodeproj.IsXcodeProj(fileRefLocation) { continue } project, err := xcodeproj.Open(fileRefLocation) if err != nil { panic(err) } projects = append(projects, project) }
Output:
Index ¶
- Constants
- func IsWorkspace(pth string) bool
- type FileRef
- type FileRefType
- type Group
- type Workspace
- func (w Workspace) FileLocations() ([]string, error)
- func (w Workspace) ProjectFileLocations() ([]string, error)
- func (w Workspace) Scheme(name string) (*xcscheme.Scheme, string, error)
- func (w Workspace) SchemeBuildSettings(scheme, configuration string, customOptions ...string) (serialized.Object, error)
- func (w Workspace) Schemes() (map[string][]xcscheme.Scheme, error)
Examples ¶
Constants ¶
View Source
const (
// XCWorkspaceExtension ...
XCWorkspaceExtension = ".xcworkspace"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileRef ¶
type FileRef struct {
Location string `xml:"location,attr"`
}
FileRef ...
func (FileRef) TypeAndPath ¶
func (f FileRef) TypeAndPath() (FileRefType, string, error)
TypeAndPath ...
type FileRefType ¶
type FileRefType string
FileRefType ...
const ( AbsoluteFileRefType FileRefType = "absolute" GroupFileRefType FileRefType = "group" ContainerFileRefType FileRefType = "container" )
Known FileRefTypes
type Group ¶
type Group struct { Location string `xml:"location,attr"` FileRefs []FileRef `xml:"FileRef"` Groups []Group `xml:"Group"` }
Group ...
type Workspace ¶
type Workspace struct { FileRefs []FileRef `xml:"FileRef"` Groups []Group `xml:"Group"` Name string Path string }
Workspace represents an Xcode workspace
func (Workspace) FileLocations ¶
FileLocations ...
func (Workspace) ProjectFileLocations ¶
ProjectFileLocations ...
func (Workspace) SchemeBuildSettings ¶
func (w Workspace) SchemeBuildSettings(scheme, configuration string, customOptions ...string) (serialized.Object, error)
SchemeBuildSettings ...
Click to show internal directories.
Click to hide internal directories.