Skip to content

Commit

Permalink
Merge pull request #13 from littleossa/develop
Browse files Browse the repository at this point in the history
Support SF Symbols 3.3
  • Loading branch information
littleossa committed Apr 25, 2022
2 parents 5de9865 + a49cb94 commit 9d003e1
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is **USER-FRIENDLY** SF Symbols.
You can use SF Symbols image without coding system names and if you select unavailable system image, you know it with the alert from Xcode.

## ♥️ Support SF Symbols version
Supported SF Symbols 3.2 now.
Supported SF Symbols 3.3 now.

## ⬇️ Installation
### Swift Package Manager(Recommended)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ extension SFSymbols {
if #available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) {
humanSymbols += SFSymbols.availableHumanSymbolsFromSFSymbols3
}
if #available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *) {
humanSymbols += SFSymbols.availableHumanSymbolsFromSFSymbols3_3
}

return humanSymbols
}
Expand All @@ -47,4 +50,9 @@ extension SFSymbols {
private static var availableHumanSymbolsFromSFSymbols3: [SFSymbols] {
[.personBadgeClock, .personBadgeClockFill, .shareplay, .shareplaySlash, .rectangleInsetFilledAndPersonFilled, .personWave2, .personWave2Fill, .person2Wave2, .person2Wave2Fill, .person3Sequence, .person3SequenceFill, .personCropCircleBadgeQuestionmarkFill, .personCropCircleBadgeExclamationmarkFill, .personCropCircleBadgeMoon, .personCropCircleBadgeMoonFill, .personCropCircleBadgeClock, .personCropCircleBadgeClockFill, .personCropCircleBadge, .personCropCircleBadgeFill, .personCropArtframe, .personCropRectangleStack, .personCropRectangleStackFill, .person2CropSquareStack, .person2CropSquareStackFill, .personCropSquareFilledAndAtRectangle, .personCropSquareFilledAndAtRectangleFill, .personTextRectangle, .personTextRectangleFill, .eyeSquare, .eyeSquareFill, .eyeSlashCircle, .eyeSlashCircleFill, .eyeTrianglebadgeExclamationmark, .eyeTrianglebadgeExclamationmarkFill, .tshirt, .tshirtFill, .brainHeadProfile, .brain, .rectangleStackBadgePersonCropFill, .figureRoll, .earAndWaveform, .hearingdeviceEar, .handRaisedCircle, .handRaisedCircleFill, .handRaisedSquare, .handRaisedSquareFill, .handThumbsupCircle, .handThumbsupCircleFill, .handThumbsdownCircle, .handThumbsdownCircleFill, .rectangleAndHandPointUpLeft, .rectangleAndHandPointUpLeftFill, .rectangleFilledAndHandPointUpLeft, .rectangleAndHandPointUpLeftFilled]
}

@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
private static var availableHumanSymbolsFromSFSymbols3_3: [SFSymbols] {
[.personBadgeKey, .personBadgeKeyFill]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ extension SFSymbols {
if #available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) {
objectAndToolsSymbols += SFSymbols.availableObjectAndToolsSymbolsFromSFSymbols3
}
if #available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *) {
objectAndToolsSymbols += SFSymbols.availableObjectAndToolsSymbolsFromSFSymbols3_3
}

return objectAndToolsSymbols
}
Expand Down Expand Up @@ -55,4 +58,9 @@ extension SFSymbols {
private static var availableObjectAndToolsSymbolsFromSFSymbols3: [SFSymbols] {
[.lassoAndSparkles, .trashSquare, .trashSquareFill, .trashSlashCircle, .trashSlashCircleFill, .trashSlashSquare, .trashSlashSquareFill, .folderBadgeGearshape, .folderFillBadgeGearshape, .plusRectangleOnFolderFill, .booksVerticalCircle, .booksVerticalCircleFill, .bookClosedCircle, .bookClosedCircleFill, .menucard, .menucardFill, .magazine, .magazineFill, .newspaperCircle, .newspaperCircleFill, .bookmarkSquare, .bookmarkSquareFill, .graduationcapCircle, .graduationcapCircleFill, .personalhotspotCircle, .personalhotspotCircleFill, .speakerCircle, .speakerCircleFill, .speakerBadgeExclamationmark, .speakerBadgeExclamationmarkFill, .musicMicCircle, .musicMicCircleFill, .sparkleMagnifyingglass, .locationMagnifyingglass, .flagSquare, .flagSquareFill, .flag2Crossed, .flag2CrossedFill, .flagFilledAndFlagCrossed, .flagAndFlagFilledCrossed, .sensorTagRadiowavesForward, .sensorTagRadiowavesForwardFill, .bellSquare, .bellSquareFill, .bellAndWaveform, .bellAndWaveformFill, .bellBadgeCircle, .bellBadgeCircleFill, .tagSquare, .tagSquareFill, .boltShield, .boltShieldFill, .facemask, .facemaskFill, .cameraShutterButton, .cameraShutterButtonFill, .scissorsCircle, .scissorsCircleFill, .dice, .diceFill, .hammerCircle, .hammerCircleFill, .screwdriver, .screwdriverFill, .stethoscopeCircle, .stethoscopeCircleFill, .printerFilledAndPaper, .printerDotmatrixFilledAndPaper, .briefcaseCircle, .briefcaseCircleFill, .suitcase, .suitcaseFill, .suitcaseCart, .suitcaseCartFill, .theatermasks, .theatermasksFill, .theatermasksCircle, .theatermasksCircleFill, .puzzlepieceExtension, .puzzlepieceExtensionFill, .pinSquare, .pinSquareFill, .mappinSquare, .mappinSquareFill, .mapCircle, .mapCircleFill, .powerplug, .powerplugFill, .cpuFill, .memorychipFill, .beatsHeadphones, .antennaRadiowavesLeftAndRightSlash, .antennaRadiowavesLeftAndRightCircle, .antennaRadiowavesLeftAndRightCircleFill, .fuelpump, .fuelpumpFill, .fuelpumpCircle, .fuelpumpCircleFill, .fanblades, .fanbladesFill, .bedDoubleCircle, .bedDoubleCircleFill, .testtube2, .ivfluidBag, .ivfluidBagFill, .crossVial, .crossVialFill, .filmCircle, .filmCircleFill, .shieldLefthalfFilled, .shieldRighthalfFilled, .shieldLefthalfFilledSlash, .checkerboardShield, .shippingboxCircle, .shippingboxCircleFill, .clockCircle, .clockCircleFill, .clockBadgeCheckmark, .clockBadgeCheckmarkFill, .clockBadgeExclamationmark, .clockBadgeExclamationmarkFill, .chartXyaxisLine, .cupAndSaucer, .cupAndSaucerFill, .takeoutbagAndCupAndStraw, .takeoutbagAndCupAndStrawFill, .forkKnife, .forkKnifeCircle, .forkKnifeCircleFill, .hourglassCircle, .hourglassCircleFill, .hourglassBottomhalfFilled, .hourglassTophalfFilled, .battery75, .battery50, .boltBatteryblock, .boltBatteryblockFill, .lightbulbCircle, .lightbulbCircleFill]
}

@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
private static var availableObjectAndToolsSymbolsFromSFSymbols3_3: [SFSymbols] {
[.keyViewfinder]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ extension SFSymbols: CaseIterable {
if #available(iOS 15.2, macOS 12.1, macCatalyst 15.2, tvOS 15.2, watchOS 8.3, *) {
allCases += SFSymbols.availableCasesFromSFSymbols3_2
}
if #available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *) {
allCases += SFSymbols.availableCasesFromSFSymbols3_3
}

return allCases
}
Expand Down Expand Up @@ -80,4 +83,9 @@ extension SFSymbols: CaseIterable {
[.rectangleLeadinghalfFilled, .rectangleTrailinghalfFilled, .airpodsGen3, .airpodGen3Right, .airpodGen3Left, .airpodsGen3ChargingcaseWireless, .airpodsGen3ChargingcaseWirelessFill, .beatsFitPro, .beatsFitProLeft, .beatsFitProRight, .beatsFitProChargingcase, .beatsFitProChargingcaseFill, .square3Layers3DDownRightSlash, .square3Layers3DDownLeftSlash, .square3Stack3DSlash]
}

