From a590690a72d9a7adde9c2f12aaa974f65a8961a8 Mon Sep 17 00:00:00 2001 From: Jan Halousek Date: Tue, 10 Dec 2019 13:44:42 +0100 Subject: [PATCH] Add SPM support --- .../project.pbxproj | 52 ++++++++++++++----- Package.swift | 21 ++++++++ .../TTTAttributedLabel.h | 0 .../TTTAttributedLabel.m | 0 4 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 Package.swift rename {TTTAttributedLabel => Sources}/TTTAttributedLabel.h (100%) rename {TTTAttributedLabel => Sources}/TTTAttributedLabel.m (100%) diff --git a/Carthage/TTTAttributedLabel.xcodeproj/project.pbxproj b/Carthage/TTTAttributedLabel.xcodeproj/project.pbxproj index bc1242a5..244e2b9e 100644 --- a/Carthage/TTTAttributedLabel.xcodeproj/project.pbxproj +++ b/Carthage/TTTAttributedLabel.xcodeproj/project.pbxproj @@ -7,18 +7,16 @@ objects = { /* Begin PBXBuildFile section */ - 65C249A21BDFF9A60014AB94 /* TTTAttributedLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = A52E64F01B14C1E9002709D4 /* TTTAttributedLabel.m */; }; - 65C249A51BDFF9A60014AB94 /* TTTAttributedLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = A52E64EF1B14C1E9002709D4 /* TTTAttributedLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A52E64F11B14C1E9002709D4 /* TTTAttributedLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = A52E64EF1B14C1E9002709D4 /* TTTAttributedLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A52E64F21B14C1E9002709D4 /* TTTAttributedLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = A52E64F01B14C1E9002709D4 /* TTTAttributedLabel.m */; }; + 31BEC0EB239FCA3C00F92484 /* TTTAttributedLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 31BEC0E9239FCA3C00F92484 /* TTTAttributedLabel.m */; }; + 31BEC0EC239FCA3C00F92484 /* TTTAttributedLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 31BEC0EA239FCA3C00F92484 /* TTTAttributedLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 31BEC0E9239FCA3C00F92484 /* TTTAttributedLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTAttributedLabel.m; path = ../../Sources/TTTAttributedLabel.m; sourceTree = ""; }; + 31BEC0EA239FCA3C00F92484 /* TTTAttributedLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTAttributedLabel.h; path = ../../Sources/TTTAttributedLabel.h; sourceTree = ""; }; 65C249AA1BDFF9A60014AB94 /* TTTAttributedLabel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TTTAttributedLabel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A52E64271B14C0BF002709D4 /* TTTAttributedLabel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TTTAttributedLabel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A52E642B1B14C0BF002709D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A52E64EF1B14C1E9002709D4 /* TTTAttributedLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TTTAttributedLabel.h; path = ../../TTTAttributedLabel/TTTAttributedLabel.h; sourceTree = ""; }; - A52E64F01B14C1E9002709D4 /* TTTAttributedLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TTTAttributedLabel.m; path = ../../TTTAttributedLabel/TTTAttributedLabel.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -59,8 +57,8 @@ A52E64291B14C0BF002709D4 /* TTTAttributedLabel */ = { isa = PBXGroup; children = ( - A52E64EF1B14C1E9002709D4 /* TTTAttributedLabel.h */, - A52E64F01B14C1E9002709D4 /* TTTAttributedLabel.m */, + 31BEC0EA239FCA3C00F92484 /* TTTAttributedLabel.h */, + 31BEC0E9239FCA3C00F92484 /* TTTAttributedLabel.m */, A52E642A1B14C0BF002709D4 /* Supporting Files */, ); path = TTTAttributedLabel; @@ -81,7 +79,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 65C249A51BDFF9A60014AB94 /* TTTAttributedLabel.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -89,7 +86,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A52E64F11B14C1E9002709D4 /* TTTAttributedLabel.h in Headers */, + 31BEC0EC239FCA3C00F92484 /* TTTAttributedLabel.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -138,7 +135,7 @@ A52E641E1B14C0BF002709D4 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0630; + LastUpgradeCheck = 1110; TargetAttributes = { A52E64261B14C0BF002709D4 = { CreatedOnToolsVersion = 6.3.2; @@ -147,10 +144,11 @@ }; buildConfigurationList = A52E64211B14C0BF002709D4 /* Build configuration list for PBXProject "TTTAttributedLabel" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = A52E641D1B14C0BF002709D4; productRefGroup = A52E64281B14C0BF002709D4 /* Products */; @@ -185,7 +183,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 65C249A21BDFF9A60014AB94 /* TTTAttributedLabel.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -193,7 +190,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A52E64F21B14C1E9002709D4 /* TTTAttributedLabel.m in Sources */, + 31BEC0EB239FCA3C00F92484 /* TTTAttributedLabel.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -211,6 +208,7 @@ INFOPLIST_FILE = TTTAttributedLabel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.mattt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = TTTAttributedLabel; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -229,6 +227,7 @@ INFOPLIST_FILE = TTTAttributedLabel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.mattt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = TTTAttributedLabel; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -241,17 +240,28 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BITCODE_GENERATION_MODE = bitcode; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -259,6 +269,7 @@ CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -290,17 +301,28 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; BITCODE_GENERATION_MODE = bitcode; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -339,6 +361,7 @@ INFOPLIST_FILE = TTTAttributedLabel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.mattt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; @@ -355,6 +378,7 @@ INFOPLIST_FILE = TTTAttributedLabel/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.mattt.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; diff --git a/Package.swift b/Package.swift new file mode 100644 index 00000000..0f28e74b --- /dev/null +++ b/Package.swift @@ -0,0 +1,21 @@ +// swift-tools-version:5.1 + +import PackageDescription + +let package = Package( + name: "TTTAttributedLabel", + products: [ + .library( + name: "TTTAttributedLabel", + targets: ["TTTAttributedLabel"] + ) + ], + targets: [ + .target( + name: "TTTAttributedLabel", + path: ".", + sources: ["Sources"], + publicHeadersPath: "Sources" + ), + ] +) diff --git a/TTTAttributedLabel/TTTAttributedLabel.h b/Sources/TTTAttributedLabel.h similarity index 100% rename from TTTAttributedLabel/TTTAttributedLabel.h rename to Sources/TTTAttributedLabel.h diff --git a/TTTAttributedLabel/TTTAttributedLabel.m b/Sources/TTTAttributedLabel.m similarity index 100% rename from TTTAttributedLabel/TTTAttributedLabel.m rename to Sources/TTTAttributedLabel.m