Here’s the rough idea.
- Ask users how much money they’re willing to put at stake for the month, and reserve (authorize) that amount in advance.
- Track the user’s running distance via HealthKit using an iPhone or Apple Watch.
- Because money is on the line, users are effectively forced to run, which (hopefully) contributes to improving exercise habits in Japan.
- If the user fails to reach the distance they originally set, the pre-committed money is paid out to the operator.
By the way, this is my second time doing solo development, and I’m basically a vibe coder!
I occasionally write code, but my day job is closer to being a data analyst (mostly sales, though).
Today’s Summary
- The Apple Developer Program apparently takes up to two days to reflect changes, which is slower than expected.
- Because authentication isn’t working yet, I can’t make much progress on testing.
- Still, things moved along nicely overall. I’d like to have friends test it this weekend, but realistically I might not make it in time.
2026-01-23 Development Log
What I Did
1. Apple Developer Program Registration
- Paid the $99 fee
- Waiting for it to reflect in Xcode (up to 48 hours)
- Sign in with Apple will be implemented after that
2. End-of-Month Batch Processing (Edge Functions)
- Created and deployed
process-expired-challenges- Determines challenges that have passed 28 days
- Goal achieved → cancel authorization (refund)
- Goal not achieved → capture payment (charge)
- Created and deployed
update-progress- Updates progress (running minutes)
3. GitHub Actions Setup
- Created
.github/workflows/process-challenges.yml - Runs
process-expired-challengesevery day at 00:00 UTC - Secrets will be configured after pushing to GitHub
4. HealthKit Integration
- Added
NSHealthShareUsageDescriptiontoInfo.plist - Added
requestAuthorization()to theActivityMinuteSourceprotocol - Request HealthKit authorization on app launch in
ChallengeView -
Real device testing successful 🎉
- HealthKit authorization dialog appeared
- Successfully obtained permission to read workout data
5. UI Improvements
- Added remaining time display
- 2+ days: “X days remaining”
- 1–2 days: “1 day and X hours remaining”
- Less than 1 day: “hh:mm remaining”
- Fixed commitment amount display
- Adjusted timing for closing the sheet after payment completion
6. Code Changes
- Added
stripePaymentIntentIdto theChallengemodel - Added remaining time calculation properties to the
Challengemodel - Updated
SupabaseChallengeStoreto use a development user ID
Blockers
Waiting for Developer Program Activation
- Sign in with Apple cannot be used yet
- Because authentication is required by RLS, database save testing cannot be done
Temporary Workaround (Not Implemented)
- Relaxing Supabase RLS would allow testing without authentication
Next Steps
-
Confirm Developer Program Activation
- Check via Xcode → Settings → Accounts
- If the Team appears, it’s good to go
-
Implement Sign in with Apple
- Integrate with Supabase Auth
- Create Supabase users from Apple IDs
-
Test Database Persistence
- Create a challenge → verify it’s saved in Supabase
-
Prepare for Release
- Push to GitHub & configure Secrets
- Create app icon
- Create privacy policy
Commit History
feat: add countdown UI and commitment money- Plus Edge Functions deployments and other changes
Verified Functionality
| Feature | Simulator | Real Device |
|---|---|---|
| Stripe Payment | ✅ | ✅ |
| HealthKit Auth | - | ✅ |
| UI Rendering | ✅ | ✅ |
| DB Persistence | ❌ RLS | ❌ RLS |

Top comments (0)