Skip to Content

Creating Powerful, Native Enterprise Apps using SAP Cloud Platform SDK for iOS

Creating Powerful, Native Enterprise Apps using SAP Cloud Platform SDK for iOS

Business-to-Employee Scenario and Business-to-Business Scenario:  Field service management app for field technicians to automate their workflows.  Empowers workforce with everything they need to efficiently install, maintain and repair assets in the field, anytime and anywhere – regardless of connectivity.

This blueprint provides common information, guidance, and direction for building field service management software to innovate fast with minimal risk and cost. Through a real customer business scenario, this guide describes a common business challenge resolved by the SAP Cloud Platform. It includes the benefits of the solution, the main SAP Cloud Platform components for licensing considerations, and a visual architecture depicting a basic architectural pattern. 

Business Scenario

Management of company’s resources employed at or en route to the property of clients (rather than on company property) raises quite a few challenges.  Challenges include scheduling and dispatching work, ensuring driver safety, creating (modifying and deleting) sales orders, integrating management of such activities with inventory, billing, accounting and other back-office systems.  In order to address these challenges, a mobile app running on an iPad is assigned to each field technician.  This mobile app empowers the remote workforce with everything they need to complete their job in the most efficient manner. 

Example of different industries and the types of challenges that may be encountered:

Industry Employee Challenge
Telecommunications
Technicians
Technicians who install cable or run phone lines into residences or business establishments
Healthcare
Mobile Nurses
Nurses who provide in-home care for elderly or disabled
Oil and Gas
Engineers
Engineers who are dispatched to investigate and repair suspected leaks
Engineering, Construction and Operations
Technicians
Technicians dispatched for preventative maintenance and repair
Property Maintenance
Maintenance Person
Property maintenance including landscaping, irrigation, home and office cleaning
Professional Services
Technicians Technicians have the expertise to investigate units in residential, commercial and
industrial environments
Retail Sales Person Sales person can replenish items, take inventory and also create new sales orders
Insurance Claim Handlers Claim Handlers dispatched to assess damage and estimate cost for repairs on a claim

Industry Example

In the HVAC industry, field technicians are required to perform a variety of duties. They need to have the expertise to investigate units in residential, commercial and industrial environments. In addition, they need to be able to access the product catalog for pricing quotes and service charges. They also need to be able to create new service requests, view their schedule and dispatch service requests to other employees. Another challenge that the field technicians face is that they rarely have any kind of connectivity in the environment that they are working on. This forces them to work in an offline scenario.

Solution

In order to address all the challenges faced by an HVAC field technician, a mobile app running on an iPad is assigned to each field technician.  The mobile app is offline enabled and is also capable of receiving push notification.  The mobile app lets the field technician access the product catalog, view his daily schedule and also the schedule of his co-workers, create new service requests etc.  In addition, the mobile app also allows the field technician to receive notifications on urgent service requests. 

SAP Cloud Platform SDK for iOS enables new native business apps for customers to fully leverage the rich data in their enterprise systems and reinvent how work gets done on the go. These native apps will provide secure access to SAP S/4 HANA and other SAP and 3rd party solutions while taking full advantage of features in iPhone and iPad, like Touch ID, location services and notifications.

Solution Description

Here are the main features of the mobile app running on an iPad:

  1. The mobile app is built using SAP Cloud Platform SDK for iOS
  2. Mobile service for development and operations, which is the server counterpart of the SAP Cloud Platform SDK for iOS, is used for offline functionality and push notifications
  3. Various other services offered by the SAP Cloud Platform like Internet of Things, predictive service, business rules, workflow etc. can be leveraged to increase the functionality of the mobile app
  4. The field technician can login into the mobile app using his company credentials
  5. The field technician is then able to view his daily schedule
  6. At the client property, the field technician is able to access the product catalog for pricing quotes and service charges.  The field technician is able to do this regardless of connectivity at the client property
  7. The field technician is also able to create new service requests, dispatch service requests to other employees
  8. In addition, the field technician is also able to receive notifications regarding urgent service requests

Solution Benefits

The mobile app described above can also be used in the following verticals:

