Skip to content
Wren Liang edited this page Oct 26, 2019 · 10 revisions

Document Setup

  • Main ViewController is a TabBarViewController with two tab views (more to be added later)

  • First tab is a NavigationController with a nested TableView (currently the PantryView)

  • The PantryView Cells segue into the ItemView

  • Second tab is a "Hello World" placeholder view

MVC (Model-View-Controller) Structure

  • The Views folder contains all the code for the setup of each of the physical UI views, with constraints and layout.

  • The Models folder will contain all the code for data structures within the app, if we want to do on-device storage, etc.

  • The Controllers folder contains the View Controllers, the classes that populate the views with data, connecting models to view and doing all the view logic.

Run Steps

  1. To build the project into the simulator, you must download Xcode 11 or newer on a Mac.

  2. To Build and Run, clone the repository, then navigate into iOS -> Food-Doods-Prototype and then click the .xcodeproj.

  3. Once in Xcode, in the top bar, on the left side, there should be a simulation selector next to the run and stop buttons named Food-Doods-Prototype and it is probably set to Generic iOS Device. Change this to iPhone XS or whatever simulation device you want to see the app run on.

  4. Once selected you should be able to click the run button, and it should open the iOS simulator, with a fully interactive simulation of the application.

Research on React Native Compatibility with Swift

  • Modules can only be imported one-way

  • Swift modules can be exposed to JavaScript and imported into React Native projects, but React Native modules cannot be incorporated into Swift projects

  • React Native compiles into native Swift, so there is no contract for what the source output code will do, so it is hard to implement with natively written Swift code

Verdict:

  • Since we are not planning to make an Android app as well, it seems that React Native + Swift does not suit our needs as well as a pure Swift iOS application.
Clone this wiki locally