Skip to content

A simple Pokémon application that fetches and displays a list of Pokémon using the PokéAPI

License

Notifications You must be signed in to change notification settings

ARMV007/Pokemon-SwiftUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokémon App

A simple Pokémon application that fetches and displays a list of Pokémon using the PokéAPI. This app utilizes Swift, SwiftUI, UIKit, and Combine, following the MVVM architecture pattern.

DemoPokemon.mov

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 selected

Poké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 file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

About

A simple Pokémon application that fetches and displays a list of Pokémon using the PokéAPI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages