https://github.com/armv007/pokemon-swiftui
A simple Pokémon application that fetches and displays a list of Pokémon using the PokéAPI
https://github.com/armv007/pokemon-swiftui
combine combineframework ios ios-app iosapp pokemon-api swift swiftui
Last synced: 8 days ago
JSON representation
A simple Pokémon application that fetches and displays a list of Pokémon using the PokéAPI
- Host: GitHub
- URL: https://github.com/armv007/pokemon-swiftui
- Owner: ARMV007
- License: mit
- Created: 2024-10-22T19:54:47.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T11:10:55.000Z (9 months ago)
- Last Synced: 2025-04-05T12:09:37.993Z (3 months ago)
- Topics: combine, combineframework, ios, ios-app, iosapp, pokemon-api, swift, swiftui
- Language: Swift
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pokémon App
A simple Pokémon application that fetches and displays a list of Pokémon using the [PokéAPI](https://pokeapi.co/). This app utilizes Swift, SwiftUI, UIKit, and Combine, following the MVVM architecture pattern.
https://github.com/user-attachments/assets/8059045a-41a8-4fd3-a443-2f01a9403c12
## Features
- Fetches Pokémon data from the PokéAPI.
- Displays Pokémon names, URLs, and images in a table view.
- Navigates to a detail view for more information about the selectedPokémon.
- Built with programmatic UI and supports unit and UI testing.## Tech Stack
- Swift
- SwiftUI + UIKit
- Combine
- MVVM Architecture
- XCTest for Unit and UI Testing## API Usage
The app fetches data from the PokéAPI. The following endpoint is used to retrieve Pokémon data:
- **Endpoint:** `https://pokeapi.co/api/v2/pokemon?limit=100`## MVVM Architecture
The application follows the MVVM architecture:
- **Model:** Represents the data structure (e.g., `Pokemon`).
- **ViewModel:** Fetches data from the API, handles business logic, and provides data to the views.
- **View:** Displays the data and handles user interactions.## Custom Cells
The app uses a custom table view cell to display each Pokémon's name, URL, and image. The cell is designed programmatically for better flexibility and customization.
## Navigation
Users can tap on a Pokémon in the list to navigate to a detail view that provides additional information about the selected Pokémon.
## Testing
The app includes both unit and UI tests to ensure functionality and performance. You can run the tests using the Xcode testing framework.
### To run tests:
1. Open the `Test Navigator` in Xcode.
2. Select the desired tests and click the run button.## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Contributing
Contributions are welcome! Please open an issue or submit a pull request.