Migration guide
This page lists the key points to pay attention to when migrating existing code from MyScript iink SDK 4.4 to the new MyScript iink SDK 4.5.
Handwriting generation changes
You can now generate multiple Latin languages text with a single resource mul_Latn-hw-gen.res, that supports handwriting generation for texts in English, French, Italian, German, Spanish, Dutch, and Portuguese. It replaces and improves the performance and accuracy of the en-hw-gen.res resource, and is the new default resource for the HandwritingGenerator
It comes with predefined profiles. Please note that these profiles are different from the ones in previous English resources.
If you have been using the handwriting generation feature, here is how to upgrade:
- Replace the en-hw-gen.res resource with the mul_Latn-hw-gen.res from the myscript-iink-handwriting-generation.zip package.
- If you were using the default resource, you don't need to update your configuration because the default resource is now mul_Latn-hw-gen.res. If the configuration of your application was set to en-hw-gen.res, use mul_Latn-hw-gen.res instead, or remove the configuration change to use the default value.
- ⚠️ User profiles generated with the en-hw-gen.res resource are not compatible with the new mul_Latn-hw-gen.res one. Therefore, if you have any, you need to regenerate your user profiles with the new resource.
Recognizer changes
We have introduced a new applyConfiguration API that updates the configuration of a Recognizer.
Consequently, we updated the clear API so that it only clears the stroke input and recognition result; it no longer reconfigures.
➤ If you were using the clear API before, call clear, then applyConfiguration if you want to keep the previous behavior.
Selection improvements
Editor.getAvailableSelectionModes() now accepts a selection parameter and Editor.setSelection() now takes a selection mode parameter.
➤ These changes allow you to retrieve available modes for any selection and set a selection with a mode in a single API call rather than calling two APIs, which helps avoid blinking issues when selecting with a non-default mode.
Conversion on double tap activated in the Demo .json configuration profiles
We have activated the convert.convert-on-double-tap in the text_math_shape.json and in the multiple_languages.json configuration files of our 4.5 Demo:
➤ If you have been using one of our .json and don't want to change your application behavior, keep your previous version.
Migrating to Swift Package Manager dependency
The iink iOS examples now use the Swift Package Manager instead of CocoaPods to handle iink binary files.
To upgrade to iink 4.5, you must add iink SPM package dependency to your App Xcode project:
- If you were using Cocoapods, remove everything related to CocoaPods from your target’s General pane in the “Frameworks, Libraries, and Embedded Content” section: Pods.xcodeproj, the Pods directory, and the libPodsxxx.a library.
- Add iink SPM package dependency to your App Xcode project:
- Open the “Package Dependency“ dialog and enter the URL of the public GitHub repository "https://github.com/MyScript/interactive-ink-packages-ios" in the bottom right search field.
- You can specify the version by setting the “Dependency Rule“. The list of releases is available here.
- Then click on “Add Package“ button.
New export.jiix.math.operators property
This new property activates the export of detailed information about the operators of the Math block in JIIX files:
- When
export.jiix.math.operatorsconfiguration isfalse,=node bounding box in the jiix corresponds to the box of the last=sign, while for other Nodes like+, it is the box of the entire content of the node. - When
export.jiix.math.operatorsconfiguration istrue, the bounding box of a node always includes the entire content of the node (i.e. not just the=sign, also the operands). If an equation has multiple operators, the JIIX contains anoperatorsnode array with all the operators associated with a given node, e.g. all the =/+/… signs associated with a given node.
➤ The property is disabled by default to ensure backward compatibility. To access detailed information for operators, make sure you enable it.
Old .iink files (iink SDK 1.3 or earlier) are no longer compatible
MyScript iink SDK 4.5 cannot open a ContentPackage that was generated with iink SDK 1.3 or earlier.
However, if a ContentPackage was created with iink SDK 1.3 (or earlier) and then opened and saved with a later version, iink SDK 4.5 will still be able to open it.
MyScriptPrediction library removal
The MyScriptPrediction library is no longer shipped since 4.0.0 because it is no longer used. However, as of 4.1.0, this library is no longer compatible with other libraries, so if is still in your environment, you may encounter errors when loading the iink libraries and your application may crash at runtime. To avoid problems when upgrading to 4.5, search for any file named MyScriptPrediction. in your application environment and delete it.