Erikote04 / iPokedex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iPokedex

iPokedex is the application I have developed for my Final Degree Project. It uses the PokeAPI to show pokemons in different screens and and allows the user to "interact" with them.

Requirements

  • Mac device that supports Xcode 15
  • Version iOS 17 on Xcode project

PokeAPI

Get one itemm

  GET https://pokeapi.co/api/v2/pokemon/{id or name}/
Parameter Type Description
id Int Id of the pokemon
name String Name of the pokemon

func parsePokemonJSON(_ data: Data) async -> Pokemon?

Decodes JSON data into a Pokemon object. Returns nil if any errors arise.

getPokemon(_ pokemonURL: String, session: URLSession = URLSession.shared) async -> Pokemon?

Retrieves pokemon data from a given URL, handles potential errors gracefully, and returns a Pokemon object if successful, or nil if any issues arise.

func getPokemons() async -> [Pokemon]

Retrieves an array of n (20 by default) Pokemons.

Features

  • Two different lists. Captured pokemons and all existing pokemons.
  • Search
  • Pagination
  • Maps: tracking user location

Installation

  1. Open your terminal
  2. Clone the project: git clone https://Erikote04/iPokedex.git
  3. Open the project on Xcode
  4. Run the app: CMD + R

Screen

Pokedex View Pokedex View Pokepedia Grid Layout View Pokepedia List View Map View Capture Pokemon View

Running Tests

To run tests: CMD + U

About


Languages

Language:Swift 100.0%