Skip to content

Commit

Permalink
Merge pull request #28 from Isvvc/v1-documentation
Browse files Browse the repository at this point in the history
V1 documentation
  • Loading branch information
skjiisa authored May 9, 2021
2 parents 3c8403c + c6c9814 commit 44155b5
Show file tree
Hide file tree
Showing 34 changed files with 189 additions and 73 deletions.
Binary file added Images/Screenshots/iPhone 11 Pro Max 1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
# Tickmate-iOS
# Tickmate

1-bit journal

### Screenshots

<img src="Images/Screenshots/iPhone 11 Pro Max 1.jpeg" height=400 /> <img src="Images/Screenshots/iPhone 11 Pro Max 2 - Tracks.jpeg" height=400 /> <img src="Images/Screenshots/iPhone 11 Pro Max 3 - Track.jpeg" height=400 />

## Description

Tickmate allows you to track any daily occurrences.
It is a is a 1-bit journal, meaning each day is either ticked or not.
You can track anything from habits you wish to build or break to how often you wash your hair.

+ Use a "reversed" track for occurrences you don't want to happen, so they're automatically ticked unless you untick them.
+ You can use the "allow multiple" feature to be able to tick a single day multiple times.
+ With iCloud sync, all your data will be securely synced across all devices.

### Inspiration

