Skip to Content
Author's profile photo Andreas Schlosser

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

One week after Apple’s release of Xcode 9 and iOS 11 we’ve now shipped a new major release of our SAP Cloud Platform SDK for iOS 2.0 – download here – (and we also updated 1.0 SP02 to be compatible with Xcode 9). We added a couple cool features that I’ll briefly highlight here – you can get the full story and much more background information in our documentation.

System Requirements

Let’s first cover the basics; you will need Xcode 9 in order to use the latest SDK – I’ve explained the background and complications of Swift binary compatibility in another blog – Xcode 8.3 will not work. This is also true for the latest 1.0 release, going forward we will support Xcode 9 only for your development.

We continue to support iOS 10 on both major SDK releases, so you can build iOS 10 and iOS 11 apps using the most current 1.0 SP02 patch as well as using the 2.0 version.

The Assistant will work fine on macOS Sierra and High Sierra.

Upgrading from 1.x

Simply drag and drop the new Assistant 2.0 from the DMG into your /Applications folder – done. Existing projects that have been created with the Assistant can be upgraded with the ‘Refresh frameworks…’ context menu. For other Xcode projects – simply replace the frameworks.

In most cases the migration should work effortless. In rare cases you will see ‘fix-it’ suggestions from Xcode because we did streamline our APIs in some places, you can also find more detail in the ‘Migration’ section of our docs – only look at this if things go sideways.

Note on Swift 3.2 vs Swift 4: while in theory these two can be freely mixed, we saw problems when using the SDK 2.0 (written in Swift 4) with a Swift 3.2 source code project. We are working with Apple to analyze and fix these, for the time being, please upgrade your projects to Swift 4, when upgrading to SDK 2.0

Assistant Features

You will notice the fresh look when you start the Assistant for the first time. It is now much more aligned with the UX of other native macOS apps. In particular, the settings screen is much tidier:

This also hints at two of the great new features that we’ve added to the Assistant in this release. The Assistant doesn’t only connect to SAP Cloud Platform Mobile Services, but can now also interact with SAP API Management Developer Portal as well as SAP Translation Hub.

We’ve also closed a gap on SAML authentication – if you’ve configured the Assistant to authenticate with Mobile Services via SAML, you can now also leverage the download metadata feature and don’t need to provide the metadata manually in most cases.

We’ve also changed how we ship the frameworks and tools – instead of having it all spread out in the folder structure of the DMG file, it is now embedded in the Assistant and you can from with-in the Assistant

  1. Export the frameworks to any location on your disk
  2. Install the tools in your /usr/local/bin
  3. Open the API docs

IMPORTANT: the frameworks are not duplicated anymore in the DMG folder structure; if you used to use automated scripts to copy frameworks into the right places, you now either need to manually export the frameworks once, or you let your scripts grab the frameworks out of package contents of the Assistant at /Contents/Resources/SAP-CP-SDK-for-iOS.

API Management Integration

It is now much easier to browse managed OData APIs and incorporate them into a native iOS App. Simply open the SAP API Business Hub or SAP API Management catalog, browse the available OData APIs there, and add them to your project.

The Assistant will automatically retrieve the API key if possible, configure Mobile Services with the right information to connect to the selected API, and then subsequently generate the OData proxy classes and UI scaffolding as usual.

Further reading on these features in these two excellent blogs

  1. API Business Hub Integration: https://blogs.sap.com/2017/10/27/sap-api-business-hub-integration-sap-cloud-platform-sdk-for-ios-2.0/
  2. API Management Dev Portal : https://blogs.sap.com/2017/11/07/from-api-to-app-assistant-tool-generates-mobile-app-scaffolding-from-a-backend-api/

Translation Hub Integration

Once you have worked on your app and want to get ready for rolling this out to a broader audience, you’ll inevitably start thinking about internationalization. This became as easy as it can get with the new Assistant, which extracts localizable text from your Xcode project, connects to SAP Translation Hub for translation, and then updates your Xcode project with the translated texts.

Simply open the context menu on an existing project in the Assistant, and choose “Add translation…”

Then select the target languages and let the machine do the job for you.

Note: Xcode doesn’t support using the script tools to import a new language into an Xcode project; so, the first time you run this you will see instructions on how to import then generated translation files yourself. You need to do this once – subsequent re-translations will run fully automatically and update the Xcode project automatically as well.

You can then also find the translation project on the Translation Hub site, and you can go there and fine-tune the translation where the tool didn’t find the appropriate translation for come phrases in the context of your app – simply follow to where the “Go to Translation Hub” button takes you.

More detail on this feature in a great blog at: https://blogs.sap.com/2017/10/27/sap-translation-integration-sap-cloud-platform-sdk-for-ios-2.0/

 

The generated App

We didn’t only clean up the Assistant UX, we’ve also spent significant effort on the generated App itself. We heard you saying that it wasn’t very easy to understand the structure of the generated code and to continue working on it and enhancing it. Check out the new way we’ve laid out the code now. We have dedicated storyboards and explicit classes per collection – it should be much easier to modify/enhance parts of the screens now, without messing up with everything else that you didn’t intend to touch at all.

The generated app also used the new on boarding flow implementation that we’re shipping in the new SAPFioriFlows framework (more details further below) – resulting in a very clean and secure implementation of the initial bootstrapping and authentication steps of an app.

SAPFioriFlows

One common ask from developers was that we should make it easier to implement the bootstrapping  and initial user authentication of the app – also referred to as ‘onboarding’. Here you go – we are shipping a new framework SAPFioriFlows that holds more aggregated UI controls and flows, where we pull the UI controls of SAPFiori and the underlying features of SAPFoundation together and give ‘more complete’ implementations of recurring patterns. We stayed true to the principle that everything should be modular and extensible, though – you can freely assemble the on boarding by picking the right steps and orchestrating them into the flow that your app needs. You can also add custom steps if the SDK doesn’t ship just exactly what you need.

