featured-image-ios

Add and Delete Data for iOS Mobile App using Mesosfer – Part 7

In this tutorial, we will learn how to Add and Delete Data for iOS Mobile App using Mesosfer Backend as a Service. Download all code :

ios-objective-cios-swift

1. Introduction

This is the seventh session of tutorial series. You can read the previous session here. In this section, we’ll create an iOS app that Query User Data based on  Mesosfer Documentation.

2. Prerequisites

To follow the step in this tutorial, you should set up some prerequisites below:

  • Sign up for an account in Mesosfer Backend as a Service.
  • Install the latest Xcode. In this tutorial, the author used Xcode 8.1 (8B62).
  • You can download the code from previous session here.

3. Getting Started

3.1. Designing views

  • Add an UIBarButtonItem with Style -> Bordered and System Item -> Add
  • For adding new data, create a form data view on your Main.storyboard. Connect the add button item and form data view with Triggered Segues -> Selection -> Show like below :

Query user view contains :

  • UIBarButtonItem, used for triggering form add data.
  • UITableViewController, used for displaying data list.
  • UINavigationItem, used for displaying title of current view.

3.2. Referencing the outlets

Add FormDataViewController class to your Xcode project, then add referencing outlet for each object library :

Objective-C

Swift

3.3. Completing the codes

3.3.1. FormDataViewController complete code :

Objective-C

  • .h file

  • .m file

Swift

4. Conclusion

We’ve already created add and delete data module in iOS mobile app. It’s an easy way for developers. So enjoy creating your Mobile application using Mesosfer Backend as a Service. Mesosfer helps you connect your project to the cloud. Cut off the development process so you can straight into the delivery process instead stumble on the complicated infrastructure.

Lead Mobile Software Engineer. Having more than 8 years in IT Consultant. Love working with new mobile platform technology. Expert in Android and iOS Mobile Development.