Skip to content

Commit b799dc3

Browse files
committed
增加MacOS支持 增加Demo-Mac
1 parent 93f1b5e commit b799dc3

21 files changed

+1520
-38
lines changed

AttributedString.podspec

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "AttributedString"
4-
s.version = "1.1.2"
4+
s.version = "1.2.0"
55
s.summary = "基于Swift字符串插值快速构建你想要的富文本"
66

77
s.homepage = "https://github.com/lixiang1994/AttributedString"
@@ -10,16 +10,21 @@ s.license = { :type => "MIT", :file => "LICENSE" }
1010

1111
s.author = { "LEE" => "18611401994@163.com" }
1212

13-
s.platform = :ios, "9.0"
14-
1513
s.source = { :git => "https://github.com/lixiang1994/AttributedString.git", :tag => s.version }
1614

17-
s.source_files = "Sources/**/*.swift"
18-
1915
s.requires_arc = true
2016

21-
s.frameworks = "UIKit", "Foundation"
22-
2317
s.swift_versions = ["5.0"]
2418

19+
s.frameworks = "Foundation"
20+
s.ios.frameworks = "UIKit"
21+
s.osx.frameworks = "AppKit"
22+
23+
s.ios.deployment_target = '9.0'
24+
s.osx.deployment_target = "10.13"
25+
26+
s.source_files = ["Sources/*.swift", "Sources/Extension/*.swift", "Sources/Extension/CoreGraphics/*.swift"]
27+
s.ios.source_files = ["Sources/Extension/UIKit/*.swift"]
28+
s.osx.source_files = ["Sources/Extension/AppKit/*.swift"]
29+
2530
end

AttributedString.xcodeproj/project.pbxproj

Lines changed: 143 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
/* Begin PBXBuildFile section */
1010
9B0A2A3823851EB6003D8A55 /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B0A2A3723851EB6003D8A55 /* Extension.swift */; };
1111
9B0A2A3A238524E1003D8A55 /* UIButtonExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B0A2A39238524E1003D8A55 /* UIButtonExtension.swift */; };
12+
9B34BD3F243DBE7500932E6C /* AttributedString.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B6E894F23823C40009EBEBE /* AttributedString.h */; settings = {ATTRIBUTES = (Public, ); }; };
13+
9B34BD40243DBEA900932E6C /* CGSizeExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E89AE238275D2009EBEBE /* CGSizeExtension.swift */; };
14+
9B34BD41243DBEA900932E6C /* CGRectExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E89B02382766F009EBEBE /* CGRectExtension.swift */; };
15+
9B34BD42243DBEA900932E6C /* CGPointExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E89B2238276B0009EBEBE /* CGPointExtension.swift */; };
16+
9B34BD43243DBEA900932E6C /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B0A2A3723851EB6003D8A55 /* Extension.swift */; };
17+
9B34BD44243DBEA900932E6C /* AttributedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E899D23823FFD009EBEBE /* AttributedString.swift */; };
18+
9B34BD45243DBEA900932E6C /* Interpolation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E89A123826D8E009EBEBE /* Interpolation.swift */; };
19+
9B34BD46243DBEA900932E6C /* Style.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E89E02382C301009EBEBE /* Style.swift */; };
20+
9B34BD47243DBEA900932E6C /* ParagraphStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E89E22382C392009EBEBE /* ParagraphStyle.swift */; };
21+
9B34BD48243DBEA900932E6C /* Attachment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E89E42382C488009EBEBE /* Attachment.swift */; };
22+
9B34BD65243DFACE00932E6C /* NSShadowExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B34BD63243DFAA600932E6C /* NSShadowExtension.swift */; };
23+
9B34BD68243DFCBB00932E6C /* NSTextFieldExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B34BD66243DFC9E00932E6C /* NSTextFieldExtension.swift */; };
1224
9B6E895123823C40009EBEBE /* AttributedString.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B6E894F23823C40009EBEBE /* AttributedString.h */; settings = {ATTRIBUTES = (Public, ); }; };
1325
9B6E899E23823FFD009EBEBE /* AttributedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E899D23823FFD009EBEBE /* AttributedString.swift */; };
1426
9B6E89A223826D8E009EBEBE /* Interpolation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E89A123826D8E009EBEBE /* Interpolation.swift */; };
@@ -27,6 +39,9 @@
2739
/* Begin PBXFileReference section */
2840
9B0A2A3723851EB6003D8A55 /* Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extension.swift; sourceTree = "<group>"; };
2941
9B0A2A39238524E1003D8A55 /* UIButtonExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIButtonExtension.swift; sourceTree = "<group>"; };
42+
9B34BD37243DBC8100932E6C /* AttributedString.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AttributedString.framework; sourceTree = BUILT_PRODUCTS_DIR; };
43+
9B34BD63243DFAA600932E6C /* NSShadowExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSShadowExtension.swift; sourceTree = "<group>"; };
44+
9B34BD66243DFC9E00932E6C /* NSTextFieldExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSTextFieldExtension.swift; sourceTree = "<group>"; };
3045
9B6E894C23823C40009EBEBE /* AttributedString.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AttributedString.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3146
9B6E894F23823C40009EBEBE /* AttributedString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AttributedString.h; sourceTree = "<group>"; };
3247
9B6E895023823C40009EBEBE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -45,6 +60,13 @@
4560
/* End PBXFileReference section */
4661

