An SDK project to facilitate connectivity with an IBM Cloudant Database

Overview

Platform

Create an infinite scrolling iOS application in Swift, backed by a NoSQL database

In this code pattern, you will create an infinite scrolling iOS application, similar to the user experience you'd find in popular apps like Twitter or Instagram. Instead of building a paginated list of data, data will be continuously pulled from a Cloudant NoSQL database.

When you have completed this code pattern, you will understand how to:

  • Provision and integrate a Cloudant NoSQL database
  • Enable infinite scrolling in the application
  • Connect to additional IBM Cloud services

Steps

As an alternative to the steps below, you can create this project as a starter kit on IBM Cloud, which automatically provisions required services, and injects service credentials into a custom fork of this pattern. Then, you can skip directly to step 4 below.

  1. Install developer tools
  2. Install dependencies
  3. Create a Cloudant service instance
  4. Load sample data
  5. Run in Xcode

1. Install developer tools

Ensure you have the required developer tools installed from Apple:

  • iOS 9.0+
  • Xcode 9.0
  • Swift 4.0

2. Install dependencies

This pattern uses the IBM Cloud Mobile services and Cloudant SDKs in order to use the functionality of the Mobile Analytics, Push Notifications, and Cloudant services.

The IBM Cloud Mobile services SDK uses CocoaPods to manage and configure dependencies.

You can install CocoaPods using the following command:

sudo gem install cocoapods

If the CocoaPods repository is not configured, run the following command (this may take a long time depending on your network connection and installation state):

pod setup

A pre-configured Podfile has been included in this repository. To download and install the required dependencies, run the following command from your project directory:

pod install

If you run into any issues during the pod install, it is recommended to run a pod update by using the following commands:

pod update
pod install

Finally, open the Xcode workspace: {APP_Name}.xcworkspace.

3. Create a Cloudant service instance

Use the IBM Cloud Catalog to create a Cloudant service instance on the Lite plan. Make sure to select Use both legacy credentials and IAM to receive the proper credential set for the Cloudant SDK.

When the service has been created, navigate to the Service credentials tab, and create a New credential ⊕ with the default options. Click View credentials. Edit iosinfinitescrollingcloudant/BMSCredentials.plist in your Xcode project to configure your application with your Cloudant credentials.

4. Load sample data

To help demonstrate the infinite scrolling capability, we need to load a dataset large enough to require scrolling into our NoSQL database. This repository contains a file called countries.json which contains 245 documents, each with the names of a country. From the root of the repository, run:

sh setup_cloudant.sh

This script will use your credentials from iosinfinitescrollingcloudant/BMSCredentials.plist to load the data.

5. Run in Xcode

In Xcode, click Product > Run to start the iOS application. The app will default to displaying the first database and field it finds.

Cloudant App Screenshot

License

This code pattern is licensed under the Apache License, Version 2. Separate third-party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 and the Apache License, Version 2.

Apache License FAQ

You might also like...
The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips.
The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips.

Gini Bank SDK for iOS The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips. By integra

Release repo for Gini Bank SDK for iOS
Release repo for Gini Bank SDK for iOS

Gini Bank SDK for iOS The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips. By integra

Sdk for Heap challenge

Heap SDK challenge how to: Introduction I developed Heap SDK with two test applications I built as a challenge for two companies ( Fleetio & Divvy ) d

Da Xue Zhang Platform Lvb iOS SDK

Cloud_Lvb_SDK iOS API Reference Dxz Meeting iOS SDK是为 iOS 平台用户音视频服务的开源 SDK。通过大学长开放平台自研RTC,RTM系统,为客户提供质量可靠的音视频服务。 类 类名 描述 CLS_PlatformManager SDK的音视频主要

Swift SDK for Blockfrost.io API
Swift SDK for Blockfrost.io API

Swift5 API client for Blockfrost Swift 5 SDK for Blockfrost.io API. Installation • Usage • API Endpoints Installation Swift package manager dependenci

PayPal iOS SDK

PayPal iOS SDK Welcome to PayPal's iOS SDK. This library will help you accept card, PayPal, Venmo, and alternative payment methods in your iOS app. Su

Unofficial Notion API SDK for iOS & macOS
Unofficial Notion API SDK for iOS & macOS

NotionSwift Unofficial Notion SDK for iOS & macOS. This is still work in progress version, the module interface might change. API Documentation This l

150,000+ stickers API & SDK for iOS Apps.
150,000+ stickers API & SDK for iOS Apps.

English | 한국어 Stipop UI SDK for iOS Stipop SDK provides over 150,000 .png and .gif stickers that can be easily integrated into mobile app chats, comme

WalletConnect Swift SDK v2

Wallet Connect v.2 - Swift Swift implementation of WalletConnect v.2 protocol for native iOS applications. Requirements iOS 13 XCode 13 Swift 5 Usage

Owner
Floren Cabrera F.: de Teresa
A true Big Blue fan from way back my VM370 Mainframe days.
Floren Cabrera F.:  de Teresa
Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter 45 Nov 29, 2022
This is swift project example to connect VNPTSmartCA SDK using Swift Language.

Example source code to integrate with VNPTSmartCA iOS SDK To run the example project, clone repository, and run pod install Requirements Installation

null 1 Feb 14, 2022
Sample project with local swift package linked NDI SDK.

NDISwiftPackage Sample project with local swift package linked NDI SDK. Preparation Install NDA SDK on your mac. Software Developer Kit Make package c

Naruki Chigira 4 Dec 20, 2022
Stacksift App SDK

Stacksift SDK Capture and submit crashes to Stacksift. This library ties together Wells and Impact to provide a full crash capturing and submission sy

Stacksift 44 Aug 18, 2022
TelegramStickersImport — Telegram stickers importing SDK for iOS

TelegramStickersImport — Telegram stickers importing SDK for iOS TelegramStickersImport helps your users import third-party programaticaly created sti

null 35 Oct 26, 2022
RadioTimeKit - The Swift SDK for TuneIn RadioTimeKit is a Swift package to use the TuneIn API.

RadioTimeKit - The Swift SDK for TuneIn RadioTimeKit is a Swift package to use the TuneIn API. The goal for development was to have a Swift SDK to get

Frank Gregor 2 Jun 20, 2022
Official Appwrite SDK for Apple Devices 🍎

Appwrite Apple SDK This SDK is compatible with Appwrite server version 0.11.x. For older versions, please check previous releases. Appwrite is an open

Appwrite 55 Jan 2, 2023
Official Appwrite Swift SDK 🦅🍎

Appwrite Swift SDK This SDK is compatible with Appwrite server version 0.11.x. For older versions, please check previous releases. This is the Swift S

Appwrite 27 Dec 25, 2022
Muxer used on top of Feed iOS SDK for airplay

FeedAirplayMuxer Muxer used on top of Feed iOS SDK for airplay purposes. Demo Project --> https://github.com/feedfm/AirplayDemo Feed Airplay Muxer is

Feed Media 0 May 6, 2022
Basispay IOS SDK Version 2

BasisPay-IOS-KIT BasisPay IOS Payment Gateway kit for developers INTRODUCTION This document describes the steps for integrating Basispay online paymen

null 0 Oct 21, 2021