Skip to Content

In June of 2015, we released our utilities consumer self-service mobile application SAP Self-Service for Utilities (SAP SSU) 1.0 for Android and iOS. SSU is a hybrid mobile app, meaning it is an HTML5+Cordova application.

The app released on iTunes and Google Play is only for demo purposes and cannot be used productively by a utility.  To put it to productive use, a utility company would need to make use of the app source code delivered by SAP to make the necessary modifications to it.  As part of the implementation, a utility company would first need set up SAP Multichannel Foundation for Utilities and Public Sector to enable the integration of the mobile app with the SAP utilities backend (SAP ERP IS-Utilities and SAP CRM for Utilities).

In the first blog of this two part blog series, I explained the steps for importing the app source code into your development environment and running, testing and debugging it for the Android platform.  In this blog, I will explain the same steps for the Apple iOS platform.

Before proceeding with the steps listed below, make sure you have the following prerequisites in place:

  1. SAP Multichannel Foundation for Utilities and Public Sector SP5 is installed and setup.
  2. SSU mobile app leverages SAP Mobile Platform (SMP) 3.0 for the push notification scenario. All the communication between the app and the SAP utilities backend passes through SMP.  The app first connects to SMP which then forwards each request to SAP Gateway.  Therefore, it is important to make sure that SAP Mobile Platform 3.0 is configured for OData consumption. For further information on how to configure the server for our app, please follow the steps in Chapter 5 of the SSU admin guide. For more information about SMP 3.0 Server, visit http://help.sap.com/smp305svr
  3. Xcode 6 and above.
  4. iPhone simulator (iOS 7 and above).

Note: the current version of the source code of the mobile app is based on the code line of UMCUI501 SP5. And the source code of iOS application is to help our customers, utilities companies, updating SSU www resources, not building the application from scratch.


Step1: Download the Xcode project

First you need to download the project from the SAP Service Market place.  To obtain source code, see SAP note 2165708.

After downloading the self-contained Xcode project that includes all the required  dependencies,  unzip the file in a folder and the contents of the folder will look like below:

/wp-content/uploads/2016/01/ios_001_868232.jpg

Please note that you MUST NOT delete the target folder.

Step2: Import the project into Xcode

After unzipping, browse to the folder containing the .xcodeproj file by following path <folder where you unzipped files>\src\xcode\

/wp-content/uploads/2016/01/ios_002_868233.jpg

Now open SelfServUtil.xcodeproj using Xcode.

/wp-content/uploads/2016/01/ios_003_868234.jpg

Step3: Verify the dependencies linkage

In order to make sure that you have the right app build context, meaning whether you are building the app to run on the simulator or on a real device and whether you are building it for debug mode or release mode, it is important to make sure that the project is linking to the required libraries and headers.

To verify this, go to the build settings tab and search for “header search path” and make sure it has the following entry:

${PROJECT_DIR}/../../target/headers/${BUILD_STYLE}-${PLATFORM_NAME}


/wp-content/uploads/2016/01/ios_004_868244.jpg

Four possible values for the parameter /${BUILD_STYLE}-${PLATFORM_NAME} are:

  • Debug-iphoneos
  • Debug-iphonesimulator
  • Release-iphone
  • Release-iphonesimulator

Then search for “library search path” and make sure it has the following entry:

${PROJECT_DIR}/../../target/libs/${BUILD_STYLE}-${PLATFORM_NAME}

/wp-content/uploads/2016/01/ios_005_868246.jpg

Step5: Running and debugging the application

Now you can run the application on the simulator

/wp-content/uploads/2016/01/ios_006_868248.jpg

Since this is a hybrid app, you need to debug it using a Web developer tool – we use Safari by going to the developer tool.

/wp-content/uploads/2016/01/ios_007_868249.jpg

Click on “index_packaged.html”.

/wp-content/uploads/2016/01/ios_008_868250.jpg

Location of the application resources:

App resources are located inside www -> umc folder soif you would like to change the User Interface or would like to modify or add a feature to the app, you need to modify files under this folder.

/wp-content/uploads/2016/01/ios_009_868251.jpg

And the corresponding file structure is:

/wp-content/uploads/2016/01/ios_010_868252.jpg

Where the splash screens and icons are located , so you can replace them but please pay attention to the image size and its name.

/wp-content/uploads/2016/01/ios_011_868254.jpg

It is important to mention that there is one more library, smp (www -> umc -> smp), added to SSU for iOS and Android, and please don’t confuse it with the one that comes with kapsel plugins, which is directly under www (www -> smp). It plays the glue role between the SSU mobile resources and cordova plugins (including kapsel plugins).  For further information about kapsel plugins, see http://scn.sap.com/docs/DOC-49592.

/wp-content/uploads/2016/01/ios_012_868255.jpg

The application works in demo and online modes. If you would like to test in demo mode just go to the logon screen and click on the Demo button.

/wp-content/uploads/2016/01/ios_013_868256.jpg

/wp-content/uploads/2016/01/ios_014_868257.jpg

Add custom theme

It is highly recommended to use the theme designer tool to modify the theme for SAP SSU responsive application. The following pic shows where to locate the custom theme:

/wp-content/uploads/2016/01/ios_015_868258.jpg

Add custom logic and functionalities

If you have any custom logic or functionalities you need to place them in the corresponding folder (foundation, private, public). You need to pay special attention to those hooks, which are used to call methods in the package context. For example, some functionalities are handled different in the context of package app for example login and logout.

/wp-content/uploads/2016/01/ios_016_868259.jpg

Summary:

In this blog, I described the steps to import the mobile app’s source code from SAP Service Market place, run it, and where to import custom them and code.  In a separated related blog, I will explain the same steps for Android platform.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply