Twitter today announced a new “standalone, flexible” open source API for iOS developers that provides a text editor for apps, used as the basis for tweet and Fleet composer in the Twitter app for iOS.
Announcement today, official Twitter blog. The company says it knows how complicated it can be to implement a simple text editor in iOS apps during the development process, so Twitter now offers its own Text Editor API for everyone to use.
According to Twitter, the new Text Editor API solves common problems with syntax highlighting and text content filtering. The company claims that Apple offers multiple text editing APIs for developers, but these can be too limited or too complex to understand – something the new Twitter API is aiming to solve.
High-level APIs don’t always offer enough power or control to create a truly great in-app experience. Meanwhile, it requires a lot of knowledge about how text editing works in a variety of languages, including lower-level APIs, bidirectional scripting support, alternative input methods (such as those used for East Asian languages), and assistive technology such as braille keyboards.
Developers will find support for recent versions of iOS with robust text attribute update logic, additional text editing activities, secure event handling for text input, and Twitter’s Text Editor API. It is implemented as a Swift Pack that can be easily added to an Xcode project, as well as working with CocoaPods.
The Twitter Text Editor encapsulates UITextView and provides familiar delegate-based APIs such as many common UIKit APIs. Extends the LayoutManager and TextStorage to provide custom text attributes, including custom emoji serving attributes. Twitter Script Editor has event planners for handling events and provides a consistent delegate callback order to your code.
The new open source Twitter Text Editor API is available for free at: GitHub. It works with iOS 11 or higher and requires Xcode 11 or higher for development.
FTC: We use income generating automated affiliate links. More.