Git Product home page Git Product logo

runpepperrun's Introduction

RunPepperRun

iPhone 디바이스의 GPS와 가속도계로 사용자의 러닝 루트, 거리, 속도, 소모 칼로리 등을 측정하고 저장하는 앱입니다. 좋은 설계와 iOS스러운 디자인을 중점으로 개발했습니다.

개발기간 2023.11 ~ 2024.02

사용 기술

  • Swift, UIKit
  • CoreLocation, CoreMotion, Mapkit
  • SnapKit, Charts
  • Firebase Auth, Firestore
  • Xcode, Kakao Oven, LucidChart, VSCode ...

설계

가장 기본이 되는 MVC 패턴을 채용하였습니다. 개발 이전에 UML을 그리고, 미리 API의 가용성을 확인 해 본 후 개발을 진행했습니다.

러닝 추적 기능

주요 class

Running

  • 시작, 멈춤, 재개 등 상태 관리
  • 속도, 칼로리, 페이스, 케이던스, 러닝시간, 러닝거리 등에 필요한 값을 다양한 하드웨어로부터 받아서 계산 후 가지고 있다가 UI에 delegate로 전달

Motion

  • Pedometer에서 pace, speed, cadence 값을 받아서 Running에 전달
  • Pedometer에서 받은 speed, startDate, endDate로 distance를 계산해서 Running에 전달
  • ActivityManager에서 Motion 상태를 받아서 calories 계산 후 Running에 전달 칼로리 계산식

Location

  • 사용자의 위치가 변경될 때 그 좌표를 Running에 전달
  • CLLocation 모듈이 다른 모듈에 영향을 미치지 않도록 Point 구조체로 래핑

러닝 내역 관리 기능

  • 저장되는 러닝 내역 관련
  • 러닝 내역들을 Firestore에 저장하고 불러와서 Chart에 표시

주요 class

HistoryManager

  • Firestore에서 러닝 내역 데이터를 저장하거나 쿼리해 옴

ChartScope, Period

  • UISegmentedControl을 주, 월로 바꿀 때마다 현재 날짜로부터 계산하여 최근 4주 혹은 지난달, 이번달의 기간(Period)을 생성

HistoryBar

  • History를 BarChart에 기록할 수 있도록 래핑

유저 관리 기능

  • 유저의 닉네임과 몸무게를 받는다.
  • 로그인 세션은 Firebase Auth로 관리하며 데이터는 Firestore에 저장

주요 기능

Firebase Auth를 통한 구글 로그인

  • Timer를 통한 러닝 시간 표시
  • CoreLocation을 활용한 유저 트래킹
  • CoreMotion을 통해 속도, 페이스, 칼로리 표시
  • MKMapView, CoreLocation을 활용한 유저 러닝 루트 표시
  • Firestore에 유저 러닝 루트와 활동 내역 저장

UISegmentedControl, UIMenu, UIDefferedMenuElement를 통해 메뉴 생성

필터링된 데이터를 Charts를 활용하여 도식화

커스텀 Spinner와 lastSnapshot을 이용한 Firestore Pagination

커밋 메시지 규칙

코드 리뷰를 받는데 있어 커밋 메시지로 커밋 내 코드가 어떤지 명확히 보기 위하여 프로젝트 중간 커밋 메시지 규칙을 도입했습니다.

[Feat] - 기능 추가
[Fix] - 기능 수정
[Refactor] - 구조 변경
[Chore] - 자잘한 수정
[Build] - 모듈, 빌드 관련
[Style] - 코드 스타일, 컨벤션 관련
[Perf] - 성능 개선

블로그 작성

프로젝트를 진행하며 공유하고 싶은 내용을 블로그에 작성하였습니다.

iOS 시뮬레이터 GPX를 통한 위치 변경 테스트
Pods 파일들을 깃에 올려야 할까?, Commit 수정하기
소프트웨어는 설계가 중요하구나

runpepperrun's People

Contributors

peppermint100 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.