jimon/osx_app_in_plain_c logo

jimon/osx_app_in_plain_c

Free

A simple showcase how to create a simple OS X app in plain C without any Objective-C

FreeFree tier
Type
Open Source

About jimon/osx_app_in_plain_c

This repository is a minimal demonstration of how to create a native macOS (OS X) application using only the C programming language, without any Objective-C or Swift code. It showcases the setup of a basic window and event loop by interfacing directly with Apple's CoreFoundation and AppKit frameworks through C wrappers. The project includes a Makefile for building the application and an appify script for packaging it into a proper .app bundle. It serves as an educational reference for C developers interested in low-level macOS development or exploring alternatives to the standard Objective-C/Swift toolchain. Known limitations include the menu bar not being accessible by mouse on first launch when run from the command line, and the lack of live window resize.

Key Features

Create macOS app using only plain C
Minimal setup with Apple's native frameworks
Includes Makefile for easy building
Includes appify script for packaging
Educational reference for C programmers

Pros & Cons

Pros
  • Demonstrates a minimalist approach to macOS app creation
  • Open source and free to use
  • Easy to build with provided Makefile
  • Shows how to interface with CoreFoundation and AppKit in C
Cons
  • Menu not accessible by mouse on first launch from command line
  • No live resize support
  • Only a basic window; no advanced UI elements
  • May require familiarity with macOS frameworks

Best For

Learning macOS development with plain CAlternative approach for developers familiar with C and not Objective-CProof of concept for lightweight native appsTeaching resource for systems programming

FAQ

What is the purpose of this repository?
It is a simple showcase to demonstrate creating an OS X application in plain C without any Objective-C.
What are the known limitations?
If the app is run from the command line, the menu is not accessible by mouse at first time. Additionally, there is no live resize support yet.
What tools are needed to build this project?
A macOS system with Xcode command line tools (make, gcc/clang) should be sufficient.