A simple iOS app built with UIKit that allows users to search for GIFs using the Giphy API.
- Search GIFs by keyword
- Debounced search input
- Animated GIF grid
- Pagination when scrolling
- GIF detail screen
- Loading indicator
- Error handling with Retry button
- Basic network availability handling
- Unit tests for endpoint building, decoding, and error messages
- Navigation handled with AppCoordinator
- Swift
- UIKit
- URLSession
- SDWebImage
- NWPathMonitor
- XCTest
Features– view controllers and UI componentsModels– response and GIF data modelsNetworking– API client, endpoint builder, and network errorsCore– coordinator and shared utilities
You can find the official Giphy API documentation here.
To run the project, create your own Giphy API key on the Giphy Developers portal.
-
Create a local
Config.xcconfigfile in the project root. -
Add the following line:
GIPHY_API_KEY = your_api_key_here -
Make sure
Config.xcconfigis selected for Debug and Release build configurations. -
The app reads the key through
Info.plist.
Config.xcconfig is excluded from Git to keep the API key private.
The app starts on the search screen, where the user can type a query to search for GIFs. Search requests are debounced to avoid sending a request on every keystroke. Results are displayed in a two-column animated grid. When the user scrolls near the bottom, the next page of results is loaded automatically. Selecting a GIF opens a detail screen with a larger animated preview and title.
The app handles:
- invalid URLs
- invalid server responses
- decoding errors
- server errors such as 429
- network connection loss
When the internet connection is lost, the app shows a message and allows the user to retry the last search.
The project includes unit tests for:
- Giphy endpoint URL building
- readable server error messages
- readable 429 error message
- GIF response decoding
- Third-party library usage is limited to GIF rendering and display support.
- Networking is implemented with
URLSession. - The app was built as a learning project and improved step by step during development.
- During development, automatic retry after reconnect was tested, but iOS Simulator network recovery proved inconsistent. A stable manual Retry flow was kept instead.