Industry Employee Benefits
Telecommunications
Technicians
Technicians can access installation guidelines, safety videos etc.  In addition, technicians can access daily
schedule, route information and maintenance contracts
Healthcare
Mobile Nurses
Mobile nurses can receive notifications regarding urgent home visits.  Nurses can also view patient history,
allergies and medications
Oil and Gas
Engineers
Engineers can view blueprints of commercial infrastructure, repair recommendations, safety protocols etc.  
Property Maintenance Maintenance Person
Maintenance person can upload pictures and videos of the site for maintenance, maintain a list of things that need to be completed and also dispatch service orders to coworkers
Retail Sales Person Sales person can stock items in the shelf, take inventory of items in the shelf, create new sales orders of items that need to be replenished etc.  

The next section describes how organizations in any industry can leverage the SAP Cloud Platform SDK for iOS and mobile service for development and operations to empower the field technician with all the tools required to complete his job in the most efficient manner.

Solution Diagrams

SAP Cloud Platform SDK for iOS enables you to quickly develop your own native apps, with Swift, Apple’s modern programming language.  The SAP Cloud Platform SDK for iOS was developed as part of a joint effort with Apple.  This joint effort also provides a training academy for developers so they can easily build native iOS apps with the cutting-edge capabilities of SAP Cloud Platform.  Along with SAP Fiori for iOS, which includes reusable design components, the SDK also allows you to tap into the services and functions available in the SAP Cloud Platform so you can build beautiful intuitive native applications. 

SAP Cloud Platform supports scenarios for consumers (B2C), for partners (B2B), and for employees (B2E). The solution provided in this blueprint is part of a company B2E scenario.The B2E scenario is related to services for employees of an organization and it defines certain aspects of the architecture:

  • Integration of SAP Cloud Platform SDK for iOS with mobile service for development and operations
  • SAML based authentication using identity provider in corporate network
  • Principal propagation of user identity to backend SAP S/4HANA system in corporate network
  • Offline capability implementation using ultralite database in the iPad for local storage
  • Sync capabilities using mobile service for development and operations
  • Push notification using APNS and mobile service for development and operations
  • Rapid app development using SAP Cloud Platform SDK for iOS sssistant
  • Ready made code snippets for UI components using SAP Fiori Mentor
  • Logging and tracing on iPad and ability to upload log files to mobile service for development and operations

Reference Solution Diagram

The following graphical diagram of the solution illustrates a basic architectural pattern for integrating mobile service for development and operations with the SAP Cloud Platform SDK for iOS.

Reference Solution Components 

The following list describes the main components needed to implement this scenario and the role they play in the overall solution 

User Network

End user – The end user is the field technician. The end user is assigned the iPad on which the mobile app runs. The end user uses the mobile app for his all his day to day activities. The mobile app is built using the SAP Cloud Platform SDK for iOS that allows the user to efficiently install, maintain and repair assets in the field, anytime and anywhere – regardless of connectivity.

SAP Cloud Platform

Mobile service for development and operations – This is the server counterpart of the SAP Cloud Platform SDK for iOS. This component is critical for offline functionality and push notifications.  This service provides the OData endpoint that is consumed by the mobile app.  

Connectivity Service – The connectivity service allows applications to securely access remote services that run on the internet or on-premise

On-Premise

Identity Provider – Trusted provider that lets you use single sign-on to access protected resources.

Cloud Connector – Serves as the link between on-demand applications in SAP Cloud Platform and existing on-premise systems.

SAP Gateway – Offers development and generation tools to create OData services to a variety of client development tools. It establishes a connection between SAP backend systems data and target clients, platforms, and programming framework. SAP S/4HANA runs a co-deployed (embedded) gateway. However, SAP typically recommends to have one central SAP Gateway hub deployment for customers who connect SAP Gateway to several SAP backend systems

Backend Resources – Protected resources that reside in the corporate network.

Offline Support

One of the key features of the mobile app is the ability to work in an offline scenario. There are various key components that aid in this implementation. Chief amongst them is the mobile service for development and operations component in SAP Cloud Platform.  

