Skip to Content
Author's profile photo Andreas Schlosser

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

The first service pack on top of our last major release is out. As usual, you can get it on SAP Marketplace or in the SAP Store. The comprehensive documentation gives you all the details, here are some of the highlights that we added.

System Requirements and Upgrading

Good news, this service pack won’t require any updates to underlying technologies at your end. Xcode 9.1 and Xcode 9.2 have remained binary compatible on Swift frameworks, so if you are on either version, you can keep going also with the latest SDK. I trust by now you’ve made the move to Swift 4, so you’ll be fine on that side, too. The Assistant itself continues to run on the current macOS version.

To upgrade from version 2.0, simply replace the Assistant in your /Applications folder. Any apps that are managed in the Assistant can be upgraded by simply clicking on the project name and selecting ‘Refresh Frameworks…’ from the context menu. Open the Assistant main menu and ‘Export Frameworks…’ to extract the new frameworks on your disk so you can copy them into any Xcode project not managed by Assistant.

Little (but maybe useful for some) enhancement – you want to also install the tools, but are of the opinion that /usr/local/bin really isn’t the right place for them? Open the main menu and press Alt, this will give you ‘Install Tools…’ and you can pick the install directory.

Assistant

The Assistant leverages some of the enhancements that happened since the last major release.

We now support connecting to existing translation hub projects. The Assistant shows a list of available translation projects and you can link your Xcode project to an existing translation project, or create a new one as you did before.

 

You’ll also see the onboarding flow used slightly different per default in the generated app. The default is to now use the discovery service to bootstrap the application. This allows to load configuration into the app by looking it up via an email address. Each Mobile Services account comes with a test email domain that can be used. The Assistant shows that domain in the last step of the Assistant project creation flow.

And we also pre-fill the UI screen for most convenient testing.

You will also notice that if you immediately start the app after it has been generated, that you won’t be asked for the passcode anymore. We’ve disabled the local default passcode policy in the OnboardingManager class (you’ll find the place easily). We only pull the passcode policy from the server, per default it is turned off. If you log on to the Cockpit and configure a passcode policy before you onboard, you’ll see the usual passcode / Face ID screen again. You can also re-enable the local passcode policy if you wish. What you will see, though, is the newly added EULA step that became part of the default flow.

We include translation of content of the onboarding and other UI controls in German, French, Spanish, and Portuguese. Of course you can still override all content explicitly in your app to add other languages or override the SAP translations. And, hey, the generated app has an icon now.

Read more on changes in Assistant and the generated app at https://blogs.sap.com/2018/01/30/latest-changes-in-sap-cloud-platform-sdk-for-ios-assistant-and-its-generated-apps/.

The new discovery service integration is explained in detail at https://blogs.sap.com/2018/01/30/sap-discovery-service-integration-in-sap-cloud-platform-sdk-for-ios/.

The blog at https://blogs.sap.com/2017/10/27/sap-translation-integration-sap-cloud-platform-sdk-for-ios-2.0/ walks through the changes and improvements on the SAP Translation Hub integration.

Frameworks

We made various improvements around stability and ease-of-use on the foundation components. The biggest enhancements for SP01 happened in the authentication and security area. We do now support sharing data across apps and using different types of stores easily. You can now control conveniently where to store the data that is required/collected during onboarding and later in the app; the keychain, the secure store, or any other persistence provided by you. By putting data in the keychain, you can also share it across multiple apps that you’re building. This way, users can onboard and authenticate in one app, and the credentials can be shared/reused in another app (if you’ve implemented it that way).

We also support the Swift 4 Codable protocol in our cache implementation now, and made the use of logging and log upload more convenient.

Ever got annoyed by invalid characters in OData metadata, e.g. forward slashes in namespaces, which prevented generation of proxy classes? We’re now handling these situations more gracefully and became more tolerant to invalid endpoints, as long as we can still produce valid and compiling code for you. In some cases we also had name clashes with reserved keywords or duplicates within metadata that are prevented now. The new versions of our OData frameworks include various minor improvements towards supporting the full OData spec.

On the UI side, we’ve added bits and pieces to the existing controls, like the object cell, to cater for more scenarios that we’ve seen required in various application scenarios. Our map controls became a significant overhaul and polishing and look even better than before now

