Modular iOS with Uber needle & tuist example

Related tags

Miscellaneous Dodi
Overview

Dodi

Modular iOS with Uber needle & tuist example

Setup

brew install needle
bash <(curl -Ls https://install.tuist.io)

and run

make all

Point of concern

  1. I'm debating whether to provide a Builder for the Repository or an repository interface of a specific implementation object(such as TodoCachedRepository) from RootComponent...

RootComponent

import DodiList
import DodiDetail
import DodiRepository

class RootComponent: BootstrapComponent {

  var userDefaults: UserDefaults {
    return UserDefaults.standard
  }

  var repositoryBuilder: RepositoryBuilder {
    return shared { RepositoryComponent(parent: self) }
  }

  var listBuilder: ListBuilder {
    return shared { ListComponent(parent: self) }
  }

  var detailBuilder: DetailBuilder {
    return shared { DetailComponent(parent: self) }
  }

  var rootViewController: UIViewController {
    return UINavigationController(
      rootViewController: self.listBuilder.homeListViewController
    )
  }
}

ListComponent

import DodiRepository
import DodiDetail

public protocol ListDependency: Dependency {

  var repositoryBuilder: RepositoryBuilder { get } //<--- Is it Okey?
  var detailBuilder: DetailBuilder { get }
}

public protocol ListBuilder {

  var homeListViewController: HomeListViewController { get }
}

public class ListComponent: Component, ListBuilder {

  public var homeListViewController: HomeListViewController {
    return HomeListViewController(
      dependeny: HomeListViewController.Dependency(
        homeBloc: HomeListBlocImpl(
          dependency: HomeListBlocImpl.Dependency(
            todoCachedRepository: self.repositoryBuilder.todoCachedRepository,
            presenter: HomeListPresenter()
          )
        ),
        detailBuilder: self.detailBuilder
      )
    )
  }
}

Graph

> tuist graph -t
You might also like...
iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android).
iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android).

FinanceReactNative iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android). Data is pulled from Yahoo Finance

Project 03 I created for
Project 03 I created for "iOS & Swift - The Complete iOS App Development Bootcamp"

Dicee This is the third project I created for "iOS & Swift - The Complete iOS App Development Bootcamp" Our Goal The objective of this tutorial is to

IOS-Prework - CodePath intro to iOS prework.
IOS-Prework - CodePath intro to iOS prework.

Hello World App Submitted by: Emmanuel Assumang Time spent: 1.5 hours spent in total App Description This is a simple mobile app programmed in Swift t

 Home Assistant Native iOS Application built with SwiftUI for iOS 15+
Home Assistant Native iOS Application built with SwiftUI for iOS 15+

Home Assistant - Native iOS SwiftUI Application Screenshots Disclaimer - Please read This application is mostly a not-working mockup written in SwiftU

Google-Blogger-iOS-App - Using Google Blogger API to build an iOS app like Medium

Google Blogger iOS App Using Google Blogger API to build an iOS app like Medium!

Ios jetpack - A codabase for iOS projects foundations

iOSJetpack A codabase for iOS projects foundations Neworking Data Reusable Proto

A native iOS UI widget for adding Spokestack to any iOS app.
A native iOS UI widget for adding Spokestack to any iOS app.

A native iOS library for adding Spokestack to any iOS app. Installation Edit Podfile CocoaPods is a dependency manager for Cocoa projects. For usage a

Learning iOS Frontend: Aplikasi iOS Pemesanan Makanan dengan SwiftUI, WidgetKit, Google Fonts, dan Assets dari Figma
Learning iOS Frontend: Aplikasi iOS Pemesanan Makanan dengan SwiftUI, WidgetKit, Google Fonts, dan Assets dari Figma

Foody Aplikasi Foody adalah Aplikasi iOS Pemesanan Makanan dengan SwiftUI, WidgetKit, Google Fonts, dan Assets dari Figma untuk Mempelajari Ilmu Front

Wasmic allows you to run WebAssembly in a safe way on iOS.
Wasmic allows you to run WebAssembly in a safe way on iOS.

wasmic-ios Bootstrap $ git clone https://github.com/kateinoigakukun/wasmic-ios.git $ git -c submodule."fastlane".update=none submodule update --init -

Comments
  • fix building issue

    fix building issue

    Hi,David.

    thanks for really interesting using tuist needle repo.

    there's tiny issue when i execute your README guide.

    when i just install needle and run make all, there's issue for tests location. maybe it needs files but there's no files in that path.

    i think there are more way to fix it, but i suggest just simple solution.

    just add Tests folder and some test codes, where emits error paths.

    i added these files for DodiList and DodiRepository, and it makes me generate Dodi very well.

    opened by Odyflame 0
Owner
David Ha
Karrot iOS Developer
David Ha
IMBeeHive is a kind of modular programming method

概述 IMBeeHive是用于iOS的App模块化编程的框架实现方案,本项目主要借鉴了阿里巴巴BeeHive,在此基础上通过逆向了一些大厂的APP使得功能更加强大完善。同时现在也在寻找一起开发这个框架的开发者,如果您对此感兴趣,请联系我的微信:alvinkk01. 背景 随着公司业务的不断发展,项目

null 6 Dec 14, 2021
Strucure: I used MVVM with Colusre binging modular architecture : Also I used openweathermap to get all information for current weather as it's easy t

Strucure: I used MVVM with Colusre binging modular architecture : Also I used openweathermap to get all information for current weather as it's easy t

Alaa Azab 0 Oct 7, 2021
An example implementation of using a native iOS Notification Service Extension (to display images in remote push notification) in Titanium.

Titanium iOS Notification Service Extension An example implementation of using a native iOS Notification Service Extension (to display images in remot

Hans Knöchel 8 Nov 21, 2022
Distributed actors transport example, for feature review

swift-sample-distributed-actors-transport Sample application and ActorTransport, associated with distributed actor language evolution proposal. Runnin

Apple 84 Jan 2, 2023
Example project for the DeDuplicatingEntity Protocol

DeDuplicatingEntity-Sample-Project Example project for the DeDuplicatingEntity Swift Package Clone this repo and build the sample project or use it in

Vic Hudson 0 Feb 16, 2022
React Native Todo List example app which uses Redux for managing app state

react-native-redux-todo-list A sample todo list app developed by using React Native and Redux. How to run the app Install react-native If you don't ha

null 43 Oct 11, 2022
tvOS example app, shows upcoming movies

UpcomingMovies tvOS example app. Shows upcoming movies as a list and in a detail movie screen, using TMDb API. Installation Run pod install on project

Ivan Magda 32 Nov 10, 2022
Example how to make, update and end Live Activity. With Dynamic Island and Lock Screen.

Live Activity Example Example how to make, update and end Live Activity. With Dynamic Island and Lock Screen. Full tutorial available at sparrowcode.i

Sparrow Code 9 Dec 8, 2022
Example of a Flutter app in the status bar.

flutter_in_status_bar Example of a Flutter app in the status bar. This is the default counter app from Flutter but instead of running in a NSWindow it

Jochum van der Ploeg 40 Nov 29, 2022
Kushal Shingote 1 Feb 2, 2022