The following diagram of the solution illustrates the offline nature of the mobile app:

  1. User logs into the mobile app for the first time.  At this moment, there is no data persisted on the device.  The mobile app makes a request to the mobile service for development and operations server by passing in the defining request.  The defining request contains the name of the entities that the mobile app wants to persist locally.
  2. Mobile service for development and operations server retrieves data from the backend resource on behalf of the device based on the defining request.
  3. The backend resource sends data to the mobile service for development and operations server. There are multiple round trips (Steps 2 and 3 are repeated multiple times) between the mobile service for development and operations server and the backend resource until all the data is retrieved. 
  4. Mobile service development and operations server creates an ultralite database, populates the ultralite database with data retrieved from the backend resource and sends it to the device. 

Now the mobile app is populated with the initial set of data, field workers can work off the network. At the end of the day, when their devices are on the network, they can synchronize their work with the backend system.

The following diagram describes how data is synchronized between the local device and the backend resource:

  1. After a period of working offline (without network connectivity), the device is now online.  The local database is now not in sync with the backend resources.  In order to sync the local database with the backend resources, the mobile app makes a call to flush and refresh methods.  Flush method synchronizes the local changes with the backend resource, while refresh synchronizes the backend changes with the local database. 
  2. Mobile service development and operations server submits the changes made to the local database to the backend resource
  3. The backend resource makes the necessary updates on the backend and sends the server generated IDs
  4. Mobile service development and operations server sends the server generated IDs as part of the location header in the response to the device. The mobile app now resolves the locally created IDs with the server generated IDs

SAP Cloud Platform SDK for iOS

There are several reasons why you should select SAP Cloud Platform SDK for iOS for your development needs.  The SDK was built exclusively for iOS and therefore leverages all of the powerful features of iOS. Also allows developers the tools to quickly and efficiently build their iOS apps for iPhone and iPad.  If a company has already decided on using iPhone or iPad for its field technicians, then the choice is even clearer.

Redesign mobile work experience:

  • SAP Cloud Platform SDK for iOS enables new native business apps for customers to fully leverage the rich data in their enterprise systems and reinvent how work gets done on the go. These native apps will provide secure access to SAP S/4HANA and other SAP and 3rd party solutions while taking full advantage of features in iPhone and iPad, like Touch ID, location services and notifications.

Accelerate development of native iOS apps:

  • SAP Cloud Platform SDK for iOS offers a familiar experience for the developer with UI elements that are built based on SAP Fiori for iOS design guidelines. With SAP Cloud Platform SDK for iOS you get re-usable UX building blocks, use of SAP Cloud Platform services, and new additional innovative tools (assistant, mentor), allowing for significantly accelerated development of native iOS apps.
  • SAP Fiori Mentor – SAP Fiori Mentor is an iPad app that helps identify available iOS controls, documentation, and best practices. This app can be used between business user, designer, and developer to collaborate on design. The app can then generate code that can be copied into Xcode.
  • Assistant – Assistant is a Mac app that augments Xcode by setting up projects, connecting to SAP Cloud Platform, and providing insight into available OData services.

Team collaboration

  • The SAP Project Companion are easy-to-use iOS apps, built by SAP using SAP Cloud Platform SDK for iOS. These enable its users to stay on top of daily topics and actions. The apps help digitizes end-to-end project execution. Project managers and consultants can now enjoy a simple and intuitive user experience, collaborate effectively and leverage the power of the digital core from SAP S/4HANA.

Early adopters

  • For customer success stories, please visit here.

Performance Considerations

Performance is key when it comes to user adoption – especially as it relates to a mobile app. Several factors need to be considered when building the native iOS app.  

OData Considerations

  • Delta tokens – Only changes to the backend resource since the last synchronization are sent to the device. This results in smaller payloads being transmitted and offers much better overall performance. 
  • Server side paging – Server limits the number of rows that can be requested. While this may result in multiple round trips between the mobile service for development and operations and the backend resource, this avoids any kind of timeouts.

Offline Considerations

  • Conflict resolutions – Considerable attention must be paid to make sure data that can be modified are partitioned for each user to avoid conflict resolution. In the case, data cannot be partitioned in such a fashion, then some form of conflict resolution mechanism must be deployed. OData Services use Etags to identify conflicts. 