Additionally, we include a whole new set of controls to support data visualization in your app. This includes line and bar charts in various sizes to be used in different places. You can also implement single-tap interaction to allow users highlighting data points and getting more detail on them.

Here’s some sample code that should help getting you started: https://blogs.sap.com/2018/01/31/data-visualization-controls-in-sap-cloud-platform-sdk-for-ios/.

We invested in improving the developer experience when designing your app in Interface Builder. An initial set of UI controls supports IBDesignable and gives a preview in Interface Builder when designing the screens of your app.

Assigned tags

      15 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Dean Li
      Dean Li

      Great to have EULA in onBoarding process and the new map and data analysis features are all looking good! Will try it later!

      Author's profile photo Volker Kolberg
      Volker Kolberg

      Hi Andreas!

      Fine. But after refreshing the Framework files in my app I still get the following Build error:

      Module compiled with Swift 4.0 cannot be imported in Swift 4.0.3: /Users/admin/Documents/__vk/Xcode Projects/VK-Sales-Orders/SAPFoundation.framework/Modules/SAPFoundation.swiftmodule/x86_64.swiftmodule

      Any idea?

       

      Author's profile photo Volker Kolberg
      Volker Kolberg

      Edit: I use Xcode Version 9.2 (9C40b)

       

       

      Author's profile photo Volker Kolberg
      Volker Kolberg

      Update 2: After deleting the project and regenerating it from scratch using the Assistant all Build Errors (in the meantime i had additional errors) are gone. App runs now.

       

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

      I would've suggested to maybe try a project clean (Cmd+Alt+Shift+K), but glad you got things going now

      Andreas

       

      Author's profile photo Dean Li
      Dean Li

      Hi Andreas Schlosser ,

      What's the Framework version and release date in Milestone Wiki page? As we are using NAAS process to update the framework in both ourselves and NAAS's Git repository , we need to know the exact version number. Thanks.

      https://wiki.wdf.sap.corp/wiki/display/tango/Milestone+Builds

       

      Best Regards,

      Dean

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

      Clarified this directly with Dean; for external users, please use the SAP Store or SAP Marketplace downloads

      Thanks
      Andreas

       

      Author's profile photo Former Member
      Former Member

      Hi Andreas,

      Can we use the SAPOData framework in any iOS app that connects to Non-SAP cloud platform  apis? If yes, how does the auth work?

      Regards,

      Soumin

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

      Soumin,

      That is entirely possible - it just needs to be an OData endpoint that you're connecting to. Authentication might be a bit more difficult, this strictly depends on the backend that you have in mind. We obviously make it very easy with the SDK to authenticate towards SAP Cloud Platform - so maybe you want to consider defining that non-SAP API as a destination in Cloud Platform Mobile Services and inherit more SDK support?

      This might be helpful to understand the destination and SSO/authentication configuration possibilities: https://help.sap.com/viewer/38dbd9fbb49240f3b4d954e92335e670/Cloud/en-US/db73d2da88684c8da382f23c0ecbd28f.html

      Thanks
      Andreas

       

      Author's profile photo Former Member
      Former Member

      Thanks for your reply, Andreas. Is there any other option we could use for auth without registering in SAP cloud platform services?

       

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

      Absolutely, you can use the SAPURLSession and existing authentication observers or build your own observers if your backend uses an authentication method that isn't supported by the SDK today - check out the relevant SDK documentation of SAPURLSession/Observers/Authentication.

      Hope that helps
      Andreas

       

      Author's profile photo Former Member
      Former Member

      Thanks. Also can we use SAPOfflineOData framework with any Odata backend?

       

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

      Soumin, currently we only support OData v2 - we have plans to add OData v4 support also

      Thanks
      Andreas

       

      Author's profile photo Michael Healey
      Michael Healey

      Dear Andreas

      I was hoping to follow the openSAP course "SAP Fiori for iOS - Build Your First Native Mobile App" as an introduction, however it looks as if the sample data source is not longer available.

      FYI I have followed the advice https://open.sap.com/courses/ios2/question/b50860a7-7364-4e2e-bccd-e15ff21b98b3 without any success.

      Thanks in advance for any advice

      Mike

       

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

      Mike,

      Confirmed, something is wrong there; I'm following up with the team at SAP, I'll get back to you

      Thanks and apologies
      Andreas