Giter VIP home page Giter VIP logo

cocoapods-readonly's Introduction

cocoapods-readonly

Developers switching from submodules are used to modifying library source files from within Xcode. If you don’t checkout a local version first, changes won’t be picked up by git and might be lost the next time you run ‘pod install.'

This plugin removes the write permission from all pod-related files that aren’t installed via a local pod. Xcode will then give you a helpful message, noting that the file is locked.

Installation

$ gem install cocoapods-readonly

Usage

This runs automatically on pod install – you don't have to do anything.

cocoapods-readonly's People

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

Watchers

 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

Forkers

cutes guieco

cocoapods-readonly's Issues

Conflicts with pods with require Run Script build phases.

I'm using this with the CrashlyticsFramework pod and ran into trouble because I the run script had it's permissions changed and then it couldn't run at build time.

I think the right solution for this is to not set blanket 444 permissions, but to only remove write access if write access is set. Thoughts? I'll make a PR if you agree.

Doesn't Work

When running pod install using cocoapods 3.9, I receive this error:

---------------------------------------------
Error loading the plugin with path `/Library/Ruby/Gems/2.0.0/gems/cocoapods-readonly-1.0.1/lib/cocoapods_plugin.rb`.

NameError - undefined method `run_pre_install_hooks' for class `Pod::Installer'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-readonly-1.0.1/lib/cocoapods-readonly/toggle_readonly.rb:21:in `alias_method'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-readonly-1.0.1/lib/cocoapods-readonly/toggle_readonly.rb:21:in `<class:Installer>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-readonly-1.0.1/lib/cocoapods-readonly/toggle_readonly.rb:2:in `<module:Pod>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-readonly-1.0.1/lib/cocoapods-readonly/toggle_readonly.rb:1:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-readonly-1.0.1/lib/cocoapods_plugin.rb:1:in `require'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-readonly-1.0.1/lib/cocoapods_plugin.rb:1:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command/plugin_manager.rb:106:in `require'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command/plugin_manager.rb:106:in `safe_require'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command/plugin_manager.rb:32:in `block in load_plugins'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command/plugin_manager.rb:31:in `each'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command/plugin_manager.rb:31:in `load_plugins'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:304:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:303:in `each'
/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:303:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
---------------------------------------------

Should mark .pch files readonly too.

If a podspec specifies a .pch file via prefix_header_file it does not get marked readonly.

s.prefix_header_file = "SquareData/SquareData-Prefix.pch"

-rw-r--r-- 1 brianpartridge brianpartridge 584 Apr 15 15:29 Pods/SquareData/SquareData/SquareData-Prefix.pch

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.