Coder Social home page Coder Social logo

Issue with build script about carte HOT 3 OPEN

theblixguy avatar theblixguy commented on June 14, 2024 1
Issue with build script

from carte.

Comments (3)

JonasSL avatar JonasSL commented on June 14, 2024

I fixed this by writing a small script in the Podfile that removes the unwanted build scripts from other targets.

Replace PROJ-FILE with your own .xcodeproj file and TARGET-NAME with your own target. If it should remove the Carte build scripts from multiple targets, change the select condition.

    project = Xcodeproj::Project.open('PROJ-FILE')
    target = project.targets
                    .select { |target| target.name == 'TARGET-NAME' }
                    .first

    # at_exit blocks will be executed in reverse order.
    at_exit {
      remove_carte_scripts(target)
      project.save
    }

    pods_dir = File.dirname(lib.pods_project.path)
    at_exit { `ruby #{pods_dir}/Carte/Sources/Carte/carte.rb configure` }

from carte.

nerocristallo avatar nerocristallo commented on June 14, 2024

I fixed this by writing a small script in the Podfile that removes the unwanted build scripts from other targets.

Replace PROJ-FILE with your own .xcodeproj file and TARGET-NAME with your own target. If it should remove the Carte build scripts from multiple targets, change the select condition.

    project = Xcodeproj::Project.open('PROJ-FILE')
    target = project.targets
                    .select { |target| target.name == 'TARGET-NAME' }
                    .first

    # at_exit blocks will be executed in reverse order.
    at_exit {
      remove_carte_scripts(target)
      project.save
    }

    pods_dir = File.dirname(lib.pods_project.path)
    at_exit { `ruby #{pods_dir}/Carte/Sources/Carte/carte.rb configure` }

"remove_carte_scripts" ??? What is it?

from carte.

JonasSL avatar JonasSL commented on June 14, 2024

It's here, sorry.

def remove_carte_scripts(target)
  target.build_phases
  .select { |p|
      p.kind_of? Xcodeproj::Project::Object::PBXShellScriptBuildPhase and \
      not p.name.nil? and \
      p.name.include?("Carte")
  }
  .each { |p|
    index = target.build_phases.index(p)
    target.build_phases.delete_at(index)
  }
  puts("Removed Carte scripts.")
end

from carte.

Related Issues (8)

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.