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 the 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. 

image
View the HANA Academy videos in the Learn more section

Business Scenario

Management of company’s employees at or en route to the property of clients (rather than on company property) raises quite a few challenges.  These include scheduling and assigning tasks, ensuring driver safety, creating (modifying and deleting) sales orders, and integrating the 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 provides the remote workforce with everything they need to complete their job in the most efficient manner. 

Example of different industries and the types of tasks employees may need to complete:

Industry Employee Tasks
Consumer Products Farmer Investigate crop health in areas where connectivity is not reliable
Telecommunications
Technicians
Install cable or run phone lines into residences or business establishments
Engineering, Construction and Operations Technicians Conduct preventative maintenance and repair activities for machines, buildings etc.
Healthcare
Mobile Nurses
Provide in-home care for elderly or disabled
Oil and Gas
Engineers
Investigate and repair suspected leaks, maintain oil pumps etc.
Professional Services
Maintenance Person
Maintain properties (e.g.tasks like landscaping, irrigation, home and office cleaning)
Retail Sales Person Replenish items in stores, take inventory, also create new sales orders
Insurance Claim Handlers Assess damage and estimate cost for repairs on a claim

Industry Example

In Discrete Manjufacturing, field technicians are required to perform a variety of duties on site. 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 a field technician, a mobile app was developed using the SAP Cloud Platform SDK for iOS. The mobile app was designed and developed to support offlice access and to receive push notification allowing field technician to access the product catalog, view his daily schedule and create new service requests, even when they are off the network. In addition, the mobile app also allows the field technician to receive notifications on urgent service requests.  

Solution Description

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.

The following lists some of the factors that were considered before deciding to build a native mobile app using SAP Cloud Platform SDK for iOS:

  • Device Platform: The field technicians were assigned an iPad for their daily activities.
  • Adoption: Various device peripherals and device specific features are automatically supported. SAP Cloud Platform SDK for iOS natively supports features like Touch ID, location services and notifications
  • Performance:  SAP Cloud Platform SDK for iOS was developed as part of a joint effort with Apple.  Native apps have the best performance, highest security and best user experience
  • Development:  SAP Cloud Platform SDK for iOS comes with new additional innovative tools (assistant, mentor), allowing for significantly accelerated development of native iOS apps
  • Maintenance:  In-house iOS development expertise makes it easier to add new features to the project as well troubleshoot any issues
  • User Experience:  Navigational and Interactive experience is seamless

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

  • The mobile app is built using SAP Cloud Platform SDK for iOS
  • 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
  • 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
  • The field technician can login into the mobile app using his company credentials
  • The field technician is then able to view his daily schedule
  • 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
  • The field technician is also able to create new service requests, dispatch service requests to other employees
  • In addition, the field technician is also able to receive notifications regarding urgent service requests

Solution Benefits

The efficiency and quality of the field technicians service can impact the bottom line and the overall success of the company in any industry:

Industry Employee Benefits
Consumer Products Farmer Team project management is enhanced with easy access to relevant data, allowing them to provide better service
Telecommunications
Technicians
Technicians can access other corporate data and quickly detect the source of the problem, allowing them to reduce delays and provide better serviceEngineering, Construction and Operations
Engineering, Construction and Operations Technicians Technicians are able to make informed decisions with up to date information and are able to make better responses to organizational issues, allowing them to reduce both delays and cost
Healthcare
Mobile Nurses
Nurses can access up-to-date information about their patients (i.e., pre-existing conditions, known allergies), allowing them to provide better service
Oil and Gas
Engineers
Engineers can view blueprints of commercial infrastructure, repair recommendations, safety protocols etc.
Professional Services Maintenance Person
Service providers can access up-to-date customer schedules and location, allowing organizations to plan better routes and reduce costs
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.  Insurance
Insurance Claim Handlers
Claim handler can access the information they need to complete their tasks with a personalized and simplified user experience, allowing them to have faster and direct access to relevant information and higher throughput

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.

Mobile Services for Development and Operations

