GithubHelp home page GithubHelp logo

xcode-editor's Introduction

Description

An API for manipulating Xcode project files.

Usage

Adding Source Files to a Project

Project* project = [[Project alloc] initWithFilePath:@"MyProject.xcodeproj"];
Group* group = [project groupWithPath:@"Main"];
ClassDefinition* classDefinition = [[ClassDefinition alloc] initWithName:@"MyNewClass"];
[classDefinition setHeader:@"<some-header-text>"];
[classDefinition setSource:@"<some-impl-text>"];

[group addClass:classDefinition];
[project save];

Specifying Source File Belongs to Target

File* sourceFile = [project fileWithName:@"MyNewClass.m"];
Target* examples = [project targetWithName:@"Examples"];
[examples addMember:sourceFile];
[project save];

Adding a Xib File

This time, we'll use a convenience method on xcode_Group to specify the targets at the same time:

XibDefinition* xibDefinition = [[XibDefinition alloc] initWithName:@"MyXibFile" content:@"<xibXml>"];
[group addXib:xibDefinition toTargets:[project targets]];
[project save];

Adding a Framework

FrameworkDefinition* frameworkDefinition = 
    [[FrameworkDefinition alloc] initWithFilePath:@"<framework path>" copyToDestination:NO];
[group addFramework:frameworkDefinition toTargets:[project targets]];
[project save];

Setting copyToDestination to YES, will cause the framework to be first copied to the group's directory within the project, and subsequently linked from there.

Docs

The Source/Tests folder contains further usasge examples. A good starting point is to run the test target in Xcode. This will extract a test project to the /tmp directory, where you'll be able to see the outcome for yourself.

Building

Just the Framework

Open the project in XCode and choose Product/Build.

Command-line Build

Includes Unit Tests, Integration Tests, Code Coverge and API reports installed to Xcode.

Requirements (one time only)

In addition to Xcode, requires the Appledoc and lcov packages. A nice way to install these is with MacPorts.

git clone https://github.com/tomaz/appledoc.git
sudo install-appledoc.sh
sudo port install lcov

NB: Xcode 4.3+ requires command-line tools to be installed separately.

Running the build (every other time)

ant 

Feature Requests and Contributions

. . . are very welcome.

If you're using the API shoot me an email and tell me what you're doing with it.

Compatibility

  • Xcode-editor has been tested on Xcode 4+. It should also work on earlier versions of Xcode. The AppCode IDE from JetBrains is not yet supported.
  • It uses ARC and weak references so requires iOS 5.0 or OSX 10.7 64 bit.

Who's using it?

  • expanz: A RAD framework that enables .NET developers in producing cross-platform and cloud apps.
  • Less Painful: Automated functional testing for mobile applications.
  • Level Helper: A RAD framework for developing 2D games on iOS & Android.

Authors

LICENSE

Apache License, Version 2.0, January 2004, http://www.apache.org/licenses/

xcode-editor's People

Contributors

hiddenmemory avatar jasperblues avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

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.