Toolkit for daily Cocoa development. Since 2012.

License: Other

Language: Objective-C

Keywords: category, extensions, ios, language-extensions, log, macos, macros, objective-c, toolkit, tvos, uikit, watchos


Build Status Codecov CocoaPods

English 简体中文 🇨🇳

RFKit is a useful toolkit for daily Cocoa development.


RFKit Version Minimum Xcode Version Minimum iOS Target Minimum macOS Target Minimum watchOS Target Minimum tvOS Target
2.0+ Xcode 8 iOS 6 macOS 10.8 watchOS 2.0 tvOS 9.0
1.7 Xcode 7 iOS 6 macOS 10.8 watchOS 2.0 tvOS 9.0
1.6 Xcode 8 iOS 6 N/A watchOS 2.0 N/A



To install using CocoaPods, add the following to your project Podfile:

pod 'RFKit'

Specify develop branch to install the lastest version:

pod 'RFKit', :git => '', :branch => 'develop'

A more complex sample:

pod 'RFKit',
    :git => '',
    :branch => 'develop',
    :subspecs => ['Default', 'Category/NSDateFormatter']


You can always import RFKit by adding source code into your project. Just copy any files you needs.


dout contains a set of convenient log toolcha, which was designed for debugging.


  • Out out format is better than NSLog(), and more faster.

  • Auto add expression before the results.


    int a = 10;
    dout_int(101+a)  // Output: 101+a = 111
  • Optimized for multiple threads debugging, you can easily find the output come from which thread.

  • Support add position information in log output to help tracking location of log statements. Set DOUT_FALG_TRACE as 1 to active.

  • Special log methods for warning and error. Can change theirs behave to throw exception or assert fail.

  • Behavior can be highly customizable through the switch.

  • As macro, usually no performance loss.

Details: dout Document(in Chinese)


Handle build or runtime differences. Provides an unified and simple interface for upper components. Contains:debugging switch define, default header file, RFARC and language extensions.

Debugging switch

RFDEBUG, RFKit debug mode switch. Set as 1 to active. If it´s not defined, will defined as 1 when DEBUG is true and NDEBUG not defined.

RFDebugLevel, controlling debugging behavior. If it´s not defined, will be defined as 2 if RFDEBUG is true, otherwise 1.

Default header file

UIKit and Foundation header is included in RFRuntime by default.


Defined some fake protocols for declaring a class support something or not.


Some helper function for GCD.

Language extensions

Include some components from libextobjc:

  • metamacros.h, macros for metaprogramming.
  • EXTKeyPathCoding, allows compile-time verification of key paths.
  • EXTScope, several tools relative to scope.

@keypathClassInstance is similar with @keypath, but accept a class as parameter instead of a instance variable.

UIKit & Foundation Categories

Important part of RFKit. They contains many useful methods.

RFKitDefaultCategories.h defends which extension is imported by default.

See each header file to know the specific features.


Add new methods and constants for geometry structures: CGPoint, CGSize, CGRect. Add an new CGAngle angle structure.

RFResizeAnchor and RFAlignmentAnchor provides a reference for resizing and aligning.

RFPerformance & doutkit

Performance toolkit.


Some external components were placed under external folder.

Change log

Project Statistics

Sourcerank 6
Repository Size 607 KB
Stars 20
Forks 6
Watchers 2
Open issues 0
Dependencies 2
Contributors 2
Tags 15
Last updated
Last pushed

Top Contributors See all

BB9z ddhjy

Packages Referencing this Repo

Tool kit for daily cocoa development.
Latest release 2.3.0 - Updated - 20 stars

Recent Tags See all

2.3.0 September 18, 2018
2.2.1 September 17, 2018
2.2.0 June 10, 2018
2.1.0 April 30, 2018
2.0.1 April 23, 2018
2.0.0 April 22, 2018
1.7.1 March 15, 2018
1.7.0 February 26, 2018
1.6.1 February 13, 2018
1.5 March 13, 2015
1.4 May 14, 2014
1.3 June 18, 2013
1.2 March 31, 2013
1.1 March 06, 2013
1.0 November 12, 2012

Something wrong with this page? Make a suggestion

Last synced: 2018-10-23 16:27:40 UTC

Login to resync this repository