Skip to content

nlevchuk/habit-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Make It A Habit

Minimal iOS habit tracker built with Expo + React Native + TypeScript.

Requirements

  • Node.js (latest LTS recommended)
  • npm (bundled with Node)
  • Xcode (for iOS Simulator)

Install dependencies

npm install

Run locally on Mac (Intel)

Start the Expo dev server:

npx expo start

Then choose one:

  • Press i to open the iOS Simulator (requires Xcode installed).
  • Or open the Expo Developer Tools page and click “Run on iOS simulator”.

Troubleshooting

  1. When opening the iOS Simulator, it runs wrong device
  • List available devices and pick a valid one:
xcrun simctl list devices
  • If you want to target a specific simulator:
xcrun simctl boot "<SIMULATOR_NAME>"
  • Try it:
open -a Simulator
  1. If you have errors related to CocoaPods
  • delete ios/Pods and Podfile.lock
rm -r ios/Pods ios/builds
rm ios/Podfile.lock
  • re-install cocoapods
pnpm ios

Install on iPhone (latest iOS, no Apple Developer account)

Option A: Expo Go (fast testing)

  1. Install Expo Go from the iOS App Store (on your iPhone 14).
  2. In this project folder on your Mac, install dependencies:
npm install
  1. Start the Expo dev server:
npm run start
  1. If your iPhone can’t reach your Mac over the local network, use tunnel mode instead:
npm run start:tunnel
  1. Ensure your iPhone and Mac are on the same Wi‑Fi network (LAN mode only).
  2. Open Expo Go and scan the QR code shown in the terminal or browser.

Option B: Standalone build + Widget (Xcode)

This is required for installing the widget on device.

  1. Prebuild the native iOS project:
npx expo prebuild --platform ios
  1. Open the iOS project in Xcode:
open ios/HabitTracker.xcworkspace
  1. In Xcode, select the HabitTracker target and set Signing & Capabilities:
    • Team: your Apple ID (Personal Team is fine)
    • Bundle Identifier: unique value (e.g. com.smilinglion.habit-tracker)
  2. Add the App Groups capability to the app target and include:
    • group.com.smilinglion.habit-tracker
    • If you change this id, update it in ios/HabitTracker/HabitWidgetStorage.swift and ios/widget/widget.swift too.
  3. Use the existing widget target (CalendarWidget lives in ios/widget).
  4. For the widget target, set:
    • Signing to your Apple ID.
    • App Groups capability with the same group id.
    • Info.plist to ios/widget/Info.plist.
    • Entitlements to ios/widgetExtensionDebug.entitlements.
  5. Select your iPhone as the run destination and hit Run.
  6. On first install, you may need: Settings → General → VPN & Device Management → trust the developer profile.
  7. Long‑press the Home Screen → add the CalendarWidget widget.
  8. Open the app at least once and mark days so the widget has data.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks