• Stars
    star
    1,220
  • Rank 38,139 (Top 0.8 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 5 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A cross-platform Reddit client built in SwiftUI

A cross-platform Reddit client created in SwiftUI.

Get the Public Beta

Note: This project is far from complete. It still lacks many features of your typical Reddit client and has bugs (partly due to SwiftUI, but I'll take credit for some of them)

To show off SwiftUI's strength in cross-platform development, I did not use Mac Catalyst for this project. Instead, common UI code is shared between iOS, macOS, and watchOS.

Project Structure

  • Shared - Models, helpers, API, and any shared Views.
  • Reddit-[PLATFORM] - Each target folder contains a Views and Representable folder. Views holds platform-specific views, and Representable contains UIViewRepresentables or NSViewRepresentables.

macOS Specific Features

I've added several things to make the macOS app stand out:

  1. Double click - You can double click on a post to open a new window for the detail view.
  2. NSToolbar - This is implemented entirely in the AppDelegate, and uses standard Cocoa code which interfaces with the SwiftUI views.
  3. TouchBar - TODO

SF Symbols

Because macOS doesn't support SF Symbols, I have created the following extension to make sure shared code works. I would like to replace this with custom icons for macOS that it loads from XCAssets eventually:

/// `SwiftUI` compatibility
#if os(macOS)
extension Image {
    init(systemName: String) {
        self.init(nsImage: NSImage())
    }
}
#endif

More Repositories

1

dream-textures

Stable Diffusion built-in to Blender
Python
6,889
star
2

awesome-result-builders

A list of cool DSLs made with Swift 5.4’s @resultBuilder
977
star
3

swift-request

Declarative HTTP networking, designed for SwiftUI
Swift
717
star
4

geometry-script

A scripting API for Blender's Geometry Nodes
Python
152
star
5

CardKit

iOS 11 cards in Swift
Swift
50
star
6

AttributedStringBuilder

A DSL for creating NSAttributedStrings
Swift
23
star
7

router

Type-safe routing in SwiftUI
Swift
22
star
8

FrameworkInspector

View the internals of a Swift framework
Swift
19
star
9

drag-and-drop

Simple drag and drop for SwiftUI
Swift
16
star
10

griddle

A word game created with Tokamak
Swift
16
star
11

swift-css

A simple CSS DSL using @functionBuilder
Swift
14
star
12

state-machine

Dead simple state machines in Swift
Swift
12
star
13

status-color-meter

Digital Color Meter for the menu bar
Swift
9
star
14

swiftwebui-router

A simple Router for SwiftWebUI
Swift
9
star
15

dock-term

A terminal for your dock.
Swift
8
star
16

pebble-googleassistant

Run the Google Assistant on Pebble
JavaScript
7
star
17

rebble-ios

An alternative Pebble app for iPhone
Swift
6
star
18

swiftwebui-scripts

Tools for working with SwiftWebUI & SwiftWASM
JavaScript
6
star
19

any-codable

Encode/Decode Array<Codable> with ease.
Swift
5
star
20

rebble-icons

Icons for RebbleOS
4
star
21

require

Never write a long guard statement again
Swift
4
star
22

TokamakDocs

Swift
3
star
23

collection

A SwiftUI UICollectionView implementation
Swift
3
star
24

playground-books

Swift
1
star
25

Knob

Knob control implemented as UIControl subclass in Swift
Swift
1
star
26

TerminalTerraria

A Terraria clone for the terminal. All credit goes to Re-Logic for the original game.
1
star
27

pebble-dictation

JavaScript
1
star
28

codable-db

Swift
1
star
29

ctkrocks.github.io

My github.io site
CSS
1
star