Skip to content

[iOS] Ravindra Bhati — PokéDex Assignment - #7

Open
RavindraBhati7 wants to merge 2 commits into
Robustrade:mainfrom
RavindraBhati7:ios/feature/ravindra-pokedex
Open

[iOS] Ravindra Bhati — PokéDex Assignment#7
RavindraBhati7 wants to merge 2 commits into
Robustrade:mainfrom
RavindraBhati7:ios/feature/ravindra-pokedex

Conversation

@RavindraBhati7

Copy link
Copy Markdown

Summary

Implemented the iOS UI for the PokéDex app by integrating the provided KMP shared module.

Key decisions:

  1. Use SwiftUI + MVVM-style wrapper (ObservableObject) for clean separation
  2. Implemented StateFlow → SwiftUI binding using async stream approach
  3. Used NavigationStack for navigation
  4. Followed modular and reusable UI component structure

Features Implemented

  • Pokémon List screen
    • Grid/List UI
    • Pagination (load more)
    • Search functionality
  • Pokémon Detail screen
    • Image, types, stats, height/weight
    • Favourite toggle
  • Favourites screen
    • Reactive updates on favourite change
  • State Management
    • KMP StateFlow observed via Swift wrapper
  • Integration
    • Koin initialized in App entry point
    • Shared module integrated via CocoaPods

Architecture & Technical Decisions

  • Used ObservableObject wrapper pattern to bridge KMP StateFlow into SwiftUI
  • Implemented AsyncStream-based StateFlow collection
  • Applied @MainActor for UI safety
  • Ensured proper memory management:
    • [weak self] usage
    • Task cancellation handling
  • Modular reusable components:
    - TypeChip
    - StatBar
    - FlowLayout

Testing & CI

  • Added unit tests for:
    • Store layer
    • Favorites logic
    • Utility components
  • Configured GitHub Actions CI:
    • Build shared KMP framework
    • Install CocoaPods dependencies
    • Build iOS app (simulator)
    • Run tests

Checklist

  • Pokémon List with pagination
  • Search functionality
  • Detail screen with all fields
  • Favourite toggle (persistent)
  • Favourites screen reactive updates
  • Clean architecture (no logic in Views)
  • Proper memory management
  • Meaningful commits
  • Screenshots added

Screenshot


Home / List Screen

Search

Detail Screen

Favourites Screen

- Integrated shared KMP framework using CocoaPods
- Implemented Pokemon List screen with pagination and search
- Built Pokemon Detail screen with stats, types, and favourite toggle
- Added Favourites screen with reactive updates
- Implemented StateFlow → SwiftUI binding using ObservableObject wrapper
- Handled loading, error, and empty states
- Configured Koin initialization in App entry point
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant