Source Code Structure
We will now start exploring the source codes of Hello Kii in depth.
The following figure illustrates the source code structure. The Swift and Objective-C versions basically share the same structure. The file extension for Swift is .swift and that for Objective-C is .h according to the language specifications.
This file defines the
mainfunction of the mobile app. This file is required for Objective-C only. You do not need to modify or make reference to this file in this tutorial.
This is a class to process events for the entire mobile app. Initialization of the Kii Cloud SDK has been added to the code generated by Xcode.
This is an implementation of the login screen. It inherits the
UIViewControllerclass. It is configured to be displayed in the storyboard at startup.
This is an implementation of the data listing screen. It inherits the
This is a class to add a function to display messages to the
UIViewControllerclass by the Extensions feature of Swift and the Categories feature of Objective-C. This enables to display messages that include error details by calling the
showMessage(_:error:)method from the
LoginViewControllerclass and the
MainViewControllerclass. See below for examples of the caller.
We will explain how to initialize the Kii Cloud SDK in the