Quickly Build a Native Mobile App for Your Community Using Salesforce Mobile SDK

Post on 20-Feb-2017

226 views 0 download

Transcript of Quickly Build a Native Mobile App for Your Community Using Salesforce Mobile SDK

Quickly Build a Native Mobile App for Your Community Using Salesforce Mobile SDK

 Michael Welburn  Senior Technical Architect, 7Summits  michael.welburn@7summitsinc.com  @MichaelWelburn  

Michael Welburn Senior Technical Architect, 7Summits

 Cannot brand app; Customer must download Salesforce1 app

 Interface is tied to Salesforce1 platform

 Requires custom community URL to be configured for each user’s device

 Not downloadable from app store

 Allows custom branding

 One codebase; Takes advantage of site built with responsive / mobile in mind

 Downloadable from app store

 Allows custom branding

 Requires additional overhead to maintain a separate codebase

Salesforce1 Responsive Website Native (Mobile) Application

Ideal for Partner / Customer Community Ideal for Employee Community Ideal for Partner / Customer Community

Communities & Mobile Options

Mobile Architecture Options

Salesforce Mobile SDK

Expedite mobile application development by providing authentication, record syncing, etc.

Allows 3 options:

  Native – completely custom implementation in native iOS or Android code

  Hybrid Local – completely custom implementation in HTML & Javascript

  Hybrid Remote – container of your existing responsive Visualforce-based website

Basic Setup Requirements

 For iOS:

  Mac Computer with Xcode

For Android:

  Eclipse or Android Studio

  Android SDK Tools

  Android Emulator

For guided installation:

  Node.js & Node Package Manager (npm)

Mobile SDK Demo

Files to Modify

 Salesforce modifications:

  Connected app – used during the authentication process

  API Enabled – profile or permission set

  Community Members – add profile or permission set of users to Community

 Mobile application files to modify:

  [appname].plist – denotes the community URL you are authenticating against (iOS)

  servers.xml – denotes the community URL you are authenticating against (Android)

  bootconfig.json – basic configuration of your application starting behavior and connected app

  config.xml – configuration of plugins, application security, etc.

Cordova

 Cordova plugins will enhance the experience without requiring additional code, and can be searched at the Cordova Plugin Registry (http://plugins.cordova.io)

 Recommended plugins:

  StatusBar (http://plugins.cordova.io/#/package/org.apache.cordova.statusbar)

  InAppBrowser (http://plugins.cordova.io/#/package/org.apache.cordova.inappbrowser)

  Calendar (http://plugins.cordova.io/#/package/nl.x-services.plugins.calendar)

Cordova Plugin Demo

Implementation Summary

 Leverage forceios and forcedroid to bootstrap your installation

 Choose the hybrid_remote option

 Configure the necessary files in the mobile application

 Ensure you update the server URL to your community

 Install applicable cordova plugins

 Update any icons or background images for your application prior to an official deployment

Reference Links

 Trailhead: Developer Trail – Mobile SDK: https://developer.salesforce.com/trailhead/trail/mobile_sdk_intro

 Salesforce Mobile SDK Home: https://developer.salesforce.com/page/Mobile_SDK

 Salesforce Mobile SDK Development Guide: https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/

 Node Package Manager: https://docs.npmjs.com/getting-started/installing-node

 forceios: https://www.npmjs.com/package/forceios

 forcedroid: https://www.npmjs.com/package/forcedroid

 Cordova Plugin Registry: http://plugins.cordova.io/

Thank you