The mobile service for development and operations is a full-featured mobile app platform delivered as-a-service that allows you to quickly create and operate mobile apps with full offline support, notification services, superior back-end integration and enterprise-grade security. 

Key features of the mobile app is the ability to work in an offline scenario and the ability to receive notifications.

Offline Support

Create, Read, Update and Delete operations (CRUD operations) can be performed against the local store when the device is in offline mode.  Local changes that were made offline can be synchronized with the backend database when the device is in online mode.  Similarly, backend changes can be synchronized with the local store.  ETags is one option that can be used to resolve conflicts when the same record is changed on both the local store and the backend. 

There are several benefits when using offline sync:

  • Reading data from the local store is significantly faster than retrieving data from the network. This increases the app responsiveness
  • Continuous operation of the application regardless of network connectivity increases the app reliability and adoption
  • Since data is read from the local store it limits the amount of network usage.  This is especially critical in high latency or metered networks

The SAP Cloud Platform SDK for iOS and the Mobile Service for Development and Operations server supports offline as well as online operations with one single SDK.  Object-oriented Data Service API are generated from backend service definitions.  Synchronization to an encrypted Ultralite database on the device is optimized to efficiently sync only changed data. The Sync engine caches for performance as well as batching and compressing bulk updates and supports conflict handling.

A command line utility (ilo.exe) provided along with the SAP Cloud Platform SDK for iOS can be used for querying against the local store during the development phase.  In addition, this utility can also be used for Create, Update and Delete operations.  Troubleshooting synchronization issues with local store can be simplified with the help of this utility.

Efficiently synchronizing only changed data between the backend and the local store results in smaller payloads being transmitted thereby lowering network usage and offering much better overall performance. Mobile services for development and operations server is designed to work with delta token calculations on the backend.  In the event, delta token calculations are not implemented on the backend, the Mobile Service for Development and Operations server has the ability to perform the calculation and persist changed keys on the platform. 

Furthermore, an offline configuration file can be uploaded to the Mobile Service for Development and Operations server to optimize the offline synchronization capabilities.

Notification Support

Notifications allows the field technicians to receive urgent updates on any service orders.  Mobile Services for Development and Operations Server initiates a request with the message payload and the device token to the Apple Push Notification Service (APNS) to trigger the push notification.  

Push notification can be configured in the Mobile Services for Development and Operations Cockpit.  In addition, you must also obtain a push notification certificate for your app ID from the Apple Developer portal.  

There are several benefits when using push notification:

  • Ability to receive valuable and relevant updates even when the app is closed
  • Provides sophisticated analytics with data on delivery receipt, open rate time and engagement
  • Seamless integration than email 

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 Single Sign-On

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.

For more information, visit SAP Cloud Platform Blueprint - Principal Propagation

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

SAP Cloud Platform SDK for iOS

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.

Mobile development kit

Rapid mobile app development (RMAD) tools are programming tools that speed the process of creating applications for mobile platforms. SAP’s new RMAD tool, called mobile development kit, is a metadata-driven tool that allows users to customize native SAP applications, as well as rapidly create new native mobile applications

The mobile development kit sits on top of SAP Cloud Platform SDK for iOS and uses its API and UI controls to make it easier for developers and technical business users to build new or customize applications

The mobile development kit offers full, robust offline capabilities, sophisticated validation and business logic, and access to mobile qualities such as the camera and photo library. Application development is web based, and the mobile development kit framework has the following components:

  1. The Editor which is a standard WebIDE plugin
  2. Cloud Platform mobile services which provides the enterprise mobile services
  3. The Client which is a native application that runs on the Apple mobile device
  4. The application definitions that are developed with the editor

Using SAP Enterprise App Modeler to harness the capabilities of Offline OData: this blog explains how to utilize the office capabilities of the SAP Cloud Platform mobile services for development and operations using mobile development kit components.

Click below for step by step videos detailing how to use the mobile development kit to create mobile native applications:

SAP HANA Academy - Mobile Development Kit

Back to top