Skip to content
/ watchos-base Public template

The OpenBytes template for watchOS projects using SwiftUI

License

Notifications You must be signed in to change notification settings

0xOpenBytes/watchos-base

Repository files navigation

Icon representing the OpenBytes watchOS-base template project.

watchOS-Base

The OpenBytes template for watchOS projects using SwiftUI

MIT License Community Chat watchOS Version

Project

Structure

  • base
    • App: SwiftUI App and Views
    • Data
      • Mock: Static mock data and json reading functionality.
      • Network: Network data models used in Services and Adapters.
      • Adapters: Objects that can convert from Network to Device or Device to Network models.
      • JSON: Network data model JSON files.
      • Device: Device data models used in SwiftUI Views and ViewModels. Device models should be created from Network models by using Adapters.
    • FileStorage: Local storage functionality.
    • Navigation: SwiftUI NavigationPath using OpenBytesNavigation.
    • Networking: Networking functionality.
    • Notifications: Local Notification functionality.
    • Persistence
      • Caching
        • Image: Memory storage for Images, used in ImageView.
        • Data: Memory storage for anything conforming to DataCaching.
    • Preview Content
    • Settings: Shared app data and state.
    • Utilities: Miscellaneous app utilities.
  • baseTests
    • Adapters: Test Network to Device and Device to Network transformations.
    • Persistence: Tests for Persistence and Caching.
    • UserRegistration: Tests for register using ViewModels and DI.
    • Validation: Tests for different types of data validation.

Getting Started

Installing development dependencies

  1. Install Homebrew
  2. Run brew bundle

Learn more about Swish and Xcodegen

Renaming

There are some scripts to help rename base to whatever project name you want.

  • Clone the templated repository
  • run ./rename.sh
  • Enter a project name

Continuing onward

Regenerate the project

swish xcodeproj

Pushing to the App Store

This script expects APPLE_TEAM_ID, APPLOADER_USERNAME and APPLOADER_PASSWORD to be present in the environment.

It doesn't have to stay that way. Modify Swish/Sources/appstore/Secrets.swift to use an API key, or perhaps fetch credentials from a password manager like 1Password using Sh1Password.

When that's settled, you can run

swish appstore

About

The OpenBytes template for watchOS projects using SwiftUI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published