Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ fastlane/test_output
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

# SPM
Package.resolved
.build/
40 changes: 40 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// swift-tools-version:5.7
import PackageDescription

let package = Package(
name: "YYText",
platforms: [
.iOS(.v12)
],
products: [
.library(
name: "YYText",
targets: ["YYText"]
)
],
targets: [
.target(
name: "YYText",
path: "YYText",
sources: [
"YYLabel.m",
"YYTextView.m",
"Component",
"String",
"Utility"
],
publicHeadersPath: "include",
cSettings: [
.define("YYTEXT_ENABLE_SHORTHAND", to: "1")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Enabling YYTEXT_ENABLE_SHORTHAND by default changes the library's behavior compared to the CocoaPods installation. This macro enables shorthand property names which might conflict with other code in a user's project. It is generally better to keep the default behavior consistent with other package managers by not defining this macro here.

],
linkerSettings: [
.linkedFramework("UIKit"),
.linkedFramework("CoreFoundation"),
.linkedFramework("CoreText"),
.linkedFramework("QuartzCore"),
.linkedFramework("Accelerate"),
.linkedFramework("MobileCoreServices")
]
)
]
)
Loading