Skip to Content

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,

Host: sapes5.sapdevcenter.com

Port: 443

Authentication: Basic

Path Prefix: /sap/opu/odata

Service Collection URL: /IWFND/CATALOGSERVICE/ServiceCollection

(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) > 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 Open Preferences icon and then to Accounts

Click on + icon, Select Developer Portal, provide Name and Developer Portal URL (copy URL from step 2)

https://devportalxxxxtrial.hanatrial.ondemand.com

 

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

 

In Assistant, Click on ‘+’ icon,

 

select available API and click on “Consume

 

 

 

Keep default settings as it is except changing Authentication Type to Basic (required for my API connecting to Gateway Demo System Step 1.1)

 

Note: I dont have any API key configured for API added in step 1.2 , it can be done via adding “Verify API Key” policy.

select Generate master-detail option and hit Finish.

 

Below screen is showing up because i didnt set any API key, Click on “Yes”

 

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 2.0

SAP Translation Integration – SAP Cloud Platform SDK for iOS 2.0

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

Jitendra Kansal

Product Management, SAP Cloud Platform User Experience
SAP SE

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