Skip to Content
Technical Articles
Author's profile photo Marco Eidinger

Using Xcode Previews with SAP Cloud Platform SDK for iOS


SAP Fiori Mentor app, as interactive documentation to discover and view live previews of all UI components, is pretty neat. As a designer or developer, you can easily change parameters and see the effect immediately.

But is it possible to get such preview functionality for your own UI-Kit based components built on top of SAP Cloud Platform SDK for iOS?

Yes ? ? ! This blog post will give you an example.

Xcode Previews was added in Xcode 11 and allow you to quickly preview the current state of your view. You might think that you need to use SwiftUI in production to make use of this feature but it’s not true.

Whether you’re working with a custom UIView or with a custom UIViewController, they both support previews in the new canvas.

In the example illustrated below, we are previewing a custom subclass of FUIObjectTableViewCell


Demo how to use Xcode Previews with SAP CP SDK for iOS

Here is the example code

Side note: if you are interested in how SAP Cloud Platform SDK for iOS is adopting SwiftUI then have a look at the new open-source project This project is meant to augment and in some cases replace the UIKit-based implementation contained in the SAPFiori framework. This project is in development, and should not yet be used productively.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.