/// A collection of available values added from SF Symbols 3.3
@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
private static var availableCasesFromSFSymbols3_3: [SFSymbols] {
[.personBadgeKey, .personBadgeKeyFill, .dotsAndLineVerticalAndCursorarrowRectangle, .cameraMacro, .cameraMacroCircle, .cameraMacroCircleFill, .keyViewfinder]
}
}
16 changes: 16 additions & 0 deletions Sources/SFUserFriendlySymbols/SFSymbols/SFSymbols.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6654,4 +6654,20 @@ public enum SFSymbols: String {
@available(iOS 15.2, macOS 12.1, macCatalyst 15.2, tvOS 15.2, watchOS 8.3, *)
case square3Stack3DSlash = "square.3.stack.3d.slash"

// MARK: - @available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)

@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
case personBadgeKey = "person.badge.key"
@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
case personBadgeKeyFill = "person.badge.key.fill"
@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
case dotsAndLineVerticalAndCursorarrowRectangle = "dots.and.line.vertical.and.cursorarrow.rectangle"
@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
case cameraMacro = "camera.macro"
@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
case cameraMacroCircle = "camera.macro.circle"
@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
case cameraMacroCircleFill = "camera.macro.circle.fill"
@available(iOS 15.4, macOS 12.3, macCatalyst 15.4, tvOS 15.4, watchOS 8.5, *)
case keyViewfinder = "key.viewfinder"
}

0 comments on commit 9d003e1

Please sign in to comment.