An Objective-C iOS app that searches GitHub repositories using the GitHub REST API. Built as a showcase project to demonstrate proficiency in Objective-C and UIKit.
This project is intentionally written in Objective-C to demonstrate hands-on knowledge of the language, its idioms, and its integration with UIKit. It covers core concepts that are still relevant in large-scale iOS codebases maintained by companies like Meta, Google, Uber, and many others.
- Search GitHub repositories by keyword
- View repository details (name, description, stars, forks, language)
- Fully programmatic UI — no Storyboards or XIBs
- Custom loading view with animations
- Empty state handling (initial prompt and "not found" states)
| Area | Details |
|---|---|
| Language | Objective-C |
| UI Framework | UIKit (100% programmatic) |
| Architecture | MVC |
| Layout | Masonry (Auto Layout DSL) |
| Networking | NSURLSession with completion block callbacks |
| Dependency Manager | CocoaPods |
| Minimum Target | iOS 15.0 |
The project follows MVC (Model-View-Controller) — the idiomatic pattern for UIKit and Objective-C development.
GitHubBrowser/
├── Models/
│ └── GHRepository # Repository data model with JSON parsing
├── Views/
│ ├── RepositoryCell # Custom self-sizing collection view cell
│ ├── NotFoundCell # Empty state cell (search prompt / not found)
│ └── GHLoadingView # Animated full-screen loading overlay
├── Controllers/
│ └── MainViewController # Search + collection view controller
├── Networking/
│ └── GHApiClient # Singleton API client wrapping NSURLSession
├── Categories/
│ └── UICollectionViewCell+Ext # Reusable cell identifier helper
├── Constants/
│ └── CONSTANTS # Centralized app constants (images, colors)
└── Supporting/
├── AppDelegate
├── SceneDelegate # Programmatic window setup
└── main.m # App entry point
Language fundamentals
- Header (
.h) / Implementation (.m) separation with clean public interfaces - Properties with appropriate attributes (
nonatomic,strong,weak,copy,assign) - Lazy property initialization via getter overrides
- Class prefixing (
GH) for namespacing NS_ASSUME_NONNULL_BEGIN/ENDfor nullability annotations- Lightweight generics (
NSArray<GHRepository *> *)
Design patterns
- Delegate pattern (
UISearchBarDelegate,UICollectionViewDataSource) - Singleton pattern (
GHApiClient.shared) - Block-based callbacks for async networking
- Categories for extending existing classes
UIKit & Layout
- Programmatic UI with no Storyboards or XIBs
UICollectionViewCompositionalLayoutwith estimated sizing- Self-sizing cells with proper Auto Layout constraint chains
- Programmatic
UIWindowandUINavigationControllersetup inSceneDelegate UIViewanimations withCGAffineTransform
Networking
NSURLSessiondata tasks with completion handlers- JSON parsing with
NSJSONSerialization dispatch_asyncto main queue for UI updates- Error handling with
NSError
Memory management
- ARC with correct use of
strong/weakreferences - Proper
prepareForReusein collection view cells
- Xcode 15.0+
- CocoaPods (
gem install cocoapods)
git clone https://github.com/yourusername/GitHubBrowser.git
cd GitHubBrowser
pod install
open GitHubBrowser.xcworkspaceNote: Always open the
.xcworkspacefile, not.xcodeproj, after runningpod install.
- Open
GitHubBrowser.xcworkspacein Xcode - Select a simulator (iPhone 15 Pro recommended)
- Press
Cmd + Rto build and run - Type a search query and tap Search
This app uses the GitHub REST API — no authentication required for basic repository search.
Endpoint used:
GET https://api.github.com/search/repositories?q={query}
This project is available under the MIT License.