Salesforce Mobile

Jacksonville Salesforce User Group

June 2017

Why Mobile?

  • Billions of devices Worldwide
  • more people access internet over phones than desktops
  • Salesforce users are mobile
  • field sales common use case

Mobile options

  • Salesforce1
  • native
  • hybrid
  • React Native

Salesforce1

  • Salesforce Mobile client
  • hybrid remote
  • use lightning components
  • poor offline experience

Native Apps

  • SalesforceMobileSDK Android and iOS
  • OAuth Login
  • APIs for querying sObjects
  • Build Native Views
  • Store on Device and on Salesforce
  • Written in Objective-C, Swift and Java
  • SalesforceMobileSDK @ version 5.1

Hybrid Apps

  • Build Apps with HTML and JavaScript
  • OAuth
  • Hybrid Local
  • Hybrid Remote
  • Can store on Device and in Salesforce
  • Cordova WebView part of Hybrid API

Hybrid Local

  • Initial content and code stored on the Device
  • Apps are like SPA (Single Page Applications)
  • This approach allows syncing between device and Salesforce cloud

Hybrid Remote

  • Content is stored on Salesforce
  • Build your app using Lightning Pages and Components or Visual Force Pages
  • Does not provide a syncing solution

React Native

  • React Native Framework from Facebook
  • These are actual Native applications
  • Can build with JavaScript framework
  • React Components built with SF Components

Frameworks

  • SalesforceSDKCore
  • SalesforceAnalytics
  • SalesforceHybridSDK
  • SalesforceReact
  • SmartStore
  • SmartSync

Scaffolding Tools

  • forceios create
  • forceandroid create
  • Install using NPM or Yarn
  • npm install -g forceios
 forceios create
        --apptype=<Application Type> (native, native_swift, react_native, hybrid_local, hybrid_remote)
        --appname=<Application Name>
        --packagename=<App Package Identifier> (com.mycompany.myapp)
        --organization=<Organization Name> (Your company\'s/organization\'s name)
        --startpage=<App Start Page> (The start page of your remote app. Only required for hybrid_remote)
        [--outputdir=<Output directory> (Leave empty for current directory)]

 

Notifications

  • Remote Notifications can be sent from APEX code
  • Salesforce has tie ins to APNS and GMS
  • Can test using Salesforce Admin
  • Apps can respond to remote notifications

SmartSync

  • Uses SmartStore to store data on device
  • Framework can detect when a record is out of sync
  • Will work with Native and hybrid_local
  • Uses SQLite as on device storage w/ 256 encryption
  • Records stored as SOUPs
  • Great approach is users have bad internet conn.

Demo

Questions?

Resources

  • www.npmjs.com/package/forceios
  • www.npmjs.com/package/forcedroid
  • developer.salesforce.com/devcenter/mobile
  • github.com/forcedotcom/SalesforceMobileSDK-iOS
  • github.com/forcedotcom/SalesforceMobileSDK-android
  • github.com/davidfekke/jaxsfdev.git

Salesforcemobile

By David Fekke

Salesforcemobile

This presentation covers how to build mobile apps using the Salesforce Mobile SDK

  • 1,311