Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. Eject

Eject

MITSwift

A command-line tool that generates Swift code from Interface Builder .xib files to transition to programmatic UI layout.

GitHubGitHub
520 stars24 forks0 contributors

What is Eject?

Eject is a command-line tool that converts Interface Builder .xib files into Swift code, allowing iOS developers to transition from visual UI design to programmatic view layout. It solves the pain point of Interface Builder becoming less useful as views grow more dynamic or complex, providing a generated codebase that replaces the .xib file entirely.

Target Audience

iOS developers who use Interface Builder but find it limiting for dynamic or programmatically managed views, and want a structured way to move to code-based UI without manual rewriting.

Value Proposition

Developers choose Eject because it automates the tedious process of converting .xib files to Swift, reducing manual effort and potential errors, while offering descriptive variable names and constraint handling via Anchorage for a smoother transition.

Overview

An eject button for Interface Builder to generate swift code

Use Cases

Best For

  • Converting static Interface Builder views to programmatic Swift code
  • Transitioning legacy .xib-based projects to code-first UI
  • Generating Auto Layout constraints programmatically from .xib files
  • Comparing changes in .xib files through generated code diffs
  • Removing Interface Builder dependencies for dynamic view management
  • Automating UI code generation for iOS development workflows

Not Ideal For

  • Projects requiring production-ready, bug-free code generation without manual intervention
  • Teams using Storyboards or AppKit who need comprehensive UI conversion tools
  • Developers needing guaranteed out-of-the-box compiling code from generated output

Pros & Cons

Pros

Automated XIB Conversion

Generates Swift code from .xib files, automating the tedious process of transitioning away from Interface Builder and reducing manual rewriting errors.

Anchorage-Based Constraints

Uses the Anchorage library to accurately translate Auto Layout constraints into programmatic code, ensuring reliable layout management in Swift.

Outlet Preservation

Handles both outlets and outlet collections, preserving connections in the generated code to maintain functionality without manual re-linking.

Descriptive Variable Naming

Employs user labels or snake-cased class names for variable names, improving code readability and making the generated output easier to understand.

Community Feedback System

Prints warnings for uninterpreted XML, encouraging users to report issues on GitHub, which fosters iterative improvement and community involvement.

Cons

Alpha Quality Tool

Marked as alpha, meaning it may have bugs, incomplete features, and is not recommended for stable production use without extensive testing.

No Compilation Guarantee

Explicitly states that generating code that compiles out of the box is a non-goal, often requiring manual fixes or user labels to avoid errors.

Limited Platform Support

Only supports iOS .xib files with no AppKit or Storyboard conversion, restricting its use to specific project types and ignoring common macOS or storyboard workflows.

Manual Workflow Overhead

Requires users to copy-paste generated code and manually delete .xib files, adding steps that can be error-prone and time-consuming compared to integrated tools.

Frequently Asked Questions

Quick Stats

Stars520
Forks24
Contributors0
Open Issues14
Last commit4 years ago
CreatedSince 2016

Tags

#auto-layout#developer-tools#command-line-tool#programmatic-ui#interface-builder#ios-development#swift#code-generation#uikit

Built With

S
Swift

Included in

iOS51.7k
Auto-fetched 1 day ago

Related Projects

SwifterSwiftSwifterSwift

A handy collection of more than 500 native Swift extensions to boost your productivity.

Stars15,073
Forks1,669
Last commit1 month ago
BlocksKitBlocksKit

The Objective-C block utilities you always wish you had.

Stars6,840
Forks1,250
Last commit8 years ago
libextobjclibextobjc

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

Stars4,504
Forks460
Last commit7 years ago
ThenThen

✨ Super sweet syntactic sugar for Swift initializers

Stars4,390
Forks300
Last commit2 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub