Replace SwiftLint autocorrect command with
--fix
Problems
Running
make correct
fails in the latest SwiftLintv0.53.0
since SwiftLintautocorrect
is no longer available as of 0.43.0Solution
Replace
swiftlint autocorrect
withswiftlint --fix
Testing
Tested both
make all
andmake fix
works fineGitHub Pull Request: #31 https://github.com/twitter/TwitterTextEditor/pull/31
JIRA Issues: IOS-127396
Differential Revision: https://phabricator.twitter.biz/D1058137
Twitter Text Editor
A standalone, flexible API that provides a full featured rich text editor for iOS applications.
It supports safe text modification, attribute annotations such as syntax highlighting, pasting or drag and drop handling.
This provides a robust text attribute update logic, extended text editing events, and safe text input event handling in easy delegate based APIs. TwitterTextEditor supports recent versions of iOS.
Requirements
Twitter Text Editor requires macOS Catalina 10.15 or later and Xcode 11.0 and later for the development. At this moment, Twitter Text Editor supports iOS 11.0 and later also macCatalyst 13.0 and later.
Usage
Using Twitter Text Editor is straightforward if you’re familiar with iOS development. See also Examples for actual usage, that contains Swift and Objective-C source code to show how to use Twitter Text Editor. See
Examples/README.md
as well.Add Twitter Text Editor framework to your project
Add the following lines to your
Package.swift
or use Xcode “Add Package Dependency…” menu.Use with other dependency management tools
In case your project is not using Swift Package Manager, you can use Twitter Text Editor with other dependency management tools.
CocoaPods
To use Twitter Text Editor with CocoaPods, add next
TwitterTextEditor.podspec
in your project.Then, update
Podfile
in your project.Carthage
To use Twitter Text Editor with Carthage, update
Cartfile
in your project.Then, run following commands. This will create
Carthage/Build/iOS/TwitterTextEditor.framework
.Follow the instructions to add the framework and Run Script phase to your project.
Documentation
See documentation.
Use Twitter Text Editor in your project
Twitter Text Editor provides a single view,
TextEditorView
, that has a similar API toUITextView
and provides the most of features as a property or a delegate callback.Add it to your project as like the other views, and setup using each property or implement delegate callbacks.
Contributing
See CONTRIBUTING.md for the details.
Security issues
Please report sensitive security issues via Twitter’s bug-bounty program rather than GitHub.