|
1 | 1 | <img width=443 src="Resources/readme-images/BonMot-logo.png" alt="BonMot Logo" /> |
2 | 2 |
|
3 | | -[](https://swift.org) |
| 3 | +[](https://swift.org) |
4 | 4 | [](https://circleci.com/gh/Rightpoint/BonMot) |
5 | 5 | [](http://cocoapods.org/pods/BonMot) |
6 | 6 | [](http://cocoapods.org/pods/BonMot) |
7 | 7 | [](http://cocoapods.org/pods/BonMot) |
8 | | -[](https://github.com/Carthage/Carthage) |
| 8 | +[](https://github.com/Carthage/Carthage) [](https://swift.org/package-manager/) |
9 | 9 | [](https://codecov.io/gh/Rightpoint/BonMot) |
10 | 10 |
|
11 | 11 | BonMot (pronounced *Bon Mo*, French for *good word*) is a Swift attributed string library. It abstracts away the complexities of the iOS, macOS, tvOS, and watchOS typography tools, freeing you to focus on making your text beautiful. |
12 | 12 |
|
13 | 13 | To run the example project, run `pod try BonMot`, or clone the repo, open `BonMot.xcodeproj`, and run the **Example-iOS** target. |
14 | 14 |
|
15 | | -### Note |
16 | | -If you are migrating a project from BonMot 3 to BonMot 4, please see the [Migration Guide](#bonmot-3--4-migration-guide). |
| 15 | +### AttributedString |
| 16 | + |
| 17 | +BonMot has been [sherlocked](https://en.wikipedia.org/wiki/Sherlock_(software)#Sherlocked_as_a_term)! If you're targeting iOS 15 or higher, you may want to check out [AttributedString](https://developer.apple.com/documentation/foundation/attributedstring) instead. If you're an existing user of BonMot using Xcode 13, you may want to add the following `typealias` somewhere in your project to avoid a conflict with `Foundation.StringStyle`: |
| 18 | + |
| 19 | +```swift |
| 20 | +typealias StringStyle = BonMot.StringStyle |
| 21 | +``` |
| 22 | + |
| 23 | +There is also currently a [known issue](https://github.com/Rightpoint/BonMot/issues/415) in Xcode 13 Beta 2 that will cause crashes when deploying to older OS versions. |
17 | 24 |
|
18 | 25 | # Usage |
19 | 26 |
|
@@ -346,6 +353,15 @@ let attrString = "some string".styled(with: Constants.myStyle) |
346 | 353 |
|
347 | 354 | # Installation |
348 | 355 |
|
| 356 | +## Swift Package Manager |
| 357 | + |
| 358 | +BonMot is available through [Swift Package Manager](https://swift.org/package-manager/). To install |
| 359 | +it through Xcode, go to `File -> Swift Packages -> Add Package Dependency...` and paste the repository URL: |
| 360 | + |
| 361 | +``` |
| 362 | +https://github.com/Rightpoint/BonMot.git |
| 363 | +``` |
| 364 | + |
349 | 365 | ## CocoaPods |
350 | 366 |
|
351 | 367 | BonMot is available through [CocoaPods](http://cocoapods.org). To install |
|
0 commit comments