Giter Site home page Giter Site logo

xcproj's Introduction

About

xcproj is a command line tool for manipulating Xcode project files. It doesn’t do much yet. It also serves as a testbed for XCDUndocumentedChecker.

Requirements

xcproj works with Xcode 5 and 6. Xcode 4 support has been discontinued.

Installation

Homebrew

brew install xcproj

Manually

To install the xcproj tool in /usr/local/bin run the following command, with sudo if required:

xcodebuild -target xcproj install DSTROOT=/

If you want to install xcproj in a custom location, e.g. ~/bin, run the following command:

xcodebuild -target xcproj install DSTROOT=/ INSTALL_PATH=~/bin

Usage

xcproj [options] <action> [arguments]

Options:
 -h, --help        Show this help text and exit
 -V, --version     Show program version and exit
 -p, --project     Path to an Xcode project (*.xcodeproj file). If not specified, the project in the current working directory is used 
 -t, --target      Name of the target. If not specified, the first target is used

Actions:
 * list-targets
     List all the targets in the project

 * list-headers [All|Public|Project|Private] (default=Public)
     List headers from the `Copy Headers` build phase

 * read-build-setting <build_setting>
     Evaluate a build setting and print its value. If the build setting does not exist, nothing is printed

 * write-build-setting <build_setting> <value>
     Assign a value to a build setting. If the build setting does not exist, it is added to the target

 * add-xcconfig <xcconfig_path>
     Add an xcconfig file to the project and base all configurations on it

 * add-resources-bundle <bundle_path>
     Add a bundle to the project and in the `Copy Bundle Resources` build phase

 * touch
     Rewrite the project file

Limitations

  • xcproj relies on the DevToolsCore private framework. Although great care has been taken, it might stop working when you upgrade Xcode.

Contact

Cédric Luthi

xcproj's People

Contributors

0xced avatar sharplet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xcproj's Issues

brew and xcproj

Hi!

What do you think about adding xcproj to a brew channel?

I guess it might help some people :)

Thx
Daniel

XCode8 not work

when I upgrade XCode to 8.1,it fail to change code sign.
this is log:

The IDEFoundation framework failed to load: Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight(/Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/IDEFoundation): Library not loaded: @rpath/DVTAnalytics.framework/Versions/A/DVTAnalytics
Referenced from: /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/IDEFoundation
Reason: image not found" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/IDEFoundation, NSDebugDescription=dlopen_preflight(/Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/IDEFoundation): Library not loaded: @rpath/DVTAnalytics.framework/Versions/A/DVTAnalytics
Referenced from: /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/IDEFoundation
Reason: image not found, NSBundlePath=/Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework, NSLocalizedDescription=The bundle “IDEFoundation” couldn’t be loaded because it is damaged or missing necessary resources.}

Build Setting for Configuration

Is it possible to read a build setting for a specified configuration?

xcproj read-build-setting PRODUCT_BUNDLE_IDENTIFIER -c=Release

DVTFoundation.framework not found

I'm trying to install xcproj using brew install xcproj and I'm receiving the following error

DVTFoundation.framework not found. It probably means that you have deleted, moved or
renamed the Xcode copy that compiled xcproj.
Simply recompiling xcproj should fix this problem.

xcproj failed to touch the project

[!] xcproj failed to touch the project. Check whether you installation of xcproj is functional.

xcproj --project /Users/shmidt/Documents/iOS-development/iOS-Projects/Clients/Pods/Pods.xcodeproj touch
The DevToolsCore framework failed to load: Error Domain=NSCocoaErrorDomain Code=3586 "The bundle “Xcode Core Framework” couldn’t be loaded because it isn’t compatible with the current application." (dlopen_preflight(/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore): no suitable image found.  Did find:
    /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore: GC capability mismatch) UserInfo=0x400319c60 {NSLocalizedFailureReason=The bundle isn’t compatible with this application., NSLocalizedRecoverySuggestion=Try installing a newer version of the bundle., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore, NSDebugDescription=dlopen_preflight(/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore): no suitable image found.  Did find:
    /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore: GC capability mismatch, NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework, NSLocalizedDescription=The bundle “Xcode Core Framework” couldn’t be loaded because it isn’t compatible with the current application.}