4762
/* Begin PBXFrameworksBuildPhase section */
63+
9B34BD34243DBC8100932E6C /* Frameworks */ = {
64+
isa = PBXFrameworksBuildPhase;
65+
buildActionMask = 2147483647;
66+
files = (
67+
);
68+
runOnlyForDeploymentPostprocessing = 0;
69+
};
4870
9B6E894923823C40009EBEBE /* Frameworks */ = {
4971
isa = PBXFrameworksBuildPhase;
5072
buildActionMask = 2147483647;
@@ -67,6 +89,7 @@
6789
isa = PBXGroup;
6890
children = (
6991
9B6E894C23823C40009EBEBE /* AttributedString.framework */,
92+
9B34BD37243DBC8100932E6C /* AttributedString.framework */,
7093
);
7194
name = Products;
7295
sourceTree = "<group>";
@@ -113,6 +136,8 @@
113136
9B6E89A5238273B2009EBEBE /* AppKit */ = {
114137
isa = PBXGroup;
115138
children = (
139+
9B34BD63243DFAA600932E6C /* NSShadowExtension.swift */,
140+
9B34BD66243DFC9E00932E6C /* NSTextFieldExtension.swift */,
116141
);
117142
path = AppKit;
118143
sourceTree = "<group>";
@@ -137,6 +162,14 @@
137162
/* End PBXGroup section */
138163

139164
/* Begin PBXHeadersBuildPhase section */
165+
9B34BD32243DBC8100932E6C /* Headers */ = {
166+
isa = PBXHeadersBuildPhase;
167+
buildActionMask = 2147483647;
168+
files = (
169+
9B34BD3F243DBE7500932E6C /* AttributedString.h in Headers */,
170+
);
171+
runOnlyForDeploymentPostprocessing = 0;
172+
};
140173
9B6E894723823C40009EBEBE /* Headers */ = {
141174
isa = PBXHeadersBuildPhase;
142175
buildActionMask = 2147483647;
@@ -148,6 +181,24 @@
148181
/* End PBXHeadersBuildPhase section */
149182

150183
/* Begin PBXNativeTarget section */
184+
9B34BD36243DBC8100932E6C /* AttributedString-MacOS */ = {
185+
isa = PBXNativeTarget;
186+
buildConfigurationList = 9B34BD3E243DBC8100932E6C /* Build configuration list for PBXNativeTarget "AttributedString-MacOS" */;
187+
buildPhases = (
188+
9B34BD32243DBC8100932E6C /* Headers */,
189+
9B34BD33243DBC8100932E6C /* Sources */,
190+
9B34BD34243DBC8100932E6C /* Frameworks */,
191+
9B34BD35243DBC8100932E6C /* Resources */,
192+
);
193+
buildRules = (
194+
);
195+
dependencies = (
196+
);
197+
name = "AttributedString-MacOS";
198+
productName = "AttributedString-MacOS";
199+
productReference = 9B34BD37243DBC8100932E6C /* AttributedString.framework */;
200+
productType = "com.apple.product-type.framework";
201+
};
151202
9B6E894B23823C40009EBEBE /* AttributedString */ = {
152203
isa = PBXNativeTarget;
153204
buildConfigurationList = 9B6E895423823C40009EBEBE /* Build configuration list for PBXNativeTarget "AttributedString" */;
@@ -175,6 +226,9 @@
175226
LastUpgradeCheck = 1110;
176227
ORGANIZATIONNAME = LEE;
177228
TargetAttributes = {
229+
9B34BD36243DBC8100932E6C = {
230+
CreatedOnToolsVersion = 11.4;
231+
};
178232
9B6E894B23823C40009EBEBE = {
179233
CreatedOnToolsVersion = 11.1;
180234
LastSwiftMigration = 1110;
@@ -195,11 +249,19 @@
195249
projectRoot = "";
196250
targets = (
197251
9B6E894B23823C40009EBEBE /* AttributedString */,
252+
9B34BD36243DBC8100932E6C /* AttributedString-MacOS */,
198253
);
199254
};
200255
/* End PBXProject section */
201256

202257
/* Begin PBXResourcesBuildPhase section */
258+
9B34BD35243DBC8100932E6C /* Resources */ = {
259+
isa = PBXResourcesBuildPhase;
260+
buildActionMask = 2147483647;
261+
files = (
262+
);
263+
runOnlyForDeploymentPostprocessing = 0;
264+
};
203265
9B6E894A23823C40009EBEBE /* Resources */ = {
204266
isa = PBXResourcesBuildPhase;
205267
buildActionMask = 2147483647;
@@ -210,6 +272,24 @@
210272
/* End PBXResourcesBuildPhase section */
211273

212274
/* Begin PBXSourcesBuildPhase section */
275+
9B34BD33243DBC8100932E6C /* Sources */ = {
276+
isa = PBXSourcesBuildPhase;
277+
buildActionMask = 2147483647;
278+
files = (
279+
9B34BD68243DFCBB00932E6C /* NSTextFieldExtension.swift in Sources */,
280+
9B34BD65243DFACE00932E6C /* NSShadowExtension.swift in Sources */,
281+
9B34BD40243DBEA900932E6C /* CGSizeExtension.swift in Sources */,
282+
9B34BD41243DBEA900932E6C /* CGRectExtension.swift in Sources */,
283+
9B34BD42243DBEA900932E6C /* CGPointExtension.swift in Sources */,
284+
9B34BD43243DBEA900932E6C /* Extension.swift in Sources */,
285+
9B34BD44243DBEA900932E6C /* AttributedString.swift in Sources */,
286+
9B34BD45243DBEA900932E6C /* Interpolation.swift in Sources */,
287+
9B34BD46243DBEA900932E6C /* Style.swift in Sources */,
288+
9B34BD47243DBEA900932E6C /* ParagraphStyle.swift in Sources */,
289+
9B34BD48243DBEA900932E6C /* Attachment.swift in Sources */,
290+
);
291+
runOnlyForDeploymentPostprocessing = 0;
292+
};
213293
9B6E894823823C40009EBEBE /* Sources */ = {
214294
isa = PBXSourcesBuildPhase;
215295
buildActionMask = 2147483647;
@@ -234,6 +314,58 @@
234314
/* End PBXSourcesBuildPhase section */
235315

236316
/* Begin XCBuildConfiguration section */
317+
9B34BD3C243DBC8100932E6C /* Debug */ = {
318+
isa = XCBuildConfiguration;
319+
buildSettings = {
320+
CODE_SIGN_STYLE = Automatic;
321+
COMBINE_HIDPI_IMAGES = YES;
322+
DEFINES_MODULE = YES;
323+
DEVELOPMENT_TEAM = B9D8DJR5J5;
324+
DYLIB_COMPATIBILITY_VERSION = 1;
325+
DYLIB_CURRENT_VERSION = 1;
326+
DYLIB_INSTALL_NAME_BASE = "@rpath";
327+
INFOPLIST_FILE = Sources/Info.plist;
328+
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
329+
LD_RUNPATH_SEARCH_PATHS = (
330+
"$(inherited)",
331+
"@executable_path/../Frameworks",
332+
"@loader_path/Frameworks",
333+
);
334+
MACOSX_DEPLOYMENT_TARGET = 10.15;
335+
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.macos;
336+
PRODUCT_NAME = AttributedString;
337+
SDKROOT = macosx;
338+
SKIP_INSTALL = YES;
339+
SWIFT_VERSION = 5.0;
340+
};
341+
name = Debug;
342+
};
343+
9B34BD3D243DBC8100932E6C /* Release */ = {
344+
isa = XCBuildConfiguration;
345+
buildSettings = {
346+
CODE_SIGN_STYLE = Automatic;
347+
COMBINE_HIDPI_IMAGES = YES;
348+
DEFINES_MODULE = YES;
349+
DEVELOPMENT_TEAM = B9D8DJR5J5;
350+
DYLIB_COMPATIBILITY_VERSION = 1;
351+
DYLIB_CURRENT_VERSION = 1;
352+
DYLIB_INSTALL_NAME_BASE = "@rpath";
353+
INFOPLIST_FILE = Sources/Info.plist;
354+
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
355+
LD_RUNPATH_SEARCH_PATHS = (
356+
"$(inherited)",
357+
"@executable_path/../Frameworks",
358+
"@loader_path/Frameworks",
359+
);
360+
MACOSX_DEPLOYMENT_TARGET = 10.15;
361+
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring.macos;
362+
PRODUCT_NAME = AttributedString;
363+
SDKROOT = macosx;
364+
SKIP_INSTALL = YES;
365+
SWIFT_VERSION = 5.0;
366+
};
367+
name = Release;
368+
};
237369
9B6E895223823C40009EBEBE /* Debug */ = {
238370
isa = XCBuildConfiguration;
239371
buildSettings = {
@@ -372,7 +504,7 @@
372504
"@executable_path/Frameworks",
373505
"@loader_path/Frameworks",
374506
);
375-
MARKETING_VERSION = 1.1.2;
507+
MARKETING_VERSION = 1.2.0;
376508
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring;
377509
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
378510
SKIP_INSTALL = YES;
@@ -400,7 +532,7 @@
400532
"@executable_path/Frameworks",
401533
"@loader_path/Frameworks",
402534
);
403-
MARKETING_VERSION = 1.1.2;
535+
MARKETING_VERSION = 1.2.0;
404536
PRODUCT_BUNDLE_IDENTIFIER = com.lee.attributedstring;
405537
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
406538
SKIP_INSTALL = YES;
@@ -412,6 +544,15 @@
412544
/* End XCBuildConfiguration section */
413545

414546
/* Begin XCConfigurationList section */
547+
9B34BD3E243DBC8100932E6C /* Build configuration list for PBXNativeTarget "AttributedString-MacOS" */ = {
548+
isa = XCConfigurationList;
549+
buildConfigurations = (
550+
9B34BD3C243DBC8100932E6C /* Debug */,
551+
9B34BD3D243DBC8100932E6C /* Release */,
552+
);
553+
defaultConfigurationIsVisible = 0;
554+
defaultConfigurationName = Release;
555+
};
415556
9B6E894623823C40009EBEBE /* Build configuration list for PBXProject "AttributedString" */ = {
416557
isa = XCConfigurationList;
417558
buildConfigurations = (

0 commit comments

Comments
 (0)