GithubHelp home page GithubHelp logo

honood / libextobjc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jspahrsummers/libextobjc

0.0 0.0 0.0 1.56 MB

A Cocoa library to extend the Objective-C programming language.

License: MIT License

C 17.32% Objective-C 82.56% Objective-C++ 0.12%

libextobjc's Introduction

The Extended Objective-C library extends the dynamism of the Objective-C programming language to support additional patterns present in other programming languages (including those that are not necessarily object-oriented).

libextobjc is meant to be very modular โ€“ most of its classes and modules can be used with no more than one or two dependencies.

Features

libextobjc currently includes the following features:

  • Safe categories, using EXTSafeCategory, for adding methods to a class without overwriting anything already there (identifying conflicts for you).
  • Concrete protocols, using EXTConcreteProtocol, for providing default implementations of the methods in a protocol.
  • Simpler and safer key paths, using EXTKeyPathCoding, which automatically checks key paths at compile-time.
  • Compile-time checking of selectors to ensure that an object declares a given selector, using EXTSelectorChecking.
  • Easier use of weak variables in blocks, using @weakify, @unsafeify, and @strongify from the EXTScope module.
  • Scope-based resource cleanup, using @onExit in the EXTScope module, for automatically cleaning up manually-allocated memory, file handles, locks, etc., at the end of a scope.
  • Algebraic data types generated completely at compile-time, defined using EXTADT.
  • Synthesized properties for categories, using EXTSynthesize.
  • Block-based coroutines, using EXTCoroutine.
  • EXTNil, which is like NSNull, but behaves much more closely to actual nil (i.e., doesn't crash when sent unrecognized messages).
  • Lots of extensions and additional functionality built on top of <objc/runtime.h>, including extremely customizable method injection, reflection upon object properties, and various functions to extend class hierarchy checks and method lookups.

The experimental branch contains additional features that may be interesting, but are not considered stable or safe for production use. Check out the headers for more information.

Running tests

To execute libextobjc's tests, first run git submodule update --init --recursive to bring in the xcconfigs submodule, then open the project file and choose the desired test target.

Adding to your project

If you want to add libextobjc as a dependency to an application, add the repository as a submodule, then include the source files you care about in your Xcode project.

If you want to add libextobjc as a dependency to a framework or library, prefer subtree merging, which will allow you to rename symbols to avoid conflicts, and make any tweaks you need to for your library.

To create a libextobjc subtree:

$ git remote add libextobjc https://github.com/jspahrsummers/libextobjc.git
$ git fetch libextobjc
$ git read-tree --prefix=External/ -u libextobjc/master
$ git reset

Rename any symbols or change whatever you want, git add the specific files that you want in your library, and then add them to your Xcode project.

To bring in upstream changes later:

$ git fetch -p libextobjc
$ git merge -Xsubtree=External/ libextobjc/master
$ git reset

Then, again, just add the changes you want.

License

Released under the MIT License. See the LICENSE file for more information.

Requirements

libextobjc must be built with ARC enabled, and many of its macros require ARC in the calling files as well. MRR usage is not supported.

libextobjc's People

Contributors

ahti avatar antondomashnev avatar bigboybad avatar claybridges avatar cuitche avatar diederich avatar fabb avatar flexih avatar grgcombs avatar honood avatar ikashkuta avatar javisoto avatar jonsterling avatar joshaber avatar joshvera avatar jspahrsummers avatar juliengrimault avatar k-be avatar k06a avatar kolyuchiy avatar ole avatar reiz avatar shepting avatar sibljon avatar timmehmainframe avatar tonyarnold avatar wanganjun 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.