A demo iOS app showcasing the QuickPose SDK for AI-powered push-up counting using real-time pose estimation.
Push-Up Counter Demo is a complete iOS application that demonstrates how to integrate the QuickPose SDK to build a fitness tracking app. The app uses AI-powered pose estimation to accurately count push-up repetitions in real-time, providing users with visual feedback and workout history tracking.
- Reps Mode: Complete a target number of push-ups
- Time Mode: Do as many push-ups as possible within a time limit
- Real-time pose detection using QuickPose SDK
- Upper-body skeleton overlay for visual feedback
- Automatic rep counting with form validation
- Position detection with bounding box guide
- Workout history with Core Data persistence
- Detailed workout summaries (reps, duration, average time per rep)
- Swipe-to-delete workout history
- 3-second countdown before workout starts
- Real-time rep counter and timer display
- Form feedback and positioning guidance
- Smooth navigation between screens
- iOS 18.0+
- Xcode 26.2+
- QuickPose SDK Key (free at dev.quickpose.ai)
-
Clone the repository
git clone https://github.com/quickpose/AI-PushUp-Rep-Counter-Demo-iOS-by-QuickPose cd PushUpCounterDemo -
Open in Xcode
open PushUpCounterDemo.xcodeproj
-
Configure QuickPose SDK Key
- Register for a free SDK key at https://dev.quickpose.ai
- Open
PushUpCounterDemo/Config/QuickPoseConfig.swift - Replace
YOUR_SDK_KEY_HEREwith your actual SDK key:
static let sdkKey = "your-actual-sdk-key-here"
Important: SDK Keys are linked to your bundle ID (
ai.quickpose.PushUpCounterDemo). Make sure to check your key before distributing to the App Store. -
Camera Permissions
The camera permission is already configured in the project. If you need to verify:
- The
NSCameraUsageDescriptionis set in the build settings - Value:
"Camera is required to track your push-up form and count reps"
- The
-
Build and Run
- Select your target device or simulator
- Press
Cmd + Rto build and run
- Launch the app - You'll see the home screen with mode selection
- Choose a mode - Tap "Reps Mode" or "Time Mode"
- Set your target - Use the picker to select:
- Reps: 5-100 (increments of 5)
- Time: 30-300 seconds (increments of 30)
- Position your phone - Place it on the floor with the screen facing you
- Get into position - Align yourself within the bounding box on screen
- Wait for countdown - A 3-second countdown will begin automatically
- Start your workout - Begin doing push-ups!
- View results - After completing (or ending early), see your summary
- Save to history - Tap "Save & Continue" to add to your workout history
- All past workouts are displayed on the home screen
- Each workout shows:
- Date and time
- Mode (Reps/Time)
- Completed reps
- Duration
- Swipe left on any workout to delete it
The app follows MVVM (Model-View-ViewModel) architecture:
PushUpCounterDemo/
├── Views/
│ ├── HomeView.swift # Main screen with mode selection & history
│ ├── SetupView.swift # Workout configuration screen
│ ├── WorkoutView.swift # Active workout with camera
│ └── SummaryView.swift # Post-workout results
├── ViewModels/
│ └── WorkoutViewModel.swift # Workout state & QuickPose integration
├── Models/
│ ├── WorkoutMode.swift # Enum for workout modes
│ └── WorkoutSession # Core Data entity
├── Services/
│ └── Persistence.swift # Core Data management
└── Config/
└── QuickPoseConfig.swift # SDK key configuration
- QuickPose Integration: Real-time pose detection and rep counting
- Core Data: Persistent storage for workout history
- SwiftUI: Modern declarative UI framework
- AVFoundation: Camera access and permissions
The app uses the following QuickPose features:
.overlay(.upperBody)- Upper-body skeleton visualization.fitness(.pushUps)- Push-up detection and countingQuickPoseThresholdCounter- Rep counting logic
The WorkoutSession entity stores:
id: UUIDdate: Workout timestampmode: "reps" or "time"targetValue: Target reps or secondscompletedReps: Actual reps completedduration: Workout duration in secondsaverageFormScore: Optional form quality metric
To be added
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
See QuickPose SDK licence (https://github.com/quickpose/quickpose-ios-sdk)
- QuickPose SDK - AI-powered pose estimation
- QuickPose Documentation - Comprehensive SDK documentation
For questions or support, please open an issue on GitHub.