Tickmate for iOS was designed after [lordi/tickmate](https://github.com/lordi/tickmate) for Android.

## Build

Building Tickmate requires Xcode 12+ on macOS 10.15 or later for
+ iOS Swift Package Manager support
+ SwiftUI 2

Dependencies:

* [malcommac/SwiftDate](https://github.com/malcommac/SwiftDate)
* [siteline/SwiftUI-Introspect](https://github.com/siteline/SwiftUI-Introspect)

These dependencies should be automatically fetched by Xcode.

## License

This project is open-source and licensed under the [The 2-Clause BSD License](LICENSE).
4 changes: 2 additions & 2 deletions Tickmate/Tickmate.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Tickmate/Tickmate.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"Tickmate/Preview Content\"";
DEVELOPMENT_TEAM = A4525544Q4;
ENABLE_PREVIEWS = YES;
Expand All @@ -451,7 +451,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Tickmate/Tickmate.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"Tickmate/Preview Content\"";
DEVELOPMENT_TEAM = A4525544Q4;
ENABLE_PREVIEWS = YES;
Expand Down
48 changes: 48 additions & 0 deletions Tickmate/Tickmate/Controllers/Persistence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,54 @@ class PersistenceController {
result.save()
return result
}()

func loadDemo() -> PersistenceController {
let viewContext = container.viewContext

let fetchRequest: NSFetchRequest<Track> = Track.fetchRequest()
fetchRequest.fetchLimit = 1
guard (try? viewContext.fetch(fetchRequest))?.isEmpty ?? false else { return self }
print("Loading demo...")

let startDateOffset = 14
let dateString = TrackController.iso8601.string(from: Date() - startDateOffset.days)

let demoTracks = [
[true, true, true, false, true, true, true, true, true, true, false, true, false, true, true, true, true, false, false, false, false, true, true, false],
[false, true, true, true, true, true, true, true, true, true, true, false, true, false, true, true, true, false, true, true, true, true, true, false],
[true, true, true, false, true, false, false, true, false, true, false, true, false, true, false].map { !$0 }, // This one is reversed
[true, true, true, true, true, false, true, true, false, true, false, true, true, true, true, true, false, true, true, true, true, true, true, true]
]

for (i, ticks) in demoTracks.enumerated() {
let track = Track(
name: String(UUID().uuidString.dropLast(28)),
multiple: i > 0,
reversed: i == 2,
startDate: dateString,
index: Int16(i),
context: viewContext)
PresetTracks[i].save(to: track)
track.startDate = dateString

for (j, tick) in ticks.enumerated() where tick {
Tick(track: track, dayOffset: Int16(startDateOffset - j), context: viewContext)
}
}

let disabledTrack = Track(
name: String(UUID().uuidString.dropLast(28)),
multiple: false,
reversed: false,
startDate: dateString,
index: 4,
context: viewContext)
PresetTracks[5].save(to: disabledTrack)
disabledTrack.enabled = false

save()
return self
}

let container: NSPersistentCloudKitContainer

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"images" : [
{
"idiom" : "ipad",
"scale" : "1x",
"filename" : "icon-40.png",
"size" : "40x40",
"idiom" : "ipad"
"size" : "40x40"
},
{
"filename" : "[email protected]",
"size" : "40x40",
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"size" : "60x60",
"scale" : "2x",
"size" : "60x60",
"filename" : "[email protected]",
"idiom" : "iphone"
},
{
Expand All @@ -25,134 +29,130 @@
"filename" : "icon-72.png"
},
{
"filename" : "[email protected]",
"size" : "72x72",
"scale" : "2x",
"idiom" : "ipad"
"filename" : "[email protected]",
"idiom" : "ipad",
"size" : "72x72"
},
{
"size" : "76x76",
"filename" : "icon-76.png",
"idiom" : "ipad",
"scale" : "1x",
"idiom" : "ipad"
"size" : "76x76"
},
{
"filename" : "[email protected]",
"scale" : "2x",
"idiom" : "ipad",
"size" : "76x76"
"filename" : "[email protected]",
"size" : "76x76",
"idiom" : "ipad"
},
{
"scale" : "1x",
"idiom" : "ipad",
"filename" : "icon-small-50.png",
"size" : "50x50"
"size" : "50x50",
"idiom" : "ipad"
},
{
"idiom" : "ipad",
"filename" : "[email protected]",
"size" : "50x50",
"scale" : "2x",
"idiom" : "ipad"
"size" : "50x50"
},
{
"filename" : "icon-small.png",
"idiom" : "iphone",
"scale" : "1x",
"size" : "29x29",
"idiom" : "iphone"
"filename" : "icon-small.png"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
"filename" : "[email protected]",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"size" : "57x57",
"scale" : "1x",
"filename" : "icon.png"
"filename" : "icon.png",
"idiom" : "iphone",
"scale" : "1x"
},
{
"size" : "57x57",
"scale" : "2x",
"filename" : "[email protected]",
"idiom" : "iphone"
"idiom" : "iphone",
"scale" : "2x",
"size" : "57x57"
},
{
"idiom" : "iphone",
"size" : "29x29",
"filename" : "[email protected]",
"scale" : "3x"
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"scale" : "3x",
"idiom" : "iphone",
"filename" : "[email protected]",
"size" : "40x40"
},
{
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x",
"size" : "60x60",
"scale" : "3x"
"idiom" : "iphone"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"size" : "40x40",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-small.png",
"scale" : "1x",
"idiom" : "ipad"
},
{
"size" : "29x29",
"scale" : "2x",
"idiom" : "ipad",
"filename" : "[email protected]"
"scale" : "1x"
},
{
"idiom" : "ipad",
"filename" : "[email protected]",
"size" : "83.5x83.5",
"size" : "29x29",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"scale" : "2x",
"filename" : "[email protected]"
},
{
"filename" : "[email protected]",
"idiom" : "iphone",
"size" : "20x20"
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"idiom" : "iphone",
"scale" : "3x",
"filename" : "[email protected]"
},
{
"filename" : "notification-icon~ipad.png",
"size" : "20x20",
"idiom" : "ipad",
"scale" : "1x"
"scale" : "1x",
"idiom" : "ipad"
},
{
"scale" : "2x",
"filename" : "[email protected]",
"size" : "20x20",
"idiom" : "ipad",
"filename" : "[email protected]"
"scale" : "2x"
},
{
"filename" : "ios-marketing.png",
"size" : "1024x1024",
"idiom" : "ios-marketing",
"scale" : "1x"
"filename" : "ios-marketing.png",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Tickmate/Tickmate/Resources/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
"version" : 1,
"author" : "xcode"
}
}
12 changes: 10 additions & 2 deletions Tickmate/Tickmate/Supplementary Views/AcknowledgementLink.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,19 @@ struct AcknowledgementDetail: View {
// MARK: Acknowledgement

struct Acknowledgement: Hashable {

var name: String
var copyright: String
var link: String? = nil
var link: String?
var license: License

internal init(name: String, copyright: String, link: String?, license: Acknowledgement.License) {
self.name = name
self.copyright = copyright
self.link = link
self.license = license
}

enum License {
case mit
case bsd2
Expand Down Expand Up @@ -120,7 +128,7 @@ struct AcknowledgementLink_Previews: PreviewProvider {
static var previews: some View {
NavigationView {
List {
AcknowledgementLink(acknowledgement, selection: .constant(nil))
AcknowledgementLink(acknowledgement, selection: .constant(acknowledgement))
}
.listStyle(InsetGroupedListStyle())
.navigationTitle("Acknowledgements")
Expand Down
Loading

0 comments on commit 44155b5

Please sign in to comment.