Mobile App Development Considerations

  • OData query – Make sure queries to the local database have proper filters so only data that is required is fetched from the local database.
  • Definining request – This identifies the set of data that is persisted in the local database.  Make sure you request all the data that will be required by the application.  Also, make sure you allow for any future requirements.
  • Push notification – Push notification requires the device to be online.  So make sure you understand the consequences when sending urgent notifications.
  • Flush and refresh – Flush and refresh methods need to be called periodically when device is online to synchronize the data with backend resources. However, calling it too often can result in degraded performance.

These are some of the main factors that need to be considered when designing and building offline enabled app using SAP Cloud Platform SDK for iOS.  

Security

Overview

Security in the cloud also referred to as ‘Cloud Computing Security’ encompasses a variety of procedures, standards and technologies employed to protect data, applications and associated infrastructure. To make it easier to understand, consider breaking it up into three topics: Authentication, Authorization and Single Sign-on.  

Consider the following topic descriptions:

  1. Authentication is defined in the dictionary as “the process or action of proving or showing something to be true, genuine, or valid.”  In the case of computer programs, it is the process of proving that an application user is who they say they are.
  2. Authorization is defined in the dictionary as “the process or action of being given permission or authority.”  So after you have a valid user on the system the next step is provide the authorizations or permissions to the user. You give the user the access to the application data that they need.
  3. Identity Propagation is defined in the dictionary as “service that permits a user to use one set of login credentials to access multiple applications”  Once you have a valid user and their access permissions assigned you want them to be able to access any number of application systems without having to resupply their credentials.

The diagram below depicts at a high level where the Authentication, Authorization and Identity Propagation topics fit in an overall SAP Cloud Platform Solution:

 

The following diagram shows how Principal Propagation using X.509 certificate works in this architecture.

Solution Security Considerations

SAP Cloud Platform Identity Authentication is a cloud solution for identity lifecycle management for SAP Cloud Platform applications, and optionally for on-premise applications. It provides services for authentication, single sign-on, and on-premise integration as well as self-services such as registration or password reset for employees.

When implementing the solution just described, keep in mind that each the three security topics described above have a number of options for how they get implemented with the SAP Cloud Platform. For this solution, Corporate User Store was the chosen method for doing authentication and Principal Propagation was chosen for single sign-on. Regarding the authorization, it is the backend OData Service that enforces authorization to only return rows that the user is entitled to.

Below you will find the security solution diagram and the steps for each of the three chosen security topics. You can go to the entire security blueprints by clicking on the link in the section.  From the security blueprint, you can link to all the other options you have for authentication, authorization and Identity Propagation in the blueprint library.

Scenario Authentication

Corporate Identity Provider - This blueprint provides common information, guidance, and direction for implementing a Corporate Identity Provider accessible on the internet as the Identity Provider for applications on the SAP Cloud Platform.  It allows the consumer to use a common source of identity for all their cloud based applications.  It provides a standard, internationally adopted method for authentication using SAML assertions.

For more information, visit SAP Cloud Platform Blueprint - Corporate User Store

Scenario Identity Propagation

Principal Propagation - This blueprint provides common information, guidance, and direction for implementing principal propagation with X.509 certificate from SAP Cloud Platform to the backend system that is running On-Premise. It allows the consumer to use this method for any endpoint service that accepts X.509 certificate based authentication.

More information will be available soon.

Learn more

This blueprint highlights important considerations companies need to analyze when building mobile apps with offline capability in order to achieve effective field mobilization. However, it is recommended to review further information to help you design and develop mobile apps with offline functionality. The following resources are a starting point:

Preparing backend system for offline access:

Performance Tuning with Offline Store is a blog that explains performance tips to improve user experience when accessing large volume of data in offline mode

Enable Delta Queries using Exchange Framework and SAP Gateway is a step-by-step guide that explains one approach to detect changes made to business objects and to implement a delta query to retrieve those changes

Connecting cloud connector with the SAP Cloud Platform: This official guide describes how to install and configure the SAP Cloud Platform cloud connector to serve as the link between on-demand applications in SAP Cloud Platform and existing on-premise system

Open SAP Course – SAP Fiori for iOS: Join this free online course to learn how to build your first mobile app with SAP Cloud Platform SDK for iOS. This SDK enables you to quickly develop your own native enterprise apps, built with Swift, Apple’s modern programming language. Along with SAP Fiori for iOS, which includes reusable design components, you can build beautiful intuitive native business apps.

Back to top