Skip to content

Guide · Open source

How to use YYKit: install with CocoaPods and import it

Updated · written with AI from the project's own documentation and checked against our catalogue data

YYKit is an open-source collection of iOS components written in Objective-C, covering areas such as models, caching, images, rich text and utility categories. This guide shows iOS developers how to add it to a project with CocoaPods, import it, and decide whether to use the full bundle or one of its separate libraries. By the end you will know the install steps, the requirements and the trade-offs the author describes.

YYKitibireme/YYKit · ★ 14k · MIT

Quick start

  1. 1Confirm your environment. Check that you have Xcode 8.0 or later and that your deployment target is iOS 6.0 or later.
  2. 2Add the pod. Add pod 'YYKit' to your Podfile.
  3. 3Install pods. Run pod install, or pod update, in the project folder.
  4. 4Import the header. Add #import <YYKit/YYKit.h> to the Objective-C files that need it.
  5. 5Check the demo. Open Demo/YYKitDemo.xcodeproj from the repository to see example usage.
  6. 6Consider separate libraries. If you only need one component, install its separate library instead of the full collection.

What YYKit is and who it is for

YYKit is a collection of iOS components. The author split its parts into several independent libraries, and the README recommends trying those separate components before using the combined YYKit package.

It is aimed at iOS developers who want ready-made building blocks for Objective-C apps. It is not a fit for Swift-first projects, non-iOS platforms, or projects that need a current iOS version, because the README lists iOS 6.0+ and Xcode 8.0+.

  • YYModel: high performance model framework for iOS.
  • YYCache: high performance cache framework for iOS.
  • YYImage: display, encode and decode animated WebP, APNG and GIF.
  • YYWebImage: asynchronous image loading framework.
  • YYText: rich text component for iOS.
  • YYKeyboardManager: access keyboard view and track keyboard animation.
  • YYDispatchQueuePool: manage global dispatch queues.
  • YYAsyncLayer: utility classes for asynchronous rendering and display.
  • YYCategories: a set of categories for Foundation and UIKit.

Check the requirements before you start

The README says the library requires iOS 6.0+ and Xcode 8.0+. Those versions are very old, so check whether they suit your app before going further.

For the package-manager install, the prerequisites are Xcode 8.0+ and, optionally, CocoaPods or Carthage.

  • Xcode 8.0 or later
  • iOS 6.0 or later as the deployment target
  • CocoaPods or Carthage (optional, for package-manager install)

Install YYKit with CocoaPods

Add the pod to your Podfile, then install the pods from the terminal in your project folder.

The README lists these three steps for CocoaPods.

  • Add pod 'YYKit' to your Podfile.
  • Run pod install (or pod update).
  • Import <YYKit/YYKit.h> in the files that need it.
pod 'YYKit' pod install

Install YYKit with Carthage or manually

Carthage is also supported. The README notes that the Carthage framework does not include the WebP component, so use CocoaPods or install manually if you need WebP support.

For a manual install, download the files in the YYKit subdirectory and add them to your Xcode project. The README also asks you to add the -fno-objc-arc compiler flag to two files and to link a list of system frameworks.

  • Carthage: add github "ibireme/YYKit" to your Cartfile, run carthage update --platform ios, then import <YYKit/YYKit.h>.
  • Manual: add the source files, set -fno-objc-arc on NSObject+YYAddForARC.m and NSThread+YYAdd.m, link the required frameworks, and add Vendor/WebP.framework if you need WebP.
  • Manual frameworks include UIKit, CoreText, CoreGraphics, ImageIO, Accelerate and sqlite3, among others listed in the README.
github "ibireme/YYKit" carthage update --platform ios

Use YYKit in your code

After installation, import the umbrella header in your Objective-C files. The README says the categories are not prefixed, so the APIs are meant to feel like system APIs.

The README also warns that the combined package is not recommended for direct use. If you only need one area, such as rich text, import the separate library for it instead of the whole collection. The Demo/YYKitDemo.xcodeproj project in the repository shows the components in action.

  • Import <YYKit/YYKit.h> to get the whole collection.
  • Open Demo/YYKitDemo.xcodeproj to see example screens such as Twitter- and Weibo-style layouts.
  • Because categories have no prefix, check for name clashes with your own code.
#import <YYKit/YYKit.h>

Choose between YYKit and the separate libraries

The author states that the categories are not prefixed and that the combined package carries more risk of conflicts. The README recommends trying the separate components first, such as YYText for rich text or YYImage for animated formats.

Comparable projects named in this guide's research include YYModel, SDWebImage, Kingfisher and IGListKit. Compare them against the specific task you need.

  • Need one feature (rich text, image decoding, caching)? Install only that library.
  • Need a broad set of utilities in one package? YYKit is the umbrella option, with the caveats above.

What people use it for

  • Adding a rich text component to an Objective-C iOS app through YYText.
  • Displaying or decoding animated WebP, APNG or GIF images with YYImage.
  • Building a model layer for JSON data with YYModel.
  • Using utility categories for Foundation and UIKit in an existing Objective-C codebase.

Frequently asked questions

How do I install YYKit?

Add pod 'YYKit' to your Podfile, run pod install, and import <YYKit/YYKit.h> in your code. Carthage and manual installs are also described in the README.

What are the requirements for YYKit?

The README says YYKit requires iOS 6.0 or later and Xcode 8.0 or later. These are old versions, so check them against your project.

Is YYKit free to use?

YYKit is released under the MIT license, as stated in the README. See the LICENSE file in the repository for the full terms.

Does YYKit support Swift?

The README describes YYKit as Objective-C components only and does not describe Swift support. Swift-first projects may prefer a different library.

Is YYKit a good alternative to SDWebImage or Kingfisher?

YYKit includes image components, but its separate YYWebImage library covers asynchronous image loading. SDWebImage and Kingfisher are other options to compare on your own needs, and the README does not compare them.

Why does the Carthage install not support WebP?

The README states that the Carthage framework does not include the WebP component. Use CocoaPods or a manual install if you need WebP support.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

YYKit suits iOS developers maintaining Objective-C codebases who want ready-made components, especially if they only need one area such as rich text or image decoding. Teams starting a new project, working in Swift, or targeting a current iOS version should look at other libraries instead.

Install options & downloads