SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Create an App Using the SAP BTP SDK Assistant for iOS

Create a simple app generated by the SAP BTP SDK Assistant for iOS using the Sample OData service.

Overview

🎓 beginner 45 min. SAP BTP Sdk For IosBeginnerMobileIosSAP Business Technology PlatformSAP Mobile Services

You will learn

  • How to create an app configuration on SAP Mobile Services Admin cockpit.
  • Capabilities of Sample OData service provided by SAP Mobile Services.
  • How to create an native iOS application using the SAP BTP SDK for iOS Assistant.
  • Using the Online & Offline in the generated app. [ACCORDION-BEGIN [Step 1: ](Create Server Side App Configuration)] 1. Go to your SAP Mobile Services account.
    SAP Mobile Services Home
    SAP Mobile Services Home
    > If stuck, please review the pre-requisites of this tutorial. 2. Click Mobile Applications → Native/MDK in the sidebar.
    Native Apps Sidebar Menu Item
    Native Apps Sidebar Menu Item
    3. Click New located at the top right corner. 4. Use the following table to fill the details requested in the New Application Wizard. | Key | Value | |—|—| |ID|sdk.ios.assistant.app| |Name|iOS Assistant App| |Description|Reusable server-side app configuration for creating an app using iOS Assistant.| |Vendor|No Change| |License Type|No Change| |Domain of Application Route|No Change| 5. Click Next.
    New App Wizard First Screen
    New App Wizard First Screen
    6. Click Next on the XSUAA Settings step of the Wizard without making any changes. 7. Select Native Application in the Assign Features for drop down menu. 8. Enable Mobile Sample OData ESPM by selecting the check box in the features table.
    New App Wizard Third Screen
    New App Wizard Third Screen
    > Click here to learn more about the sample service. 9. Click Finish. > The app creation may take up to five minutes. Please wait for the app creation to complete successfully before moving to the next step. [DONE] [ACCORDION-END] [ACCORDION-BEGIN [Step 2: ](Create an Xcode project using SAP BTP SDK Assistant for iOS)] 1. Launch SAP BTP SDK Assistant for iOS. 2. Click Create New located near the bottom left corner. 3. Click Reuse Existing Application in the project template step.
    Assistant Project Template Screen
    Assistant Project Template Screen
    > Click here to learn more about the different types of project templates. 4. Select the SAP Mobile Services account in which you created the server side configuration and click Next.
    Assistant Account Screen
    Assistant Account Screen
    > If stuck, please review the pre-requisites of this tutorial. 5. Use your SAP BTP credentials to complete the SSO login. > This task is only relevant if you chose SSO login during account set up. Click here to learn more about the authentication type for SAP Mobile Services accounts. 6. Select the app you created in the first step and click Next.
    Server App Screen
    Server App Screen
    > If you can’t see your app, please check if the application has been created through the SAP Mobile Services admin cockpit. 7. Use your SAP BTP credentials to complete the SSO login. > This task is only relevant if you chose SSO login during account set up. 8. Use the following table to fill the project details requested in the Provide the Xcode project configuration step of the assistant, and click Next. | Key | Value | |—|—| |Product Name|my-first-app| |Organisation Name|iOS Assistant App| |Organisation Identifier|com.sap.ios| |Bundle Identifier|Auto generated| |Path|No Change| |Mac Catalyst|No Change| 9. Ensure com.sap.edm.sampleservice.v2is present in the Configure the Proxy class generation process step of the assistant, and click Next. 10. Keep the default settings in the Configure the UI generation for the mobile application step of the assistant, and click Finish. > After the project generation process is completed, the Xcode project will open. If prompted, click Trust and Open in the warning pop-up. [DONE] [ACCORDION-END] [ACCORDION-BEGIN [Step 3: ](Examine the generated project)] 1. Open my-first-appmy-first-appOnboardingOnboardingFlowProvider. > You can use Command + Shift + O o and type the name of the file to open it quickly. 2. Search for onboardingSteps to view the function responsible for providing onboarding steps (e.g. Log In, User Consent, Passcode etc.) required by most enterprise mobile applications. 3. Open my-first-appmy-first-appViewControllersESPMContainerProduct. 4. You will have a storyboard file and two controller files configured to show a list detail view in the app. The assistant automatically creates these files for all the entities present in the Mobile Sample OData ESPM configured.
    File Structure
    File Structure
    SAP BTP SDK Assistant for iOS has generated Proxy Classes for each entity of the specified OData service, generated Views and View Controllers and tied them together in the Main.storyboard file as well as dedicated <Entity>.storyboard files. [VALIDATE_3] [ACCORDION-END] [ACCORDION-BEGIN [Step 4: ](Run the app)] 1. Click (Start the active scheme) in Xcode to run the application.
    Xcode Start Button
    Xcode Start Button
    > Configure the scheme to run the application on either a simulator or a device of your choice. 2. Click Start to start the onboarding process.
    App Start Button
    App Start Button
    > Wait for Xcode to deploy, install and run your application on the device before starting this task. 3. Enter your username and password.
    User Log In
    User Log In
    4. Accept user consent requests.
    User Consent
    User Consent
    5. Configure a passcode.
    Set Passcode
    Set Passcode
    > You may be prompted to set up Biometric authentication as we.. These policies can be defined on the SAP Mobile Services admin cockpit. 6. Allow the app to send push notifications.
    Allow Push
    Allow Push
    [DONE] [ACCORDION-END] [ACCORDION-BEGIN [Step 5: ](Edit a customer’s details)] 1. Click ESPMContainer. 2. Click Customers. 3. Click any customer id. > This data is generated by the sample OData service and may differ from the tutorial. 4. Click Edit located on the top right corner. 5. Update the FirstName and LastName. 6. Click Done located on the top right corner. The record gets updated and a confirmation toast message appears.
    Edit Customer
    Edit Customer
    > You can verify the update by going to your SAP Mobile Services Cockpit → Mobile Applications → Native/MDK Application → com.sap.ios.tutorials → Assigned Features → Mobile Sample OData ESPM → v2. [DONE] [ACCORDION-END] [ACCORDION-BEGIN [Step 6: ](Add a new supplier in offline mode)] 1. Turn off network connection on your device. > If the app is running on a device, turn on the Airplane mode. > If the app is running on a simulator, turn off the WiFi/Network of your computer. 2. Click ESPMContainer. 3. Click Suppliers. 4. Click located on the top right corner. 5. Add the requested details. | Key | Value | |—|—| |City|Walldorf| |Country|DE| |Email Address|**`supplier.email@sap.com**| |House Number|**15**| |Phone Number|**123456789**| |Postal Code|**111000**| |Street|**Old Street**| |Supplier Id|**Custom-new-supplierid123**| |Supplier Name|**New Custom Supplier**| |Updated Timestamp|*No Change*| |Products|*No Change*| |Purchase Orders|*No Change*| > The SupplierId may be replaced with GUID after sync. 6. Click **Done`** located on the top right corner. > Notice that the toast message says Created in offline mode. 7. Turn the on the network connection on your device.
    New Supplier
    New Supplier
    > After sync, you can verify the update by going to your SAP Mobile Services Cockpit. Congratulations on successfully building an iOS application using the SAP BTP SDK Assistant for iOS that seamlessly connects to SAP Mobile Services. [VALIDATE_6] [ACCORDION-END]
