Skip to Content

[Updated] : Blog content updated considering latest release of SAP Cloud Platform SDK for iOS 3.0 Assistant UX (You might have already read my colleague Andreas blog post on what’s new in latest SAP Cloud Platform SDK for iOS 3.0)

Since Release of SAP Cloud Platform SDK for iOS 2.0 has brought great number of features in SAP Cloud Platform SDK for iOS Assistant Tool (a native MacOS app). One of them is: Connecting to SAP Cloud Platform API Management Developer Portal for creating a new destination in an XCode project

 

 

(image reference)

SAP Cloud Platform API Management is an open-extension platform that simplifies integration with SAP and non-SAP solutions. Enabling businesses to easily share digital assets as application programming interfaces (APIs) beyond traditional applications and websites with business partners to create business networks and cross-company collaboration. Check here for more information.

In this blog post, i am going to tell you how you can incorporate an API (from SAP Cloud Platform API Management)  into a native iOS application.

At the starting, a proxy developer will use API Portal for adding an API provider, creating API proxies, Products and( Steps 1 to 1.3)

then developer of a front end application will consume an API proxy (developed by proxy developer) from the developer portal (Steps 2 to 4)

What you can do with Developer Portal?

  • Its a common platform for application developers to consume APIs
  • Every SAP Cloud Platform API Management customer is provided with their own developer portal
  • Capabilities like on-boarding apps developers, explore and test APIs can be leveraged
  • Check here for more info

 

Let’s get started.

Step 1 : Exposing back end info via SAP Cloud Platform API Management  – API Portal

API Portal provides tools to create and manage API, here you can create APIs, assign various policies and test them.

1.1 : Adding an API Provider

In this step, i will add a backend (API Provider)

In SAP Cloud Platform trial account, enable API Management service if not done before and then open Access API portal page

 

 

 

In API Portal page navigate to Develop > API Providers > Create

 

Here, i am adding ES5 SAP Gateway demo system (BETA) details,

Type: Internet

Host: sapes5.sapdevcenter.com

Port: 443

Use SSL : select checkbox

Path Prefix: /sap/opu/odata

Service Collection URL: /IWFND/CATALOGSERVICE/ServiceCollection

Trust All : select checkbox

Authentication Type: Basic

 

 

(Click on Catalog URL to see if you are able to get backend info)

1.2 : create an API

After adding API Provider details, I will select API(s) which I may make available to application developers

Go to APIS section under Develop,

Click on Create

Select API Provider from dropdown> Discover

Choose List of service(s) >search with Demo and select GWDEMO and then click on OK

Let all info be same as there by default and then press Create

and in the last, select “Save And Deploy” option

 

1.3 : Create and publish a Product

Next, we will create a Product in order to make API available in developer portal

Select Develop > PRODUCTS tab

Click on Create, provide Name, Title

Under APIS, Click on “Add” and select a particular API Name

Click on “Publish” at top right hand side

 

(Also, you can add various policies and test API as well, i have skipped these steps)

Step 2 : Check if Product is available in Developer Portal

What you can do with Developer Portal?

  • Its a common platform for application developers to consume APIs
  • Every SAP Cloud Platform API Management customer is provided with their own developer portal
  • Capabilities like on-boarding apps developers, explore and test APIs can be leveraged
  • Check here for more info

Switch to Developer Portal page to check if API Product is available for developers,

(If you are accessing it first time, you might see a message saying “You need to request access to API content as application developer , Register to send the request to administrator , follow instructions accordingly >> This step is required for an application developer to view the Products available in the Catalog store.)

 

 

There is also API Test Console where i can perform various queries like GET, POST, PUT, DELETE and so on for all available collections

Step 3: Add an Developer Portal account in Assistant

In SAP Cloud Platform SDK for iOS Assistant app, click on”Manage Accounts”

Click on “Add New”

 

 

Select Type – Developer Portal

Name: Any name of your choice

Developer Portal Host:https://devportalxxxxtrial.hanatrial.ondemand.com

(you can find host url by clicking on “Access Developer Portal” as shown in step 1.1)

And then click on “Save”

 

Step 3: Creating a project using Assistant application connecting to API exposed via Developer Portal

Click on “Create new” as shown below, select “Create New Application”, choose your SAP Cloud Platform Mobile Services account and then click on “Next”

 

Give a name to SAP Cloud Platform Mobile Services application, identifier, choose desired authentication Type

Click on “Add new from API Management” and select recent account added

Click on “Next”

 

Select Product – ES5Demo and it’s respective artifects

Give a name to destination to be created in SAP Cloud Platform Mobile Services and then click on “save”

After saving the destination, you could see that , destination has been selected by Assistant , click on “Next”

For feature screen, you can choose different options . For this blog post, i am going with default selection, click on “Next”

 

 

Now for Xcode project, give it a name, click on “Next”

Generate a master-detail project

 

Assistant will generate the app and ended up with xcode ready project. run it in a simulator

 

Thanks for reading, hope this guide will give you an idea how easily you can incorporate APIs from SAP Cloud Platform API Management in a native iOS application with help of SAP Cloud Platform SDK for iOS Assistant.

Check below resources for more information:

Help Documentation

What’s new in SAP Cloud Platform SDK for iOS 3.0

Latest changes in SAP Cloud Platform SDK for iOS Assistant and its generated apps

SAP Translation Integration – SAP Cloud Platform SDK for iOS

SAP API Business Hub Integration – SAP Cloud Platform SDK for iOS

From API to App: Assistant tool generates mobile app scaffolding from a Backend API

SAP Discovery service Integration –  SAP Cloud Platform SDK for iOS

Jitendra Kansal

Product Management, SAP Cloud Platform User Experience
SAP SE

To report this post you need to login first.

2 Comments

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

Leave a Reply