Giter Club home page Giter Club logo

dreamhouse-mobile-react's Introduction

DreamHouse React Native Mobile App

React Native iOS implementation of the DreamHouse mobile app. DreamHouse is an end-to-end sample application that demonstrates how to build apps on the Salesforce platform. Visit the DreamHouse Microsite for more information.

This version of the application is built with React Native and the Salesforce Mobile SDK, including some new experimental features to generate parts of the UI using Salesforce metadata.

This is an experimental project published under ForceDotComLabs, which means that:

  1. It's work in progress
  2. We need your feedback
  3. Code contributions are welcome

iOS Screenshot iOS Screenshot

TrailheaDX Presentation

Watch the recording of the presentation delivered at the TrailheaDX conference:

iOS Screenshot

Installation Instructions

  1. Follow these instructions to install the Salesforce back-end.

  2. Clone this repository:

    git clone https://github.com/ForceDotComLabs/dreamhouse-mobile-react
    
  3. Navigate to the dreamhouse-mobile-react directory:

    cd dreamhouse-mobile-react
    
  4. Install the npm dependencies:

    npm install
    
  5. Install the cocoapods dependencies:

    pod install
    

    If the pod command is not found, install cocoapods first:

    sudo gem install cocoapods
    

    If the installation of cocoapods fails, you may need to upgrade the version of ruby installed on your system.

  6. Install rnpm if it's not yet installed on your system:

    npm install rnpm -g
    
  7. Link dependencies:

    rnpm link
    

Run in the iOS Emulator

  1. Type the following command to open the project workspace in Xcode:

    open dreamhouse.xcworkspace
    
  2. Start the development server:

npm start
  1. in Xcode, select a phone to emulate and click Run

Run on Device

  1. Start the development server:
npm start
  1. In Xcode, select the dreamhouse project in the Project Navigator and select the dreamhouse target.

    xcode

  2. Specify a Bundle Identifier and a Team corresponding to a provisioning profile you created in the Apple Developer Portal.

  3. Select your phone in the device selector in the toolbar, and click Run.

Step-By-Step Tutorial

Follow this step-by-step tutorial to recreate the application from scratch.

Testing

There are two types of test examples in this repo; Mocha + Enzyme component tests and image comparison based Snapshot tests.

Mocha + Enzyme Tests

All tests live in the __tests__ directory of the specific component with the following naming schema componentname-enzymetest.js. Currently there are tests for PropertyList/ListItem and PropertyDetail/ActionBar.

To run

npm run test

Snapshot Tests

Snapshot tests are run from Xcode. You need to your react-native packager running and in Xcode > Product > Scheme > Edit Scheme, set an environment variable CI_USE_PACKAGER to 1.

Please refer to the dreamhouseSnapshotTests.m file. The components that will be tested are registered in js/testLib/snapshotTests.

dreamhouse-mobile-react's People

Contributors

ivansfdc avatar kgowru avatar ccoenraets avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.