The SwiftUI Giveaway App is an iOS application built using SwiftUI and Combine. It showcases a collection of game giveaways from various platforms. The app features a horizontal scroll view for Epic Games giveaways and a vertical scroll view for other platform giveaways. Users can filter giveaways by platform, view giveaway details, and mark giveaways as liked.
- Display Epic Games giveaways in a horizontal scroll view with a 3D rotation effect.
- Display giveaways from other platforms in a vertical scroll view.
- Filter giveaways by platform.
- View detailed information about each giveaway.
- Mark giveaways as liked.
- iOS 16.0+
- Xcode 15.0+
- Swift 5.0+
-
Clone the repository:
git clone https://github.com/husseinkishk/GamerPower.git
-
Open the project in Xcode:
open GiveawayApp.xcodeproj
-
Install dependencies: The project uses Swift Package Manager (SPM) to manage dependencies. Open the project in Xcode and go to
File > Swift Packages > Update to Latest Package Versions. -
Build and run the project: Select the target device and click on the
Runbutton or use the shortcutCmd+R.
- Launch the app to see the main view displaying the giveaways.
- Scroll horizontally to see Epic Games giveaways.
- Scroll vertically to see giveaways from other platforms.
- Tap on platform names in the filter bar to filter giveaways.
- Tap on a giveaway card to view its details.
- In the detail view, mark a giveaway as liked by tapping the heart icon.
- Models: Contains the
Giveawaymodel and any other data models. - Views: Contains SwiftUI views such as
HomeView,GiveawayCard, andGiveawayDetailView. - ViewModels: Contains the
HomeViewModelfor managing the state and data of the views. - Network: Contains the
ApiClientandGamerPowerServicefor network requests. - Helpers: Contains utility files such as extensions and helper functions.
The project includes unit and UI tests to ensure functionality and user experience.
-
Unit Tests: Located in the
GiveawayAppTeststarget.- Test the network layer with mock data.
- Test the view models for proper data handling and state changes.
-
UI Tests: Located in the
GiveawayAppUITeststarget.- Test the user interface interactions, including navigation and element visibility.
- Ensure the presence and behavior of elements in both the horizontal and vertical sections.