Create new target using xcproj cli

I'm looking for a way to automate creating new targets for an existing project. Would this be possible with xcproj? I'm not sure what the 'all configurations' means in: "* add-xcconfig <xcconfig_path>
Add an xcconfig file to the project and base all configurations on it"

xcproj 0.2.1 have trouble with OS X 10.12.2

Hi :
We use xcproj 0.2.1 to touch some project files on OS X 10.12.2, and some of them return an exit code of "1".

As we have tested this file on OS X 10.12.1/10.11.6, as well as Xcode 8.0/8.1, and all of them return an exit code of "0", so may be the xcproj 0.2.1 are not compatible with OS X 10.12.2 ?

The attachment is an example project file, you can test it.

verifyCLLocationManager.xcodeproj.zip

Running error : Assertion failed: _initializationCompletedSuccessfully Function: BOOL IDEIsInitializedForUserInteraction()

hi, Please see below and help me.
This is first error after update to El capitan b2 + xcode 7 b2

xcproj[38698:1845928] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-8123.33/IDEFoundation/Initialization/IDEInitialization.m:590
Details:  Assertion failed: _initializationCompletedSuccessfully
Function: BOOL IDEIsInitializedForUserInteraction()
Thread:   <NSThread: 0x7ff9984100b0>{number = 1, name = main}
Hints: None
Backtrace:
  0  0x0000000106ce5047 -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1  0x0000000106ce47d4 _DVTAssertionHandler (in DVTFoundation)
  2  0x0000000106ce4a40 _DVTAssertionFailureHandler (in DVTFoundation)
  3  0x0000000106ce49a2 _DVTAssertionFailureHandler (in DVTFoundation)
  4  0x000000010778e1a9 IDEIsInitializedForUserInteraction (in IDEFoundation)
  5  0x000000010b6fda5d +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore)
  6  0x000000010b6ff5e2 +[PBXProject projectWithFile:errorHandler:] (in DevToolsCore)
  7  0x00007fff87aab50c __invoking___ (in CoreFoundation)
  8  0x00007fff87aab35e -[NSInvocation invoke] (in CoreFoundation)
  9  0x000000010355ffb3 XCDUndocumentedChecker_forwardInvocation at /Users/blackgene/Documents/termini/xcproj/Sources/XCDUndocumentedChecker.m:39 (in xcproj)
 10  0x00007fff87b1ad52 ___forwarding___ (in CoreFoundation)
 11  0x00007fff87b1aac8 _CF_forwarding_prep_0 (in CoreFoundation)
 12  0x00000001035585bf -[Xcproj setProject:] at /Users/blackgene/Documents/termini/xcproj/Sources/Xcproj.m:207 (in xcproj)
"..........."
Function: BOOL IDEIsInitializedForUserInteraction()

License

Could you include some license information with this project? MIT?

xcproj fails to touch project.

This issue is reproducible on my Mavericks server, but not on my ML machine with Xcode 5.

This occurred while using Cocoapods 0.24.0 under rvm stable running 2.0.0 p247.

I ensured there was no misconfiguration by running sudo xcode-select --print-path, and it is running Xcode 5. The sudoless variant returns the same path.

This isn't greatly affecting me but I'm willing to provide you with any necessary information to reproduce and fix the issue, or at least locate a workaround.

xcproj --project /Users/swizzlr/Documents/********/Pods/Pods.xcodeproj touch
The DevToolsCore framework failed to load: Error Domain=NSCocoaErrorDomain Code=3587 "The bundle “Xcode Core Framework” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(/Applications/Xcode5-DP6.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore): Library not loaded: @rpath/libclang.dylib
  Referenced from: /Applications/Xcode5-DP6.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore
  Reason: image not found) UserInfo=0x7fae9ae042b0 {NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode5-DP6.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore, NSDebugDescription=dlopen_preflight(/Applications/Xcode5-DP6.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore): Library not loaded: @rpath/libclang.dylib
  Referenced from: /Applications/Xcode5-DP6.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/DevToolsCore
  Reason: image not found, NSBundlePath=/Applications/Xcode5-DP6.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework, NSLocalizedDescription=The bundle “Xcode Core Framework” couldn’t be loaded because it is damaged or missing necessary resources.}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.