GithubHelp home page GithubHelp logo

Comments (6)

garvankeeley avatar garvankeeley commented on September 26, 2024

The answer is
result = XCodeProject.add_file(...)
for item in result:
``if isinstance(item, PBXBuildFile): item.add_compiler_flag(...)

from mod-pbxproj.

kronenthaler avatar kronenthaler commented on September 26, 2024

Thanks, i didn't have time to check this in detail.
I'll update the Readme to include this kind of common tasks.

from mod-pbxproj.

fadookie avatar fadookie commented on September 26, 2024

I'm still not sure how to do this for files that are already in the project rather than ones I'm trying to add. Also, this was never added to the readme. :)

from mod-pbxproj.

fadookie avatar fadookie commented on September 26, 2024

OK I figured it out, here's an example for others:

def disableArc(filePath):
    fileId = project.get_file_id_by_path(filePath)
    files = project.get_build_files(fileId)
    for f in files:
        f.add_compiler_flag('-fno-objc-arc')

disableArc('Libraries/Plugins/iOS/JSONKit.m')

from mod-pbxproj.

kronenthaler avatar kronenthaler commented on September 26, 2024

Cool you figure it out! Could i ask you to make a PR with the snippet on
the readme? XD
On Dec 16, 2015 8:12 PM, "Eliot Lash" [email protected] wrote:

OK I figured it out, here's an example for others:

def disableArc(filePath):
fileId = project.get_file_id_by_path(filePath)
files = project.get_build_files(fileId)
for f in files:
f.add_compiler_flag('-fno-objc-arc')

disableArc('Libraries/Plugins/iOS/JSONKit.m')


Reply to this email directly or view it on GitHub
#27 (comment)
.

from mod-pbxproj.

fadookie avatar fadookie commented on September 26, 2024

Done: #82

from mod-pbxproj.

Related Issues (20)

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.