diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 481bf17..ade39a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,37 +5,37 @@ on: branches: - master paths: - - "Source/**" - ".github/workflows/**" - "Package.swift" + - "Source/**" pull_request: paths: - - "Source/**" - ".github/workflows/**" - "Package.swift" + - "Source/**" concurrency: - group: ci + group: ${{ github.ref_name }} cancel-in-progress: true jobs: Latest: name: Test Latest (iOS, macOS, tvOS, watchOS) runs-on: macOS-12 env: - DEVELOPER_DIR: "/Applications/Xcode_13.4.1.app/Contents/Developer" + DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer" timeout-minutes: 10 strategy: fail-fast: false matrix: include: - name: "iOS" - destination: "OS=15.5,name=iPhone 13 Pro" + destination: "OS=16.1,name=iPhone 14 Pro" - name: "macOS" destination: "platform=macOS" - name: "tvOS" - destination: "OS=15.4,name=Apple TV" + destination: "OS=16.1,name=Apple TV" - name: "watchOS" - destination: "OS=8.5,name=Apple Watch Series 7 - 41mm" + destination: "OS=9.1,name=Apple Watch Series 8 (45mm)" steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} - Debug @@ -50,7 +50,7 @@ jobs: name: Test Catalyst runs-on: macOS-12 env: - DEVELOPER_DIR: "/Applications/Xcode_13.4.app/Contents/Developer" + DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer" timeout-minutes: 10 steps: - uses: actions/checkout@v3 @@ -64,15 +64,21 @@ jobs: env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit iOS" -destination "platform=macOS" -configuration Release clean build | xcpretty iOS: name: Test iOS - runs-on: macOS-11 + runs-on: ${{ matrix.runsOn }} env: - DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer" + DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer" timeout-minutes: 20 strategy: fail-fast: false matrix: include: - - name: "iOS 14.5" + - runsOn: macOS-12 + xcode: "Xcode_13.4.1.app" + name: "iOS 15.5" + destination: "OS=15.5,name=iPhone 13 Pro" + - runsOn: macOS-11 + xcode: "Xcode_12.5.1.app" + name: "iOS 14.5" destination: "OS=14.5,name=iPhone 12 Pro" steps: - uses: actions/checkout@v3 @@ -104,12 +110,18 @@ jobs: fail-fast: false matrix: include: + - runsOn: macOS-12 + xcode: "Xcode_14.1.app" + name: "macOS 12, Xcode 14.1, Swift 5.7.1" + - runsOn: macOS-12 + xcode: "Xcode_14.0.1.app" + name: "macOS 12, Xcode 14.0.1, Swift 5.7.0" - runsOn: macOS-12 xcode: "Xcode_13.4.1.app" name: "macOS 12, Xcode 13.4.1, Swift 5.6.1" - runsOn: macOS-12 xcode: "Xcode_13.3.1.app" - name: "macOS 12, Xcode 13.3.1, Swift 5.6" + name: "macOS 12, Xcode 13.3.1, Swift 5.6.0" - runsOn: macOS-11 xcode: "Xcode_13.2.1.app" name: "macOS 11, Xcode 13.2.1, Swift 5.5.2" @@ -121,10 +133,19 @@ jobs: name: "macOS 11, Xcode 13.0, Swift 5.5.0" - runsOn: macOS-11 xcode: "Xcode_12.5.1.app" - name: "macOS 11, Xcode 12.5.1, Swift 5.4" + name: "macOS 11, Xcode 12.5.1, Swift 5.4.2" - runsOn: macOS-10.15 xcode: "Xcode_12.4.app" - name: "macOS 10.15, Xcode 12.4, Swift 5.3" + name: "macOS 10.15, Xcode 12.4, Swift 5.3.2" + - runsOn: macOS-10.15 + xcode: "Xcode_12.3.app" + name: "macOS 10.15, Xcode 12.3, Swift 5.3.2" + - runsOn: macOS-10.15 + xcode: "Xcode_12.2.app" + name: "macOS 10.15, Xcode 12.2, Swift 5.3.1" + - runsOn: macOS-10.15 + xcode: "Xcode_12.1.1.app" + name: "macOS 10.15, Xcode 12.1.1, Swift 5.3.0" steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} - Debug @@ -137,15 +158,21 @@ jobs: env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit macOS" -destination "platform=macOS" -configuration Release clean build | xcpretty tvOS: name: Test tvOS - runs-on: macOS-11 + runs-on: ${{ matrix.runsOn }} env: - DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer" + DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer" timeout-minutes: 10 strategy: fail-fast: false matrix: include: - - name: "tvOS 14.5" + - runsOn: macOS-12 + xcode: "Xcode_13.4.1.app" + name: "tvOS 15.4" + destination: "OS=15.4,name=Apple TV" + - runsOn: macOS-11 + xcode: "Xcode_12.5.1.app" + name: "tvOS 14.5" destination: "OS=14.5,name=Apple TV" steps: - uses: actions/checkout@v3 @@ -159,15 +186,21 @@ jobs: env NSUnbufferedIO=YES xcodebuild -project "CDMarkdownKit.xcodeproj" -scheme "CDMarkdownKit tvOS" -destination "${{ matrix.destination }}" -configuration Release clean build | xcpretty watchOS: name: Test watchOS - runs-on: macOS-11 + runs-on: ${{ matrix.runsOn }} env: - DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer" + DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer" timeout-minutes: 10 strategy: fail-fast: false matrix: include: - - name: "watchOS 7.4" + - runsOn: macOS-12 + xcode: "Xcode_13.4.1.app" + name: "watchOS 8.5" + destination: "OS=8.5,name=Apple Watch Series 7 - 41mm" + - runsOn: macOS-11 + xcode: "Xcode_12.5.1.app" + name: "watchOS 7.4" destination: "OS=7.4,name=Apple Watch Series 6 - 44mm" steps: @@ -190,12 +223,18 @@ jobs: fail-fast: false matrix: include: - - xcode: "Xcode_13.4.app" + - xcode: "Xcode_14.1.app" + runsOn: macOS-12 + name: "macOS 12, SPM 5.7.1 Build" + - xcode: "Xcode_14.0.1.app" + runsOn: macOS-12 + name: "macOS 12, SPM 5.7.0 Build" + - xcode: "Xcode_13.4.1.app" runsOn: macOS-12 name: "macOS 12, SPM 5.6.1 Build" - xcode: "Xcode_13.3.1.app" runsOn: macOS-12 - name: "macOS 12, SPM 5.6 Build" + name: "macOS 12, SPM 5.6.0 Build" - xcode: "Xcode_13.2.1.app" runsOn: macOS-11 name: "macOS 11, SPM 5.5.2 Build" @@ -207,10 +246,19 @@ jobs: name: "macOS 11, SPM 5.5 Test" - xcode: "Xcode_12.5.1.app" runsOn: macOS-11 - name: "macOS 11, SPM 5.4 Build" + name: "macOS 11, SPM 5.4.2 Build" - xcode: "Xcode_12.4.app" runsOn: macOS-10.15 - name: "macOS 10.15, SPM 5.3 Build" + name: "macOS 10.15, SPM 5.3.2 Build" + - xcode: "Xcode_12.3.app" + runsOn: macOS-10.15 + name: "macOS 10.15, SPM 5.3.2 Build" + - xcode: "Xcode_12.2.app" + runsOn: macOS-10.15 + name: "macOS 10.15, SPM 5.3.1 Build" + - xcode: "Xcode_12.1.app" + runsOn: macOS-10.15 + name: "macOS 10.15, SPM 5.3.0 Build" steps: - uses: actions/checkout@v3 - name: ${{ matrix.name }} diff --git a/CDMarkdownKit.podspec b/CDMarkdownKit.podspec index 22e40e4..2ed85fb 100644 --- a/CDMarkdownKit.podspec +++ b/CDMarkdownKit.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |s| s.name = 'CDMarkdownKit' - s.version = '2.5.0' + s.version = '2.5.1' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'An extensive Swift framework providing simple and customizable markdown parsing.' s.description = <<-DESC - This Swift framework handles standard markdown parsing along with the ability to parse custom elements. - DESC + This Swift framework handles standard markdown parsing along with the ability to parse custom elements. + DESC s.homepage = 'https://github.com/chrisdhaan/CDMarkdownKit' s.author = { 'Christopher de Haan' => 'contact@christopherdehaan.me' } s.source = { :git => 'https://github.com/chrisdhaan/CDMarkdownKit.git', :tag => s.version.to_s } @@ -15,7 +15,13 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '10.0' s.watchos.deployment_target = '3.0' - s.swift_versions = ['5.3', '5.4', '5.5'] + s.swift_versions = ['5'] s.source_files = 'Source/*.swift' + + s.framework = 'Foundation' + s.ios.framework = 'UIKit' + s.osx.framework = 'Cocoa' + s.tvos.framework = 'UIKit' + s.watchos.framework = 'UIKit' end diff --git a/CDMarkdownKit.xcodeproj/project.pbxproj b/CDMarkdownKit.xcodeproj/project.pbxproj index 6de03f4..a3ef282 100644 --- a/CDMarkdownKit.xcodeproj/project.pbxproj +++ b/CDMarkdownKit.xcodeproj/project.pbxproj @@ -392,37 +392,6 @@ }; /* End PBXGroup section */ -/* Begin PBXHeadersBuildPhase section */ - B2ACA0741FBF93ED00EABEF6 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B2ACA0811FBF940700EABEF6 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B2ACA08E1FBF941B00EABEF6 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B2B365B41F3245800078B962 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - /* Begin PBXNativeTarget section */ B2ACA0761FBF93ED00EABEF6 /* CDMarkdownKit macOS */ = { isa = PBXNativeTarget; @@ -430,7 +399,6 @@ buildPhases = ( B2ACA0721FBF93ED00EABEF6 /* Sources */, B2ACA0731FBF93ED00EABEF6 /* Frameworks */, - B2ACA0741FBF93ED00EABEF6 /* Headers */, B2ACA0751FBF93ED00EABEF6 /* Resources */, B2CC862C20D4553C00170627 /* Swift Lint */, ); @@ -449,7 +417,6 @@ buildPhases = ( B2ACA07F1FBF940700EABEF6 /* Sources */, B2ACA0801FBF940700EABEF6 /* Frameworks */, - B2ACA0811FBF940700EABEF6 /* Headers */, B2ACA0821FBF940700EABEF6 /* Resources */, B2CC862D20D4554B00170627 /* Swift Lint */, ); @@ -468,7 +435,6 @@ buildPhases = ( B2ACA08C1FBF941B00EABEF6 /* Sources */, B2ACA08D1FBF941B00EABEF6 /* Frameworks */, - B2ACA08E1FBF941B00EABEF6 /* Headers */, B2ACA08F1FBF941B00EABEF6 /* Resources */, B2CC862E20D4555900170627 /* Swift Lint */, ); @@ -487,7 +453,6 @@ buildPhases = ( B2B365B21F3245800078B962 /* Sources */, B2B365B31F3245800078B962 /* Frameworks */, - B2B365B41F3245800078B962 /* Headers */, B2B365B51F3245800078B962 /* Resources */, B2CC862B20D4552C00170627 /* Swift Lint */, ); @@ -506,7 +471,7 @@ B2B365AE1F3245800078B962 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1340; + LastUpgradeCheck = 1410; ORGANIZATIONNAME = "Christopher de Haan"; TargetAttributes = { B2ACA0761FBF93ED00EABEF6 = { @@ -829,6 +794,7 @@ B2ACA07D1FBF93ED00EABEF6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + DEAD_CODE_STRIPPING = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -847,6 +813,7 @@ B2ACA07E1FBF93ED00EABEF6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + DEAD_CODE_STRIPPING = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -966,6 +933,7 @@ CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -987,7 +955,7 @@ INFOPLIST_FILE = Source/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.christopherdehaan.CDMarkdownKit; PRODUCT_NAME = CDMarkdownKit; @@ -1035,6 +1003,7 @@ CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -1050,7 +1019,7 @@ INFOPLIST_FILE = Source/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 2.5.0; + MARKETING_VERSION = 2.5.1; PRODUCT_BUNDLE_IDENTIFIER = com.christopherdehaan.CDMarkdownKit; PRODUCT_NAME = CDMarkdownKit; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/CDMarkdownKit.xcodeproj/xcshareddata/xcschemes/CDMarkdownKit iOS.xcscheme b/CDMarkdownKit.xcodeproj/xcshareddata/xcschemes/CDMarkdownKit iOS.xcscheme index 751fee2..0d4f174 100644 --- a/CDMarkdownKit.xcodeproj/xcshareddata/xcschemes/CDMarkdownKit iOS.xcscheme +++ b/CDMarkdownKit.xcodeproj/xcshareddata/xcschemes/CDMarkdownKit iOS.xcscheme @@ -1,6 +1,6 @@ +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// + +import PackageDescription + +let package = Package(name: "CDMarkdownKit", + platforms: [.macOS(.v10_12), + .iOS(.v10), + .tvOS(.v10), + .watchOS(.v3)], + products: [.library(name: "CDMarkdownKit", + targets: ["CDMarkdownKit"])], + targets: [.target(name: "CDMarkdownKit", + path: "Source", + exclude: ["Info.plist"], + linkerSettings: [.linkedFramework("Foundation", + .when(platforms: [.macOS, + .iOS, + .tvOS, + .watchOS])), + .linkedFramework("Cocoa", + .when(platforms: [.macOS])), + .linkedFramework("UIKit", + .when(platforms: [.iOS, + .tvOS, + .watchOS]))])], + swiftLanguageVersions: [.v5]) + diff --git a/README.md b/README.md index f776e39..1b4de7b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ GitHub Release - Swift Versions + Swift Versions Platforms @@ -99,7 +99,7 @@ For a demonstration of the capabilities of CDMarkdownKit; run the iOS Example pr [CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate CDMarkdownKit into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby -pod 'CDMarkdownKit', '2.5.0' +pod 'CDMarkdownKit', '2.5.1' ``` ### Carthage @@ -107,7 +107,7 @@ pod 'CDMarkdownKit', '2.5.0' [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate CDMarkdownKit into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "chrisdhaan/CDMarkdownKit" == 2.5.0 +github "chrisdhaan/CDMarkdownKit" == 2.5.1 ``` ### Swift Package Manager @@ -118,7 +118,7 @@ Once you have your Swift package set up, adding CDMarkdownKit as a dependency is ```swift dependencies: [ - .package(url: "https://github.com/chrisdhaan/CDMarkdownKit.git", .upToNextMajor(from: "2.5.0")) + .package(url: "https://github.com/chrisdhaan/CDMarkdownKit.git", .upToNextMajor(from: "2.5.1")) ] ``` @@ -396,10 +396,13 @@ CDMarkdownKit was influenced by [MarkdownKit](https://github.com/ivanbruel/Markd CDMarkdownKit adds the following functionalities: - Fixed header element parsing - Image element parsing +- Strikethrough element parsing - Ability to customize font for all elements - Ability to customize color for all elements - Ability to customize background color for all elements - Ability to customize paragraph style for all elements +- Ability to customize underline color style for all elements +- Ability to customize underline style style for all elements - UITextView with the ability to round background text color corners for code, syntax, or all elements - UILabel with the ability to round background text color corners for code, syntax, or all elements - macOS, tvOS, and watchOS support diff --git a/Source/CDImage+CDMarkdownKit.swift b/Source/CDImage+CDMarkdownKit.swift index 4c02c8d..ffa70be 100644 --- a/Source/CDImage+CDMarkdownKit.swift +++ b/Source/CDImage+CDMarkdownKit.swift @@ -26,9 +26,9 @@ // #if os(iOS) || os(tvOS) || os(watchOS) -import UIKit + import UIKit #elseif os(macOS) -import Cocoa + import Cocoa #endif #if os(macOS) diff --git a/Source/CDMarkdownKit.swift b/Source/CDMarkdownKit.swift index 0a18542..9c9b39f 100644 --- a/Source/CDMarkdownKit.swift +++ b/Source/CDMarkdownKit.swift @@ -33,4 +33,4 @@ import Foundation #endif /// Current CDMarkdownKit version. Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate. -let version = "2.5.0" +let version = "2.5.1" diff --git a/Source/Dictionary+CDMarkdownKit.swift b/Source/Dictionary+CDMarkdownKit.swift index eac975d..77d3c04 100644 --- a/Source/Dictionary+CDMarkdownKit.swift +++ b/Source/Dictionary+CDMarkdownKit.swift @@ -26,9 +26,9 @@ // #if os(iOS) || os(tvOS) || os(watchOS) -import UIKit + import UIKit #elseif os(macOS) -import Cocoa + import Cocoa #endif internal extension Dictionary where Key == CDAttributedStringKey { diff --git a/Source/NSAttributedString+CDMarkdownKit.swift b/Source/NSAttributedString+CDMarkdownKit.swift index 85be37b..cc1bb91 100644 --- a/Source/NSAttributedString+CDMarkdownKit.swift +++ b/Source/NSAttributedString+CDMarkdownKit.swift @@ -26,9 +26,9 @@ // #if os(iOS) || os(tvOS) || os(watchOS) -import UIKit + import UIKit #elseif os(macOS) -import Cocoa + import Cocoa #endif internal extension NSAttributedString { diff --git a/Source/NSMutableAttributedString+CDMarkdownKit.swift b/Source/NSMutableAttributedString+CDMarkdownKit.swift index c076316..0f29e2a 100644 --- a/Source/NSMutableAttributedString+CDMarkdownKit.swift +++ b/Source/NSMutableAttributedString+CDMarkdownKit.swift @@ -26,9 +26,9 @@ // #if os(iOS) || os(tvOS) || os(watchOS) -import UIKit + import UIKit #elseif os(macOS) -import Cocoa + import Cocoa #endif internal extension NSMutableAttributedString { diff --git a/Source/NSTextCheckingResult+CDMarkdownKit.swift b/Source/NSTextCheckingResult+CDMarkdownKit.swift index 18dac79..3946f1f 100644 --- a/Source/NSTextCheckingResult+CDMarkdownKit.swift +++ b/Source/NSTextCheckingResult+CDMarkdownKit.swift @@ -26,9 +26,9 @@ // #if os(iOS) || os(tvOS) || os(watchOS) -import UIKit + import UIKit #elseif os(macOS) -import Cocoa + import Cocoa #endif internal extension NSTextCheckingResult { diff --git a/Source/NSTextStorage+CDMarkdownKit.swift b/Source/NSTextStorage+CDMarkdownKit.swift index ee344cd..8d75633 100644 --- a/Source/NSTextStorage+CDMarkdownKit.swift +++ b/Source/NSTextStorage+CDMarkdownKit.swift @@ -26,9 +26,9 @@ // #if os(iOS) || os(tvOS) || os(watchOS) -import UIKit + import UIKit #elseif os(macOS) -import Cocoa + import Cocoa #endif #if os(iOS) || os(tvOS) diff --git a/Source/String+CDMarkdownKit.swift b/Source/String+CDMarkdownKit.swift index f1a2210..555079f 100644 --- a/Source/String+CDMarkdownKit.swift +++ b/Source/String+CDMarkdownKit.swift @@ -26,10 +26,11 @@ // import Foundation + #if os(iOS) || os(tvOS) || os(watchOS) -import UIKit + import UIKit #elseif os(macOS) -import Cocoa + import Cocoa #endif internal extension String {