Salesforce Mobile

Jacksonville Salesforce Developer User Group

December 2018

Relaunching JaxMUG

  • Looking for monthly meetings
  • Anything iOS, Android
  • Native Development
  • Cordova/Hybrid
  • React Native
  • Flutter
  • Xamarin/Visual Studio

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

  • Salesforce App
  • Branded Apps
  • Native
  • Hybrid
  • React Native

Salesforce App

  • Salesforce Mobile client
  • Hybrid remote
  • More native features
  • Einstein and Siri
  • use lightning components
  • poor offline experience

Native Apps

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

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

  • sfdx
  • forceios create
  • forceandroid create
  • Install using NPM or Yarn
  • npm install -g forceios
  • cocoapods 1.4
  • Node.js -v 8.11.0
  • sfdx plugins
 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)]

 

sfdx to create mobile

sfdx plugins:install sfdx-mobilesdk-plugin

 

sfdx mobilesdk:ios:create -n sfdxtest -t native_swift /

  -o com.fekke.sfdx -d sfdxtest -k com.fekke.sfdx.sfdxtest

Notifications

  • Remote Notifications can be sent from APEX code
  • Salesforce has tie ins to APNS and GMS
  • APNS requires certificate to be updated annually
  • 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.

Apple Partnership

  • Dreamforce Announcements
  • 70% Salesforce users have iOS device
  • Stronger integration Apple Tech
  • Better Swift language support
  • More Native UI features in App and Framework
  • New Trailhead around Apple tools

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

Mobile for Salesforce

By David Fekke

Mobile for Salesforce

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

  • 1,027