Sandeep T D S S Sandeep T D S January 30, 2025
Created by January 19, 2023
Contributors

Prerequisites

Steps

Step 1 Create Server Side App Configuration

  1. Go to your SAP Mobile Services account.

    SAP Mobile Services Home
    SAP Mobile Services Home

    If stuck, please review the pre-requisites of this tutorial.

  2. Click Mobile Applications → Native/MDK in the sidebar.

    Native Apps Sidebar Menu Item
    Native Apps Sidebar Menu Item

  3. Click New located at the top right corner.

  4. Use the following table to fill the details requested in the New Application Wizard.

    KeyValue
    IDsdk.ios.assistant.app
    NameiOS Assistant App
    DescriptionReusable server-side app configuration for creating an app using iOS Assistant.
    VendorNo Change
    License TypeNo Change
    Domain of Application RouteNo Change
  5. Click Next.

    New App Wizard First Screen
    New App Wizard First Screen

  6. Click Next on the XSUAA Settings step of the Wizard without making any changes.

  7. Select Native Application in the Assign Features for drop down menu.

  8. Enable Mobile Sample OData ESPM by selecting the check box in the features table.

    New App Wizard Third Screen
    New App Wizard Third Screen

    Click here to learn more about the sample service.

  9. Click Finish.

    The app creation may take up to five minutes. Please wait for the app creation to complete successfully before moving to the next step.

Step 2 Create an Xcode project using SAP BTP SDK Assistant for iOS
+
Step 3 Examine the generated project
+
Step 4 Run the app
+
Step 5 Edit a customer's details
+
Step 6 Add a new supplier in offline mode
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 6
1. Create Server Side App Configuration 2. Create an Xcode project using SAP BTP SDK Assistant for iOS 3. Examine the generated project 4. Run the app 5. Edit a customer's details 6. Add a new supplier in offline mode

Learn more →