Interactive Ink SDK makes it easy to get started. This page helps you set up a development environment, get a certificate and play with provided example applications.
To develop with iink SDK for iOS, you need:
- Xcode 9.x or later
- iOS SDK
- CocoaPods 1.5 or later (to retrieve iink SDK and its dependencies)
- Git (to clone the GitHub example repository)
MyScript iink SDK comes with example applications illustrating how to use key APIs.
The code is available on GitHub.
A reference implementation for the platform-specific integration layer can be found alongside the examples. It covers aspects such as rendering that the low-level iink SDK does not provide out-of-the-box for flexibility and portability reasons.
The source code of both the examples and the reference implementation is released under the Apache 2.0 license. You can reuse it into your own projects without any particular restriction.
A certificate is a binary “key” provided by MyScript that is required to enable iink SDK in an application:
- If you have just registered with MyScript Developer Portal, you should have received a certificate by mail that will let you run the provided get started example.
- If not - or to activate iink SDK with your own applications - please follow the on-device license management instructions.
The certificate comes embedded in a source file that you should include in your project:
- MyScript-provided examples expect it to be located at a specific location (see instructions below).
- For your own application, you can place it where you want, provided that it is accessible to instantiate the iink runtime.
More details on certificates and license management can be found in the dedicated support section.
The Get started example is the easiest way for a first contact with iink SDK APIs.
To run it, just follow the following instructions:
Step 1: Clone the MyScript Git repository containing the examples for the iOS platform and navigate to the root of the folder containing the applications:
git clone https://github.com/MyScript/interactive-ink-examples-ios.git cd interactive-ink-examples-ios
Step 2: Navigate to the root folder of the example application you want to run:
cd Examples/GetStartedfor a simple example written in Objective-C,
cd Examples/GetStartedSwiftfor a simple example written in Swift
This command will use CocoaPods to fetch the iink SDK libraries.
Step 3: Replace
MyCertificate.c file in the
MyScriptCertificate directory with your certificate.
Step 4: Open the Xcode workspace, compile and run the default target.
To guide you through the fundamentals of Interactive Ink SDK, let’s imagine that you want to build a (very) simple handwriting calculator. This guide explains some key concepts and provides you with the code portions that are relevant for a simple iink SDK integration.
For the sake of this example, such an application would provide the end user with:
- a writing area to write computations,
- buttons to undo, redo, and clear the canvas,
- a validation button to convert content to typeset form and do the calculation,
- a history of the past calculations,
- persistence across sessions,
- some custom styling over what iink SDK provides by default.
The guide consists of the following steps:
- Interactive Ink runtime
- Import and export
- Zooming and scrolling
- Error management
Ready? Let’s start!