This repository hosts the source code and installation instructions for 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.
Follow these instructions to install the Salesforce back-end.
-
Install the latest version of Cordova and Ionic 2 beta:
npm install -g cordova ionic@beta
or (Mac):
sudo npm install -g cordova ionic@beta
-
Clone this repository:
git clone https://github.com/dreamhouseapp/dreamhouse-mobile-app
-
Navigate to the
dreamhouse-mobile-app
directory:cd dreamhouse-mobile-app
-
Install the dependencies:
npm install
-
Install gulp if you don't already have it on your system:
npm install -g gulp
or (Mac):
sudo npm install -g gulp
-
Install force-server:
npm install -g force-server
or (Mac):
sudo npm install -g force-server
-
Build the JavaScript app using the Ionic build script:
gulp build
-
Run the app in the browser:
force-server --root www
- If you don't see the OAuth window, enable popups and try again.
- Make sure you log in the org you installed the DreamHouse package in.
-
Restore the state of the application using the
cordovaPlugins
andcordovaPlatforms
entries in package.json:ionic state restore
-
Install the Mobile SDK plugin:
cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin
-
Build the app for iOS:
ionic build ios
-
Open
DreamHouse.xcodeproj
in thedreamhouse-mobile-app/platforms/ios
directory -
In Xcode, run the application, or select Product > Archive in the menu for App Store or Enterprise deployment. If the build fails in Xcode, select the DreamHouse target, click the Build Settings tab, search for bitcode, select No for Enable Bitcode, and try again.