From 36b2f5c24f3a71ca8a7413cc49ebfa8d8ed538c4 Mon Sep 17 00:00:00 2001 From: Marc Desharnais Date: Mon, 26 Sep 2016 13:33:12 -0400 Subject: [PATCH 1/6] Added NS_ASSUME_NONNULL --- Classes/Category/NSString+HWToast.h | 4 ++++ Classes/Category/NSTimer+HWToast.h | 4 ++++ Classes/Category/UIView+HWToast.h | 4 ++++ Classes/HWToast.h | 3 +++ Classes/HWToastMaker.h | 5 ++++- Classes/HWToastView/HWLoadingToastView.h | 3 +++ Classes/HWToastView/HWPieChartToastView.h | 4 ++++ Classes/HWToastView/HWTextToastView.h | 4 ++++ Classes/HWToastView/HWToastView.h | 4 ++++ Classes/Tool/HWToastTool+Permanent.h | 4 ++++ Classes/Tool/HWToastTool.h | 4 ++++ Classes/View/HWActivityIndicatorView.h | 4 ++++ Classes/View/HWPieChartProgressView.h | 4 ++++ 13 files changed, 50 insertions(+), 1 deletion(-) diff --git a/Classes/Category/NSString+HWToast.h b/Classes/Category/NSString+HWToast.h index d1bfd24..bbda4d8 100644 --- a/Classes/Category/NSString+HWToast.h +++ b/Classes/Category/NSString+HWToast.h @@ -8,9 +8,13 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface NSString (HWToast) - (CGSize)hw_sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)constrainedSize; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/Category/NSTimer+HWToast.h b/Classes/Category/NSTimer+HWToast.h index 92e8bcf..1f3c40a 100644 --- a/Classes/Category/NSTimer+HWToast.h +++ b/Classes/Category/NSTimer+HWToast.h @@ -8,8 +8,12 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface NSTimer (HWToast) + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)inTimeInterval block:(void (^)())inBlock repeats:(BOOL)inRepeats; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/Category/UIView+HWToast.h b/Classes/Category/UIView+HWToast.h index b4f19c1..801b597 100644 --- a/Classes/Category/UIView+HWToast.h +++ b/Classes/Category/UIView+HWToast.h @@ -8,6 +8,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface UIView (HWToast) @property CGFloat x; @@ -25,3 +27,5 @@ @property CGFloat height; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/HWToast.h b/Classes/HWToast.h index 2fc257d..17ad9ab 100644 --- a/Classes/HWToast.h +++ b/Classes/HWToast.h @@ -10,6 +10,7 @@ #import "HWToastMaker.h" #import "HWToastView.h" +NS_ASSUME_NONNULL_BEGIN @interface HWToast : NSObject @@ -32,3 +33,5 @@ @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/HWToastMaker.h b/Classes/HWToastMaker.h index ec45c01..e7c0396 100644 --- a/Classes/HWToastMaker.h +++ b/Classes/HWToastMaker.h @@ -9,6 +9,8 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + @class HWToastView; typedef void(^HWToastTapBlock)(HWToastView *toastView); @@ -21,7 +23,6 @@ typedef NS_ENUM(NSUInteger, HWToastPosition) { HWToastPositionRight }; - @interface HWToastMaker : NSObject /** @@ -65,3 +66,5 @@ typedef NS_ENUM(NSUInteger, HWToastPosition) { @property (nonatomic, assign) HWToastPosition position; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/HWToastView/HWLoadingToastView.h b/Classes/HWToastView/HWLoadingToastView.h index 377baad..bbc4933 100644 --- a/Classes/HWToastView/HWLoadingToastView.h +++ b/Classes/HWToastView/HWLoadingToastView.h @@ -8,6 +8,7 @@ #import "HWToastView.h" +NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, HWToastLoadingStyle) { HWToastLoadingStyle1, @@ -32,3 +33,5 @@ typedef NS_ENUM(NSUInteger, HWToastLoadingStyle) { -(instancetype)initWithLoadingText:(NSString*)string andStyle:(HWToastLoadingStyle)style; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/HWToastView/HWPieChartToastView.h b/Classes/HWToastView/HWPieChartToastView.h index 1bda9a4..133560b 100644 --- a/Classes/HWToastView/HWPieChartToastView.h +++ b/Classes/HWToastView/HWPieChartToastView.h @@ -8,8 +8,12 @@ #import "HWToastView.h" +NS_ASSUME_NONNULL_BEGIN + @interface HWPieChartToastView : HWToastView @property (nonatomic, assign) float progress; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/HWToastView/HWTextToastView.h b/Classes/HWToastView/HWTextToastView.h index d2622ba..7ae279b 100644 --- a/Classes/HWToastView/HWTextToastView.h +++ b/Classes/HWToastView/HWTextToastView.h @@ -8,8 +8,12 @@ #import "HWToastView.h" +NS_ASSUME_NONNULL_BEGIN + @interface HWTextToastView : HWToastView -(instancetype)initWithText:(NSString*)string; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/HWToastView/HWToastView.h b/Classes/HWToastView/HWToastView.h index 20e7f40..ee0eea4 100644 --- a/Classes/HWToastView/HWToastView.h +++ b/Classes/HWToastView/HWToastView.h @@ -8,6 +8,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface HWToastView : UIView /** @@ -40,3 +42,5 @@ @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/Tool/HWToastTool+Permanent.h b/Classes/Tool/HWToastTool+Permanent.h index 59ee998..7816052 100644 --- a/Classes/Tool/HWToastTool+Permanent.h +++ b/Classes/Tool/HWToastTool+Permanent.h @@ -8,6 +8,8 @@ #import "HWToastTool.h" +NS_ASSUME_NONNULL_BEGIN + @interface HWToastTool (Permanent) +(void)showPermanentToastWithText:(NSString*)text inView:(UIView*)baseView; @@ -15,3 +17,5 @@ +(void)dismissAllToast; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/Tool/HWToastTool.h b/Classes/Tool/HWToastTool.h index dade7f8..41f3c6a 100644 --- a/Classes/Tool/HWToastTool.h +++ b/Classes/Tool/HWToastTool.h @@ -8,6 +8,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + FOUNDATION_EXPORT const NSTimeInterval HWToastDefaultDuration; @interface HWToastTool : NSObject @@ -15,3 +17,5 @@ FOUNDATION_EXPORT const NSTimeInterval HWToastDefaultDuration; +(void)showToastWithText:(NSString*)text; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/View/HWActivityIndicatorView.h b/Classes/View/HWActivityIndicatorView.h index fcbf5eb..ad71d93 100644 --- a/Classes/View/HWActivityIndicatorView.h +++ b/Classes/View/HWActivityIndicatorView.h @@ -8,6 +8,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface HWActivityIndicatorView : UIView @property (nonatomic) UIActivityIndicatorViewStyle activityIndicatorViewStyle; @@ -15,3 +17,5 @@ - (void)startAnimating; @end + +NS_ASSUME_NONNULL_END diff --git a/Classes/View/HWPieChartProgressView.h b/Classes/View/HWPieChartProgressView.h index 790dc2b..a5f5968 100644 --- a/Classes/View/HWPieChartProgressView.h +++ b/Classes/View/HWPieChartProgressView.h @@ -8,8 +8,12 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface HWPieChartProgressView : UIView @property (nonatomic, assign) float progress; @end + +NS_ASSUME_NONNULL_END From d44adc2d82846f9cebf552805ef56bb27fe16b1b Mon Sep 17 00:00:00 2001 From: Stephane Thorez Date: Tue, 18 Feb 2025 10:57:25 -0500 Subject: [PATCH 2/6] [IOSINFO-11551] Add support for SPM --- .gitignore | 11 ++- CHANGELOG.md | 7 ++ Demo/HWToast.xcodeproj/project.pbxproj | 71 ++++++++++------- .../contents.xcworkspacedata | 7 ++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ Demo/HWToast/Base.lproj/Main.storyboard | 75 +++++++++--------- HWToast.podspec | 8 +- Package.swift | 27 +++++++ .../Category/NSString+HWToast.m | 0 .../Category/NSTimer+HWToast.m | 0 .../Category/UIView+HWToast.m | 0 {Classes => Sources}/HWToast.m | 0 .../HWToastImage.bundle/toast_loading.png | Bin {Classes => Sources}/HWToastMaker.m | 0 .../HWToastView/HWLoadingToastView.m | 0 .../HWToastView/HWPieChartToastView.m | 0 .../HWToastView/HWTextToastView.m | 0 .../HWToastView/HWToastView.m | 0 .../Tool/HWToastTool+Permanent.m | 0 {Classes => Sources}/Tool/HWToastTool.m | 0 .../View/HWActivityIndicatorView.m | 0 .../View/HWPieChartProgressView.m | 0 .../include}/HWActivityIndicatorView.h | 0 .../include}/HWLoadingToastView.h | 0 .../include}/HWPieChartProgressView.h | 0 .../include}/HWPieChartToastView.h | 0 .../include}/HWTextToastView.h | 0 {Classes => Sources/include}/HWToast.h | 0 {Classes => Sources/include}/HWToastMaker.h | 0 .../include}/HWToastTool+Permanent.h | 0 .../Tool => Sources/include}/HWToastTool.h | 0 .../include}/HWToastView.h | 0 .../include}/NSString+HWToast.h | 0 .../include}/NSTimer+HWToast.h | 0 .../include}/UIView+HWToast.h | 0 35 files changed, 142 insertions(+), 72 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 Demo/HWToast.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Demo/HWToast.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Package.swift rename {Classes => Sources}/Category/NSString+HWToast.m (100%) rename {Classes => Sources}/Category/NSTimer+HWToast.m (100%) rename {Classes => Sources}/Category/UIView+HWToast.m (100%) rename {Classes => Sources}/HWToast.m (100%) rename {Classes => Sources}/HWToastImage.bundle/toast_loading.png (100%) rename {Classes => Sources}/HWToastMaker.m (100%) rename {Classes => Sources}/HWToastView/HWLoadingToastView.m (100%) rename {Classes => Sources}/HWToastView/HWPieChartToastView.m (100%) rename {Classes => Sources}/HWToastView/HWTextToastView.m (100%) rename {Classes => Sources}/HWToastView/HWToastView.m (100%) rename {Classes => Sources}/Tool/HWToastTool+Permanent.m (100%) rename {Classes => Sources}/Tool/HWToastTool.m (100%) rename {Classes => Sources}/View/HWActivityIndicatorView.m (100%) rename {Classes => Sources}/View/HWPieChartProgressView.m (100%) rename {Classes/View => Sources/include}/HWActivityIndicatorView.h (100%) rename {Classes/HWToastView => Sources/include}/HWLoadingToastView.h (100%) rename {Classes/View => Sources/include}/HWPieChartProgressView.h (100%) rename {Classes/HWToastView => Sources/include}/HWPieChartToastView.h (100%) rename {Classes/HWToastView => Sources/include}/HWTextToastView.h (100%) rename {Classes => Sources/include}/HWToast.h (100%) rename {Classes => Sources/include}/HWToastMaker.h (100%) rename {Classes/Tool => Sources/include}/HWToastTool+Permanent.h (100%) rename {Classes/Tool => Sources/include}/HWToastTool.h (100%) rename {Classes/HWToastView => Sources/include}/HWToastView.h (100%) rename {Classes/Category => Sources/include}/NSString+HWToast.h (100%) rename {Classes/Category => Sources/include}/NSTimer+HWToast.h (100%) rename {Classes/Category => Sources/include}/UIView+HWToast.h (100%) diff --git a/.gitignore b/.gitignore index 664e8cc..cdb14c4 100644 --- a/.gitignore +++ b/.gitignore @@ -43,8 +43,15 @@ DerivedData # you should judge for yourself, the pros and cons are mentioned at: # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control # -#Pods/ +Pods/ +# Swift Package Manager +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata ### OSX ### .DS_Store @@ -73,4 +80,4 @@ Network Trash Folder Temporary Items .apdisk -收藏 \ No newline at end of file +收藏 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..fae948b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# DRPLib + +# Version 4.0.0 +February 12, 2025 +Author: stephane thorez +- Add support for SPM + diff --git a/Demo/HWToast.xcodeproj/project.pbxproj b/Demo/HWToast.xcodeproj/project.pbxproj index 500e0cf..e9ef07b 100644 --- a/Demo/HWToast.xcodeproj/project.pbxproj +++ b/Demo/HWToast.xcodeproj/project.pbxproj @@ -40,21 +40,13 @@ 96B5E75D1B5F43EF00D09207 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 96B5E75F1B5F43EF00D09207 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 96B5E7621B5F43EF00D09207 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 96B5E77C1B5F45D100D09207 /* NSString+HWToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+HWToast.h"; sourceTree = ""; }; 96B5E77D1B5F45D100D09207 /* NSString+HWToast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+HWToast.m"; sourceTree = ""; }; - 96B5E77E1B5F45D100D09207 /* HWToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWToast.h; sourceTree = ""; }; 96B5E77F1B5F45D100D09207 /* HWToast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWToast.m; sourceTree = ""; }; - 96B5E7801B5F45D100D09207 /* HWToastMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWToastMaker.h; sourceTree = ""; }; 96B5E7811B5F45D100D09207 /* HWToastMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWToastMaker.m; sourceTree = ""; }; - 96B5E7871B5F45D100D09207 /* HWLoadingToastView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWLoadingToastView.h; sourceTree = ""; }; 96B5E7881B5F45D100D09207 /* HWLoadingToastView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWLoadingToastView.m; sourceTree = ""; }; - 96B5E7891B5F45D100D09207 /* HWPieChartToastView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWPieChartToastView.h; sourceTree = ""; }; 96B5E78A1B5F45D100D09207 /* HWPieChartToastView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWPieChartToastView.m; sourceTree = ""; }; - 96B5E78D1B5F45D100D09207 /* HWToastView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWToastView.h; sourceTree = ""; }; 96B5E78E1B5F45D100D09207 /* HWToastView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWToastView.m; sourceTree = ""; }; - 96B5E7901B5F45D100D09207 /* HWActivityIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWActivityIndicatorView.h; sourceTree = ""; }; 96B5E7911B5F45D100D09207 /* HWActivityIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWActivityIndicatorView.m; sourceTree = ""; }; - 96B5E7921B5F45D100D09207 /* HWPieChartProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWPieChartProgressView.h; sourceTree = ""; }; 96B5E7931B5F45D100D09207 /* HWPieChartProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWPieChartProgressView.m; sourceTree = ""; }; 96B5E79F1B5F4BC500D09207 /* HWToastDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWToastDemoViewController.h; sourceTree = ""; }; 96B5E7A01B5F4BC500D09207 /* HWToastDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWToastDemoViewController.m; sourceTree = ""; }; @@ -62,17 +54,25 @@ 96B5E7A31B5F4C4100D09207 /* HWToolDemoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWToolDemoViewController.m; sourceTree = ""; }; 96B5E7A51B5F4C4F00D09207 /* HWPermanentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWPermanentViewController.h; sourceTree = ""; }; 96B5E7A61B5F4C4F00D09207 /* HWPermanentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWPermanentViewController.m; sourceTree = ""; }; - 96B5E7A81B5F730F00D09207 /* UIView+HWToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+HWToast.h"; sourceTree = ""; }; 96B5E7A91B5F730F00D09207 /* UIView+HWToast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+HWToast.m"; sourceTree = ""; }; 96B5E7AD1B5F83FC00D09207 /* HWToastImage.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = HWToastImage.bundle; sourceTree = ""; }; - 96B5E7B31B5F863500D09207 /* HWToastTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWToastTool.h; sourceTree = ""; }; 96B5E7B41B5F863500D09207 /* HWToastTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWToastTool.m; sourceTree = ""; }; - 96B5E7B61B5F8E6F00D09207 /* HWToastTool+Permanent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HWToastTool+Permanent.h"; sourceTree = ""; }; 96B5E7B71B5F8E6F00D09207 /* HWToastTool+Permanent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HWToastTool+Permanent.m"; sourceTree = ""; }; - 96B5E7BC1B5F90D400D09207 /* HWTextToastView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWTextToastView.h; sourceTree = ""; }; 96B5E7BD1B5F90D400D09207 /* HWTextToastView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HWTextToastView.m; sourceTree = ""; }; - 96B5E7C21B5FCEA200D09207 /* NSTimer+HWToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTimer+HWToast.h"; sourceTree = ""; }; 96B5E7C31B5FCEA200D09207 /* NSTimer+HWToast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSTimer+HWToast.m"; sourceTree = ""; }; + B59BD7D22D64DB94005CFA33 /* HWActivityIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWActivityIndicatorView.h; sourceTree = ""; }; + B59BD7D32D64DB94005CFA33 /* HWLoadingToastView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWLoadingToastView.h; sourceTree = ""; }; + B59BD7D42D64DB94005CFA33 /* HWPieChartProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWPieChartProgressView.h; sourceTree = ""; }; + B59BD7D52D64DB94005CFA33 /* HWPieChartToastView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWPieChartToastView.h; sourceTree = ""; }; + B59BD7D62D64DB94005CFA33 /* HWTextToastView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWTextToastView.h; sourceTree = ""; }; + B59BD7D72D64DB94005CFA33 /* HWToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWToast.h; sourceTree = ""; }; + B59BD7D82D64DB94005CFA33 /* HWToastMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWToastMaker.h; sourceTree = ""; }; + B59BD7D92D64DB94005CFA33 /* HWToastTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWToastTool.h; sourceTree = ""; }; + B59BD7DA2D64DB94005CFA33 /* HWToastTool+Permanent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HWToastTool+Permanent.h"; sourceTree = ""; }; + B59BD7DB2D64DB94005CFA33 /* HWToastView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HWToastView.h; sourceTree = ""; }; + B59BD7DC2D64DB94005CFA33 /* NSString+HWToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+HWToast.h"; sourceTree = ""; }; + B59BD7DD2D64DB94005CFA33 /* NSTimer+HWToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTimer+HWToast.h"; sourceTree = ""; }; + B59BD7DE2D64DB94005CFA33 /* UIView+HWToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+HWToast.h"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -89,7 +89,7 @@ 96B5E7461B5F43EF00D09207 = { isa = PBXGroup; children = ( - 96B5E77A1B5F45D100D09207 /* Classes */, + 96B5E77A1B5F45D100D09207 /* Sources */, 96B5E7511B5F43EF00D09207 /* HWToast */, 96B5E7501B5F43EF00D09207 /* Products */, ); @@ -131,31 +131,27 @@ name = "Supporting Files"; sourceTree = ""; }; - 96B5E77A1B5F45D100D09207 /* Classes */ = { + 96B5E77A1B5F45D100D09207 /* Sources */ = { isa = PBXGroup; children = ( + B59BD7DF2D64DB94005CFA33 /* include */, 96B5E7AD1B5F83FC00D09207 /* HWToastImage.bundle */, - 96B5E77E1B5F45D100D09207 /* HWToast.h */, 96B5E77F1B5F45D100D09207 /* HWToast.m */, - 96B5E7801B5F45D100D09207 /* HWToastMaker.h */, 96B5E7811B5F45D100D09207 /* HWToastMaker.m */, 96B5E7821B5F45D100D09207 /* HWToastView */, 96B5E78F1B5F45D100D09207 /* View */, 96B5E7B21B5F862C00D09207 /* Tool */, 96B5E77B1B5F45D100D09207 /* Category */, ); - name = Classes; - path = ../Classes; + name = Sources; + path = ../Sources; sourceTree = ""; }; 96B5E77B1B5F45D100D09207 /* Category */ = { isa = PBXGroup; children = ( - 96B5E77C1B5F45D100D09207 /* NSString+HWToast.h */, 96B5E77D1B5F45D100D09207 /* NSString+HWToast.m */, - 96B5E7A81B5F730F00D09207 /* UIView+HWToast.h */, 96B5E7A91B5F730F00D09207 /* UIView+HWToast.m */, - 96B5E7C21B5FCEA200D09207 /* NSTimer+HWToast.h */, 96B5E7C31B5FCEA200D09207 /* NSTimer+HWToast.m */, ); path = Category; @@ -164,13 +160,9 @@ 96B5E7821B5F45D100D09207 /* HWToastView */ = { isa = PBXGroup; children = ( - 96B5E78D1B5F45D100D09207 /* HWToastView.h */, 96B5E78E1B5F45D100D09207 /* HWToastView.m */, - 96B5E7BC1B5F90D400D09207 /* HWTextToastView.h */, 96B5E7BD1B5F90D400D09207 /* HWTextToastView.m */, - 96B5E7871B5F45D100D09207 /* HWLoadingToastView.h */, 96B5E7881B5F45D100D09207 /* HWLoadingToastView.m */, - 96B5E7891B5F45D100D09207 /* HWPieChartToastView.h */, 96B5E78A1B5F45D100D09207 /* HWPieChartToastView.m */, ); path = HWToastView; @@ -179,9 +171,7 @@ 96B5E78F1B5F45D100D09207 /* View */ = { isa = PBXGroup; children = ( - 96B5E7901B5F45D100D09207 /* HWActivityIndicatorView.h */, 96B5E7911B5F45D100D09207 /* HWActivityIndicatorView.m */, - 96B5E7921B5F45D100D09207 /* HWPieChartProgressView.h */, 96B5E7931B5F45D100D09207 /* HWPieChartProgressView.m */, ); path = View; @@ -190,14 +180,32 @@ 96B5E7B21B5F862C00D09207 /* Tool */ = { isa = PBXGroup; children = ( - 96B5E7B31B5F863500D09207 /* HWToastTool.h */, 96B5E7B41B5F863500D09207 /* HWToastTool.m */, - 96B5E7B61B5F8E6F00D09207 /* HWToastTool+Permanent.h */, 96B5E7B71B5F8E6F00D09207 /* HWToastTool+Permanent.m */, ); path = Tool; sourceTree = ""; }; + B59BD7DF2D64DB94005CFA33 /* include */ = { + isa = PBXGroup; + children = ( + B59BD7D22D64DB94005CFA33 /* HWActivityIndicatorView.h */, + B59BD7D32D64DB94005CFA33 /* HWLoadingToastView.h */, + B59BD7D42D64DB94005CFA33 /* HWPieChartProgressView.h */, + B59BD7D52D64DB94005CFA33 /* HWPieChartToastView.h */, + B59BD7D62D64DB94005CFA33 /* HWTextToastView.h */, + B59BD7D72D64DB94005CFA33 /* HWToast.h */, + B59BD7D82D64DB94005CFA33 /* HWToastMaker.h */, + B59BD7D92D64DB94005CFA33 /* HWToastTool.h */, + B59BD7DA2D64DB94005CFA33 /* HWToastTool+Permanent.h */, + B59BD7DB2D64DB94005CFA33 /* HWToastView.h */, + B59BD7DC2D64DB94005CFA33 /* NSString+HWToast.h */, + B59BD7DD2D64DB94005CFA33 /* NSTimer+HWToast.h */, + B59BD7DE2D64DB94005CFA33 /* UIView+HWToast.h */, + ); + path = include; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -237,6 +245,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -399,6 +408,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = HWToast/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -409,6 +419,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = HWToast/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; diff --git a/Demo/HWToast.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Demo/HWToast.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Demo/HWToast.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Demo/HWToast.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Demo/HWToast.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Demo/HWToast.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Demo/HWToast/Base.lproj/Main.storyboard b/Demo/HWToast/Base.lproj/Main.storyboard index 199824a..66c5081 100644 --- a/Demo/HWToast/Base.lproj/Main.storyboard +++ b/Demo/HWToast/Base.lproj/Main.storyboard @@ -1,7 +1,10 @@ - - + + + - + + + @@ -9,7 +12,7 @@ - + @@ -29,38 +32,38 @@ - + - - - - + @@ -85,65 +88,65 @@ - + - - - - - - - + @@ -173,20 +176,20 @@ - + - - + @@ -206,30 +209,30 @@ - + - - - + diff --git a/HWToast.podspec b/HWToast.podspec index 9e9ee3f..35ee045 100644 --- a/HWToast.podspec +++ b/HWToast.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "HWToast" - s.version = "0.9" + s.version = "1.0" s.summary = "Show a toast with custom views in a flexible way." s.description = "HWToast can display a toast with custom views in a flexible way. You can make a toast easily in a block." s.homepage = "https://github.com/ChatGame/HWToast" @@ -10,12 +10,12 @@ Pod::Spec.new do |s| # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # s.author = { "callmewhy" => "https://github.com/callmewhy" } # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - s.platform = :ios, "7.0" + s.platform = :ios, "15.0" # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # s.source = { :git => "https://github.com/ChatGame/HWToast.git", :tag => "0.9" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # - s.source_files = "Classes/**/*.{h,m}" + s.source_files = "Sources/**/*.{h,m}" s.resource = "Classes/HWToastImage.bundle" # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # s.requires_arc = true -end \ No newline at end of file +end diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..f2b9eb5 --- /dev/null +++ b/Package.swift @@ -0,0 +1,27 @@ +// swift-tools-version: 5.10 + +import PackageDescription + +let package = Package( + name: "HWToast", + platforms: [ + .iOS(.v15), + ], + products: [ + .library( + name: "HWToast", + targets: ["HWToast"]), + ], + targets: [ + .target( + name: "HWToast", + resources: [.process("HWToastImage.bundle")], + cSettings: [ + .headerSearchPath("Sources/**/*.{h,m}") + ] + ) + ], + swiftLanguageVersions: [ + .v5 + ] +) diff --git a/Classes/Category/NSString+HWToast.m b/Sources/Category/NSString+HWToast.m similarity index 100% rename from Classes/Category/NSString+HWToast.m rename to Sources/Category/NSString+HWToast.m diff --git a/Classes/Category/NSTimer+HWToast.m b/Sources/Category/NSTimer+HWToast.m similarity index 100% rename from Classes/Category/NSTimer+HWToast.m rename to Sources/Category/NSTimer+HWToast.m diff --git a/Classes/Category/UIView+HWToast.m b/Sources/Category/UIView+HWToast.m similarity index 100% rename from Classes/Category/UIView+HWToast.m rename to Sources/Category/UIView+HWToast.m diff --git a/Classes/HWToast.m b/Sources/HWToast.m similarity index 100% rename from Classes/HWToast.m rename to Sources/HWToast.m diff --git a/Classes/HWToastImage.bundle/toast_loading.png b/Sources/HWToastImage.bundle/toast_loading.png similarity index 100% rename from Classes/HWToastImage.bundle/toast_loading.png rename to Sources/HWToastImage.bundle/toast_loading.png diff --git a/Classes/HWToastMaker.m b/Sources/HWToastMaker.m similarity index 100% rename from Classes/HWToastMaker.m rename to Sources/HWToastMaker.m diff --git a/Classes/HWToastView/HWLoadingToastView.m b/Sources/HWToastView/HWLoadingToastView.m similarity index 100% rename from Classes/HWToastView/HWLoadingToastView.m rename to Sources/HWToastView/HWLoadingToastView.m diff --git a/Classes/HWToastView/HWPieChartToastView.m b/Sources/HWToastView/HWPieChartToastView.m similarity index 100% rename from Classes/HWToastView/HWPieChartToastView.m rename to Sources/HWToastView/HWPieChartToastView.m diff --git a/Classes/HWToastView/HWTextToastView.m b/Sources/HWToastView/HWTextToastView.m similarity index 100% rename from Classes/HWToastView/HWTextToastView.m rename to Sources/HWToastView/HWTextToastView.m diff --git a/Classes/HWToastView/HWToastView.m b/Sources/HWToastView/HWToastView.m similarity index 100% rename from Classes/HWToastView/HWToastView.m rename to Sources/HWToastView/HWToastView.m diff --git a/Classes/Tool/HWToastTool+Permanent.m b/Sources/Tool/HWToastTool+Permanent.m similarity index 100% rename from Classes/Tool/HWToastTool+Permanent.m rename to Sources/Tool/HWToastTool+Permanent.m diff --git a/Classes/Tool/HWToastTool.m b/Sources/Tool/HWToastTool.m similarity index 100% rename from Classes/Tool/HWToastTool.m rename to Sources/Tool/HWToastTool.m diff --git a/Classes/View/HWActivityIndicatorView.m b/Sources/View/HWActivityIndicatorView.m similarity index 100% rename from Classes/View/HWActivityIndicatorView.m rename to Sources/View/HWActivityIndicatorView.m diff --git a/Classes/View/HWPieChartProgressView.m b/Sources/View/HWPieChartProgressView.m similarity index 100% rename from Classes/View/HWPieChartProgressView.m rename to Sources/View/HWPieChartProgressView.m diff --git a/Classes/View/HWActivityIndicatorView.h b/Sources/include/HWActivityIndicatorView.h similarity index 100% rename from Classes/View/HWActivityIndicatorView.h rename to Sources/include/HWActivityIndicatorView.h diff --git a/Classes/HWToastView/HWLoadingToastView.h b/Sources/include/HWLoadingToastView.h similarity index 100% rename from Classes/HWToastView/HWLoadingToastView.h rename to Sources/include/HWLoadingToastView.h diff --git a/Classes/View/HWPieChartProgressView.h b/Sources/include/HWPieChartProgressView.h similarity index 100% rename from Classes/View/HWPieChartProgressView.h rename to Sources/include/HWPieChartProgressView.h diff --git a/Classes/HWToastView/HWPieChartToastView.h b/Sources/include/HWPieChartToastView.h similarity index 100% rename from Classes/HWToastView/HWPieChartToastView.h rename to Sources/include/HWPieChartToastView.h diff --git a/Classes/HWToastView/HWTextToastView.h b/Sources/include/HWTextToastView.h similarity index 100% rename from Classes/HWToastView/HWTextToastView.h rename to Sources/include/HWTextToastView.h diff --git a/Classes/HWToast.h b/Sources/include/HWToast.h similarity index 100% rename from Classes/HWToast.h rename to Sources/include/HWToast.h diff --git a/Classes/HWToastMaker.h b/Sources/include/HWToastMaker.h similarity index 100% rename from Classes/HWToastMaker.h rename to Sources/include/HWToastMaker.h diff --git a/Classes/Tool/HWToastTool+Permanent.h b/Sources/include/HWToastTool+Permanent.h similarity index 100% rename from Classes/Tool/HWToastTool+Permanent.h rename to Sources/include/HWToastTool+Permanent.h diff --git a/Classes/Tool/HWToastTool.h b/Sources/include/HWToastTool.h similarity index 100% rename from Classes/Tool/HWToastTool.h rename to Sources/include/HWToastTool.h diff --git a/Classes/HWToastView/HWToastView.h b/Sources/include/HWToastView.h similarity index 100% rename from Classes/HWToastView/HWToastView.h rename to Sources/include/HWToastView.h diff --git a/Classes/Category/NSString+HWToast.h b/Sources/include/NSString+HWToast.h similarity index 100% rename from Classes/Category/NSString+HWToast.h rename to Sources/include/NSString+HWToast.h diff --git a/Classes/Category/NSTimer+HWToast.h b/Sources/include/NSTimer+HWToast.h similarity index 100% rename from Classes/Category/NSTimer+HWToast.h rename to Sources/include/NSTimer+HWToast.h diff --git a/Classes/Category/UIView+HWToast.h b/Sources/include/UIView+HWToast.h similarity index 100% rename from Classes/Category/UIView+HWToast.h rename to Sources/include/UIView+HWToast.h From 6392528e5c6f506e35000ff26d2b9a2c83ceca5b Mon Sep 17 00:00:00 2001 From: mobilite-src Date: Tue, 18 Feb 2025 12:13:34 -0500 Subject: [PATCH 3/6] Update Package.swift --- Package.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Package.swift b/Package.swift index f2b9eb5..2c140b1 100644 --- a/Package.swift +++ b/Package.swift @@ -16,6 +16,7 @@ let package = Package( .target( name: "HWToast", resources: [.process("HWToastImage.bundle")], + publicHeadersPath: "include", cSettings: [ .headerSearchPath("Sources/**/*.{h,m}") ] From 4dcb0047246e0e613fcab19507e5f684a8f2dfbe Mon Sep 17 00:00:00 2001 From: mobilite-src Date: Tue, 18 Feb 2025 15:03:09 -0500 Subject: [PATCH 4/6] Update Package.swift --- Package.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Package.swift b/Package.swift index 2c140b1..f2b9eb5 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,6 @@ let package = Package( .target( name: "HWToast", resources: [.process("HWToastImage.bundle")], - publicHeadersPath: "include", cSettings: [ .headerSearchPath("Sources/**/*.{h,m}") ] From 7ddbb9914cebe4a3dd33233cf131504eeb4cf1ef Mon Sep 17 00:00:00 2001 From: Stephane Thorez Date: Tue, 18 Feb 2025 17:09:38 -0500 Subject: [PATCH 5/6] Add module.modulemap --- HWToast.podspec | 2 +- Package.swift | 19 +++++++++++++++---- Sources/include/HWToast.h | 11 +++++++++++ Sources/module.modulemap | 4 ++++ 4 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 Sources/module.modulemap diff --git a/HWToast.podspec b/HWToast.podspec index 35ee045..e55a668 100644 --- a/HWToast.podspec +++ b/HWToast.podspec @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/ChatGame/HWToast.git", :tag => "0.9" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # s.source_files = "Sources/**/*.{h,m}" - s.resource = "Classes/HWToastImage.bundle" + s.resource = "Sources/HWToastImage.bundle" # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # s.requires_arc = true end diff --git a/Package.swift b/Package.swift index f2b9eb5..e723103 100644 --- a/Package.swift +++ b/Package.swift @@ -15,10 +15,21 @@ let package = Package( targets: [ .target( name: "HWToast", - resources: [.process("HWToastImage.bundle")], - cSettings: [ - .headerSearchPath("Sources/**/*.{h,m}") - ] + path: "Sources", + exclude: ["HWToastImage.bundle"], + sources: [ + "Category", + "HWToastView", + "include", + "HWToast.m", + "HWToastMaker.m", + "View", + "Tool" + ], + resources: [ + .process("HWToastImage.bundle") + ], + publicHeadersPath: "include" ) ], swiftLanguageVersions: [ diff --git a/Sources/include/HWToast.h b/Sources/include/HWToast.h index 17ad9ab..c594b7a 100644 --- a/Sources/include/HWToast.h +++ b/Sources/include/HWToast.h @@ -10,6 +10,17 @@ #import "HWToastMaker.h" #import "HWToastView.h" +#import "HWToastTool.h" +#import "HWToastTool+Permanent.h" +#import "UIView+HWToast.h" +#import "NSString+HWToast.h" +#import "NSTimer+HWToast.h" +#import "HWTextToastView.h" +#import "HWPieChartToastView.h" +#import "HWLoadingToastView.h" +#import "HWPieChartProgressView.h" +#import "HWActivityIndicatorView.h" + NS_ASSUME_NONNULL_BEGIN @interface HWToast : NSObject diff --git a/Sources/module.modulemap b/Sources/module.modulemap new file mode 100644 index 0000000..b3c4378 --- /dev/null +++ b/Sources/module.modulemap @@ -0,0 +1,4 @@ +module HWToast { + header "Sources/include/HWToast.h" // Or the main header that imports all other headers + export * +} From 2b0b2524e253307faaa9fbc4515a18c96a44078e Mon Sep 17 00:00:00 2001 From: Stephane Thorez Date: Fri, 21 Feb 2025 11:56:22 -0500 Subject: [PATCH 6/6] Update package --- Package.swift | 10 ---------- Sources/module.modulemap | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Package.swift b/Package.swift index e723103..8b92027 100644 --- a/Package.swift +++ b/Package.swift @@ -16,16 +16,6 @@ let package = Package( .target( name: "HWToast", path: "Sources", - exclude: ["HWToastImage.bundle"], - sources: [ - "Category", - "HWToastView", - "include", - "HWToast.m", - "HWToastMaker.m", - "View", - "Tool" - ], resources: [ .process("HWToastImage.bundle") ], diff --git a/Sources/module.modulemap b/Sources/module.modulemap index b3c4378..c9d04fc 100644 --- a/Sources/module.modulemap +++ b/Sources/module.modulemap @@ -1,4 +1,4 @@ module HWToast { - header "Sources/include/HWToast.h" // Or the main header that imports all other headers + header "Sources/include/HWToast.h" export * }