This will be a series blog for Fiori for iOS. It helps you to use controls provided by SAP to develop iOS apps using swift language.
The series blog contains 4 parts, they are:
Part2: Step by step blogs to use Fiori controls
Part3: Realize Fiori floor plans using Fiori for iOS controls
Part4: Theme customization
In previous blog, I summarized the advantages of Fiori for iOS controls, now you can start using them from this blog.
Before using those controls, you should know how to setup your development environment and your project for your development.
I noticed there are excellent tutorials help you set up the SDK and connect to SAP Cloud Platform, you can find it here. But the tutorial focus on how to connect the cloud platform, and the coding part was replacing by using the assistant app. The way is more efficient for production usage but not good for learning, so I re-write the procedure in this blog to help you set up your environment.
1.Download the SDK
The first step is to get the SDK.
You can get the trial version of the SDK from following link
After click the Golden “Trial Version” button, you will be informed to finish a form for apply the trial version.
After that, about some hours, you will receive a e-mail which contains a link to the download page of the SDK.
Click the link within 48 hours, you will enter a download page for different versions of the SDK, always click the last line to make sure you get the latest version of the SDK .
Unzip the file you downloaded, you will find a .dmg file in your zip achieve.
Open the dmg package and drag SAP CP SDK for iOS folder into Application
Open your finder, click Application you will find the folder, and under the folder, open Frameworks->Release-fat, you will find some framework files. Those files are framework models for testing purpose. The “fat” release contains all codes for running on iOS simulator, iPhone and iPad, it is convenient for testing purpose. When you publish your apps as production, you should use corresponding version of framework files for different platform.
3.Create a new Xcode Project
Open your Xcode and choose “Create a New Xcode project”
Select “Single View Application” and click “Create”
In the product name field, input a name for your project
In the team field, choose None, if you want to test your app on your iPhone, rather than simulator on your mac, you should have a Team. You can apply a temporary team certificate if you have not join the apple developer program
You can reference this link for binding apple id to xcode and register your personal team.
In the organization name, fill with your organization
In organization identifier, you must input something like a namespace, for example, com.sap, com.yourcompanyname
Keep all other thing as default and click Next
Choose the folder you want to store you file, for example, “Documents” and click “Create”
Congratulations, you have created a Xcode project. The next step is where SAP comes in.
4.Import SAP Cloud Platform SDK for iOS and test
In the first page of your project, ignore the error message. Scroll down to find the “Embedded Binaries” section. Click the ‘+’ button in the left bottom corner of the section.
Click “Add Other…” in the pop-up window
Navigate to Application/SAP CP SDK for iOS/Frameworks/Release-fat
Shift click SAP Fiori.framework and SAPFoundation.framework to select all the five .framework files , click Open
In the pop up window, do not forget to check “Copy items if needed” and choose “Create groups” in the radio button group.
After about 10 seconds, you will find those frameworks appear in the left-top corner of your Xcode window.
Click ViewController.swift, the central area of you xcode will change to the code editor.
In the first line try to enter: import SAP
Then if some modules starts from SAP appear in the auto completion as below, your import of SAP Cloud Platform SDK for iOS was successful!
In this blog, you have acquainted with installing, creating, set up of Xcode project for Fiori for iOS development. This is a pre-request for every following blogs.
In next blog, I will guide you to learn a very useful set of fiori controls, FUIFormCell series.
Using those controls, you can build complex from for the display and input of business entity.