Skip to content

TheraForge's iOS Offline-first Cloud Datastore Library.

License

Notifications You must be signed in to change notification settings

TheraForge/OTFCDTDatastore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTFCDTDatastore

OTFCDTDatastore provides Cloudant Sync to store, index and query local JSON data on a device and to synchronise data between many devices. For more details about the OTFCDTDatastore please refer to the CDTDatastore docs.

Please refer to the top-level parent framework: OTFToolBox

Change Log

Release 1.0.4-beta
  • Added watchOS target
  • Removed GoogleToolboxForMac from OTFCDTDatastore
  • Added FMDB as project source
Release 1.0.3-beta
  • Added watchOS support

Table of contents

Overview

The Theraforge OTFCDTDatastore provides File protection for your application along with the basic cloudant OTFCDTDatastore functionalities. The different types of file protection levels that you can apply on your files before starting and after finishing operations on the files.

Installation

Prerequisites

An Intel-based Mac running macOS Catalina 10.15.4 or later.

Install the following components:

  • Xcode 12 or later (SDK 14)

  • CocoaPods 1.10.0 or later

For your projects make sure to target iOS 13 or later

Project Setup

If you don't have Xcode, then follow this Xcode article to install and configure Xcode.

After successfully installing Xcode and creating a new project, you can build your first digital health application.

The next step is to integrate OTFCDTDatastore with your application. OTFCDTDatastore can be installed via CocoaPods.

If you are new to CocoaPods you can refer to the CocoaPods Guides to learn more about it.

CocoaPods is built with the Ruby language and can be installed with the default version of Ruby available with macOS.

Integrating OTFCDTDatastore with an existing workspace requires the below extra line in your Podfile.

Add pod 'OTFCDTDatastore' under target in Podfile.

pod 'OTFCDTDatastore'

Run pod install from the terminal root of your project directory, which will fetch all the external dependencies mentioned by you, and associate it with a .xcworkspace file of your project. This .xcworkspace file will be generated for you if you already do not have one.

$ pod install

Once you successfully install podspec, you can start importing OTFCDTDatastore.

File Protection Levels

There are different types of File protections available in iOS categorised by the key NSFileProtectionType. Using these file protections types in CDTDatastore framework Theraforge provides three types of Protection modes on the files that will help to set encryption with different behaviours. Setting any mode will ensure the file protection that you want to apply on your files before starting and after finishing any operation on the files.

  • mode1 - In this mode application is guaranteed to complete synchronization within 10 seconds. After 10 seconds application will not be able to access the files in the background.

  • mode2 - In this mode application needs 20 seconds time for the synchronization. After 20 seconds application will not be able to access the files in the background.

  • background - In this mode application need to periodically run in the background. It will give 30 seconds time frame to finish any operation in the background. After 30 seconds application will not be able to access the files.

Usage

To access OTF protection levels in your existing application install Theraforge CDTDatastore and then use below functions with the help of CDTDatastore object.

/// Call encryption function with the help of datastore object in OBJECTIVE C
# -(void)setProtectionLevel: (OTFProtectionLevel)level;'

/// Replace mode1 with any other available mode.
# [datastore setProtectionLevel: mode1];
/// Call encryption function with the help of datastore object in SWIFT -
# dataStore.setProtectionLevel(.level)

License

This project is made available under the terms of an APACHE license. See the LICENSE file.

About

TheraForge's iOS Offline-first Cloud Datastore Library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 99.2%
  • Other 0.8%