We covered quite a bit of functionality out of the box now; you can load configuration into your app from

  • a hard-coded file that’s shipped with the app
  • MDM provisioned configuration
  • Discovery Service (email-based) configuration look-up
  • QR code scanning

The users can authenticate with any of the mechanisms supported in SAPFoundation, including

  • OAuth2
  • Basic Authentication
  • SAML
  • SLS / Certificate
  • One-time-password validation

Credentials in the app will be protected by

  • TouchID, or
  • application passcode

And all of that is implemented with UI controls following the SAP Fiori for iOS design patterns.

The easiest way of getting started on this new framework is to let the Assistant generate an App for you and have a look at the code in the Onboarding folder in the generated Xcode project. You also want to check out the API docs with all the sample code and suggestions that we’re giving in there.

We’ll look into enhancing this framework further, so keep the ideas coming what you most urgently need and don’t want to write yourself because you feel this is just so common and basic that everybody else will need it as well.

Added capabilities to existing Frameworks

On top of all of that, we continue to enhance the existing frameworks and capabilities based on what we hear from you developers using our stuff and helping us by identifying the gaps and weak-points of the SDK. Here’s what we got in stock for you with this 2.0 release – the full list is in our release notes.

SAPCommon / SAPFoundation

Authentication module enhancements

  • OAuth Client Credential flow is supported now
  • CSRF token handling is improved
  • OTP handling is supported
  • Implementation of Basic Auth and Client Certificate authentication becomes easier with new observers
  • Support iOS 11 SFAuthenticatedSession

JSON Configuration Provider

Support for Swift 4 Codable

Capability to load user name and roles from Mobile Services

SAPOData / SAPOfflineOData

Support for service extensions; proxy classes will interoperate with older/newer versions of a service (if compatible)

Closed some gaps in OData v4 support

ILOdata enhancements to support batch operations, deep inserts, and binds

Improved transaction handling for offline OData

SAPFiori

Make sure you update the SAP Fiori Mentor app to explore the new UI controls. Amongst others, they include these:

New header controls

New KPI controls

Initial set of Map controls

Shipping a Fiori Icon library now

Grid table view

Assigned Tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jason Scott
      Jason Scott

      Some awesome improvements here....

       

      Author's profile photo Virinchy Panangipalli
      Virinchy Panangipalli

      Thanks a lot Andrias and Team for updating the iOS SDK frequently as market demands . Many more features to try now.

      Is there any Road Map document for iOS SDK like one is available for Fiori and other SAP products here ?

      Cheers,Virinchy

       

      Author's profile photo Andreas Schlosser
      Andreas Schlosser
      Blog Post Author

      Virinchy,

      I'm glad you like our new stuff. You can find the SDK roadmaps online as well.

      Thanks
      Andreas

       

      Author's profile photo Virinchy Panangipalli
      Virinchy Panangipalli

      Thanks Andreas, i can see the document available now here .

      Can we safely assume that product support of Native SDK support for SMP(HCPMS)  and SAP Cloud Platform SDK for iOS go Hand in hand ? Where does the actual delta come in between the SDK from HCPMS features support point of view ?

      Author's profile photo Andreas Schlosser
      Andreas Schlosser
      Blog Post Author

      Virinchy, the two SDKs address the same fundamental needs, ie. building enterprise native apps, but they are independent products, even written in different programming languages. There must not be an expectation that all features are identical across the two products. In particular the SAPFiori collection of UI controls is unique to the newer SAP Cloud Platform SDK for iOS. However, you're right that both connect to SAP Cloud Platform Mobile Services and do leverage these services in very similar ways.

      Thanks
      Andreas

       

      Author's profile photo Former Member
      Former Member

      Is SAP Fiori Mentor App is available for iPhone? I couldn't find it online, if yes, please share the app URL too.

      Author's profile photo Andreas Schlosser
      Andreas Schlosser
      Blog Post Author

      Hemang, the SAP Fiori Mentor App is iPad only so we can provide the best experience when browsing the available UI controls and screen layouts for all form factors.

      Thanks
      Andreas

       

      Author's profile photo Frank Stødle
      Frank Stødle

      Andreas, thanks for this update. You say "Shipping a Fiori Icon library now" - but I am unable to figure out where to download the icon library?

      Author's profile photo Andreas Schlosser
      Andreas Schlosser
      Blog Post Author

      Frank,

      The Fiori icons are enumerated in https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/Frameworks/SAPFiori/Enums/FUIIconLibrary.html.

      You can also find more information at https://experience.sap.com/fiori-design-ios/article/iconography/ (incl. an email that you can go to if you're missing icons for your scenario)

      Thanks
      Andreas

       

      Author's profile photo Frank Stødle
      Frank Stødle

      Hi Andreas,

      thanks for replying. There are just a very few enumerated icons. How can we access all the rest of the Fiori icons, are they not available as a download? For instance, in SAP's sample code in the documentation (https://help.sap.com/doc/978e4f6c968c4cc5a30f9d324aa4b1d7/Latest/en-US/Documents/index.html), various icons are referenced - such as "asset", but these icons are not available in XCode.

       

      Regards

      Frank

      Author's profile photo Andreas Schlosser
      Andreas Schlosser
      Blog Post Author

      Frank,

      Unfortunately we don't have an equivalent icon set for iOS yet; we cannot simply reuse the icons for the web as they might need to be designed differently for iOS. The best would be if you could send indication on which icon (set) you're missing most to the email address mentioned at https://experience.sap.com/fiori-design-ios/article/iconography/ so we can put these high up in the list

      Thanks
      Andreas