Skip to content

Commit

Permalink
fix package.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
lexrus committed Sep 20, 2020
1 parent 3de24d5 commit e971d1a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D73DFD001F4DB5CC00F84122"
BuildableName = "LTMorphingLabel.framework"
BuildableName = "MorphingLabel.framework"
BlueprintName = "LTMorphingLabel_tvOS"
ReferencedContainer = "container:LTMorphingLabelDemo.xcodeproj">
</BuildableReference>
Expand Down Expand Up @@ -44,7 +44,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D73DFD001F4DB5CC00F84122"
BuildableName = "LTMorphingLabel.framework"
BuildableName = "MorphingLabel.framework"
BlueprintName = "LTMorphingLabel_tvOS"
ReferencedContainer = "container:LTMorphingLabelDemo.xcodeproj">
</BuildableReference>
Expand All @@ -60,7 +60,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D73DFD001F4DB5CC00F84122"
BuildableName = "LTMorphingLabel.framework"
BuildableName = "MorphingLabel.framework"
BlueprintName = "LTMorphingLabel_tvOS"
ReferencedContainer = "container:LTMorphingLabelDemo.xcodeproj">
</BuildableReference>
Expand Down
21 changes: 12 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@
import PackageDescription

let package = Package(
name: "LTMorphingLabel",
name: "MorphingLabel",
products: [
.library(name: "LTMorphingLabel", targets: ["LTMorphingLabel"]),
.library(name: "LTMorphingLabelXCFramework", targets: ["LTMorphingLabelXCFramework"])
.library(name: "MorphingLabel", targets: ["MorphingLabel"]),
.library(name: "MorphingLabel.xcframework", targets: ["MorphingLabel.xcframework"])
],
targets: [
.target(
name: "LTMorphingLabel",
name: "MorphingLabel",
path: "LTMorphingLabel",
exclude: ["LTMorphingLabel/SwiftUI/MorphingText.swift"]
exclude: ["SwiftUI/MorphingText.swift"],
resources: [
.process("Particles/*.png")
]
),
.target(
name: "LTMorphingLabelXCFramework",
url: "https://github.com/lexrus/LTMorphingLabel/releases/download/0.9.1/LTMorphingLabel.framework.zip",
checksum: "c40d71025beb8be5855cf78c0a4ab8d16762d183adce2b5196cff3d3a3c65c2e"
.binaryTarget(
name: "MorphingLabel.xcframework",
url: "https://github.com/lexrus/LTMorphingLabel/releases/download/0.9.1/MorphingLabel.xcframework.zip",
checksum: "04cdc84ff3245c4c5fe3c6abf2b3ad9ec27e5b3a992650716b924c819620c472"
)
]
)
16 changes: 8 additions & 8 deletions build_xcframework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PROJECT_FILE="LTMorphingLabelDemo.xcodeproj"
SCHEME="LTMorphingLabel"
BUILD_FOLDER="Build/LTMorphingLabel"
BUILD_FOLDER="Build/MorphingLabel"

mkdir -p Build

Expand Down Expand Up @@ -32,19 +32,19 @@ xcodebuild archive -project "$PROJECT_FILE" -scheme "$SCHEME" -configuration Rel

# XCFramework
xcodebuild -create-xcframework \
-framework Build/LTMorphingLabel/iOS.xcarchive/Products/Library/Frameworks/MorphingLabel.framework \
-framework Build/LTMorphingLabel/tvOS.xcarchive/Products/Library/Frameworks/MorphingLabel.framework \
-framework Build/LTMorphingLabel/Simulator.xcarchive/Products/Library/Frameworks/MorphingLabel.framework \
-framework Build/LTMorphingLabel/tvOSSimulator.xcarchive/Products/Library/Frameworks/MorphingLabel.framework \
-output Build/LTMorphinLabel.xcframework
-framework "$BUILD_FOLDER/iOS.xcarchive/Products/Library/Frameworks/MorphingLabel.framework" \
-framework "$BUILD_FOLDER/tvOS.xcarchive/Products/Library/Frameworks/MorphingLabel.framework" \
-framework "$BUILD_FOLDER/Simulator.xcarchive/Products/Library/Frameworks/MorphingLabel.framework" \
-framework "$BUILD_FOLDER/tvOSSimulator.xcarchive/Products/Library/Frameworks/MorphingLabel.framework" \
-output Build/MorphingLabel.xcframework

cd Build

# Compress
zip -vry LTMorphingLabel.xcframework.zip LTMorphinLabel.xcframework/ -x "*.DS_Store"
zip -vry MorphingLabel.xcframework.zip MorphingLabel.xcframework/ -x "*.DS_Store"

# Checksum for Package.swift
swift package compute-checksum LTMorphingLabel.xcframework.zip | pbcopy
swift package compute-checksum MorphingLabel.xcframework.zip | pbcopy

# Open in Finder
open ./

0 comments on commit e971d1a

Please sign in to comment.