https://github.com/landonepps/timecrumbs
An iOS time tracking app that encourages users to track tasks under 30 minutes.
https://github.com/landonepps/timecrumbs
Last synced: about 1 year ago
JSON representation
An iOS time tracking app that encourages users to track tasks under 30 minutes.
- Host: GitHub
- URL: https://github.com/landonepps/timecrumbs
- Owner: landonepps
- License: mit
- Created: 2019-11-20T17:14:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-06T00:29:33.000Z (about 6 years ago)
- Last Synced: 2025-02-09T19:50:19.794Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 1.62 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TimeCrumbs
A time tracking app that encourages users to track tasks under 30 minutes.
## Core Data
The persistent container is created in the App Delegate.
Access it by getting a reference to the App Delegate.
```swift
let appDelegate = UIApplication.shared.delegate as? AppDelegate
appDelegate?.persistentContainer
```
Instead of using a singleton, we use dependency injection to set the managed object context for the view controllers.
e.g. In `SceneDelegate.swift`
```swift
if let rootVC = window?.rootViewController as? ViewController {
let appDelegate = UIApplication.shared.delegate as? AppDelegate
rootVC.moc = appDelegate?.persistentContainer.viewContext
}
```
## Git
#### Feature branch workflow
Create feature branch
```bash
# switch to develop
git checkout develop
# fetch the latest changes
git pull origin develop
# create feature branch
git checkout -b feature/add-some-feature
```
Commit changes & push to remote
```bash
# make changes, add, and commit
git add .
git commit -m "Commit message"
# push feature branch to remote repo
git push -u origin feature/add-some-feature
```
Pull feature branch into develop
```bash
# switch to develop
git checkout develop
# pull changes to develop
git pull
# pull changes from (remote) feature to (local) develop
git pull origin feature/add-some-feature
# push merged local develop branch to remote
git push
```
Delete feature branch when done
```bash
# delete remote feature branch
git push origin --delete feature/add-some-feature
# delete local feature branch
git branch -d feature/add-some-feature
```