su.ho
← All posts

Libraries I consider for a new iOS project

A practical starting list for image loading, networking, secure storage, crash reporting, and Swift style checks.

#ios#libraries#cocoapods

On this page

I do not add the same dependencies to every iOS project. Each dependency adds maintenance work, so it should solve a clear problem.

Still, a short list helps when I start a project. These are the libraries and tools that I consider first.

User interface#

I prefer SwiftUI for new interfaces, so this section does not include UIKit-specific libraries.

Kingfisher#

Kingfisher handles common image downloading, caching, and display tasks:

  • Load images asynchronously.
  • Cache images.
  • Display placeholders, loading indicators, and fade-in effects for downloaded images.
  • Load animated images, such as Graphics Interchange Format (GIF) files.

I consider Kingfisher when an app loads many remote images or needs more control than a small custom loader provides.

Networking#

Alamofire#

Alamofire is a Swift Hypertext Transfer Protocol (HTTP) networking library. Its interface builds on Apple’s Foundation networking stack.

Alamofire can:

  • Make network requests.
  • Handle, validate, and cache responses.
  • Handle authentication.
  • Download and upload data.
  • Adapt and retry requests.
  • Apply security controls, such as Secure Sockets Layer (SSL) pinning.

Foundation can handle many networking needs without another dependency. I consider Alamofire when its request adapters, retries, or response handling remove meaningful project code.

Security#

KeychainAccess#

iOS apps must protect passwords, authentication tokens, and other credentials. KeychainAccess wraps Keychain with a smaller Swift interface.

KeychainAccess provides these features:

  • Store and retrieve sensitive data in the keychain.
  • Synchronize Keychain items with iCloud.
  • Integrate with Touch ID and Face ID.
  • Use Shared Web Credentials.

Tools#

Firebase/Crashlytics#

Firebase Crashlytics is a crash-reporting tool from Google’s Firebase platform. It helps teams investigate crashes that affect users.

Firebase Crashlytics provides these capabilities:

  • Curated crash reports with detailed stack traces.
  • Real-time alerts for new issues, regressed issues, and growing issues.

SwiftLint#

SwiftLint enforces Swift style and conventions in your codebase. Its configurable rules can match your team’s coding standards and preferences.

SwiftLint provides:

  • Code style enforcement.
  • Customizable rules and configurations.
  • Integration with Xcode and continuous integration and continuous delivery (CI/CD) pipelines.

Integrate the dependencies with CocoaPods#

This example uses CocoaPods as the dependency manager. Add the dependencies that your project needs to its Podfile:

Podfile
# User Interface
pod 'Kingfisher'
# Networking
pod 'Alamofire'
# Security
pod 'KeychainAccess'
# Tools
pod 'Firebase/Crashlytics'
pod 'SwiftLint'

Treat this list as a starting point, not a project template. Before you add a dependency, check its maintenance status and confirm that the project needs it.