From 759a6ad41b3105b86ca4010fc7ecce0359acd5e1 Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 14:15:52 +0100 Subject: [PATCH 01/11] Added DS_Store to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d534044..fd70574 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ xcuserdata/ *.moved-aside *.xccheckout *.xcscmblueprint +.DS_Store ## Obj-C/Swift specific *.hmap From 635b8bed4e07c8fa2b2d63d287ae3cd2fa1e9702 Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 14:32:36 +0100 Subject: [PATCH 02/11] Update to Swift 4 --- StickerView/JLAttributedTextView.swift | 34 +++++++++---------- StickerView/JLStickerImageView.swift | 2 +- StickerView/JLStickerLabelView.swift | 8 ++--- .../StickerView.xcodeproj/project.pbxproj | 12 ++++--- StickerView/adjustToFitFontOrWidth.swift | 4 +-- 5 files changed, 31 insertions(+), 29 deletions(-) diff --git a/StickerView/JLAttributedTextView.swift b/StickerView/JLAttributedTextView.swift index 6aead66..93d78b6 100644 --- a/StickerView/JLAttributedTextView.swift +++ b/StickerView/JLAttributedTextView.swift @@ -11,13 +11,13 @@ import UIKit public class JLAttributedTextView: UITextView { - public private(set) var textAttributes: [String: AnyObject] = [:] + public private(set) var textAttributes: [NSAttributedStringKey: AnyObject] = [:] //MARK: - //MARK: Alpha public var textAlpha: CGFloat = 1 { didSet { - textAttributes[NSForegroundColorAttributeName] = foregroundColor?.withAlphaComponent(textAlpha) + textAttributes[NSAttributedStringKey.foregroundColor] = foregroundColor?.withAlphaComponent(textAlpha) self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -28,7 +28,7 @@ public class JLAttributedTextView: UITextView { public var fontName: String = "HelveticaNeue" { didSet { let font = UIFont(name: fontName, size: fontSize) - textAttributes[NSFontAttributeName] = font + textAttributes[NSAttributedStringKey.font] = font self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) self.font = font @@ -38,7 +38,7 @@ public class JLAttributedTextView: UITextView { public var fontSize: CGFloat = 20 { didSet { let font = UIFont(name: fontName, size: fontSize) - textAttributes[NSFontAttributeName] = font + textAttributes[NSAttributedStringKey.font] = font self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) self.font = font @@ -50,7 +50,7 @@ public class JLAttributedTextView: UITextView { public var foregroundColor: UIColor? { didSet { - textAttributes[NSForegroundColorAttributeName] = foregroundColor + textAttributes[NSAttributedStringKey.foregroundColor] = foregroundColor self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -79,7 +79,7 @@ public class JLAttributedTextView: UITextView { public var paragraphStyle: NSMutableParagraphStyle = NSMutableParagraphStyle() { didSet { - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle } } @@ -89,7 +89,7 @@ public class JLAttributedTextView: UITextView { } set { paragraphStyle.alignment = newValue - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } @@ -102,7 +102,7 @@ public class JLAttributedTextView: UITextView { set { paragraphStyle.lineSpacing = newValue - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } @@ -115,7 +115,7 @@ public class JLAttributedTextView: UITextView { set { paragraphStyle.paragraphSpacing = newValue - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -126,8 +126,8 @@ public class JLAttributedTextView: UITextView { public var shadow: NSShadow? = NSShadow() { didSet { - textAttributes[NSShadowAttributeName] = shadow - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.shadow] = shadow + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -135,8 +135,8 @@ public class JLAttributedTextView: UITextView { public var textShadowOffset: CGSize! { didSet { shadow?.shadowOffset = textShadowOffset - textAttributes[NSShadowAttributeName] = shadow - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.shadow] = shadow + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } @@ -145,8 +145,8 @@ public class JLAttributedTextView: UITextView { public var textShadowColor: UIColor! { didSet { shadow?.shadowColor = textShadowColor - textAttributes[NSShadowAttributeName] = shadow - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.shadow] = shadow + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } @@ -155,8 +155,8 @@ public class JLAttributedTextView: UITextView { public var textShadowBlur: CGFloat! { didSet { shadow?.shadowBlurRadius = textShadowBlur - textAttributes[NSShadowAttributeName] = shadow - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.shadow] = shadow + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } diff --git a/StickerView/JLStickerImageView.swift b/StickerView/JLStickerImageView.swift index eb7b073..0b64377 100644 --- a/StickerView/JLStickerImageView.swift +++ b/StickerView/JLStickerImageView.swift @@ -103,7 +103,7 @@ extension JLStickerImageView { //MARK- //MARK: Gesture extension JLStickerImageView { - func tapOutside() { + @objc func tapOutside() { if let _: JLStickerLabelView = currentlyEditingLabel { currentlyEditingLabel.hideEditingHandlers() } diff --git a/StickerView/JLStickerLabelView.swift b/StickerView/JLStickerLabelView.swift index d007dc9..e50144a 100644 --- a/StickerView/JLStickerLabelView.swift +++ b/StickerView/JLStickerLabelView.swift @@ -241,7 +241,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR } - func contentTapped(_ recognizer: UITapGestureRecognizer) { + @objc func contentTapped(_ recognizer: UITapGestureRecognizer) { if !isShowingEditingHandles { self.showEditingHandles() @@ -252,7 +252,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR } - func closeTap(_ recognizer: UITapGestureRecognizer) { + @objc func closeTap(_ recognizer: UITapGestureRecognizer) { self.removeFromSuperview() if let delegate: JLStickerLabelViewDelegate = delegate { @@ -262,7 +262,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR } } - func moveGesture(_ recognizer: UIPanGestureRecognizer) { + @objc func moveGesture(_ recognizer: UIPanGestureRecognizer) { if !isShowingEditingHandles { self.showEditingHandles() @@ -306,7 +306,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR } } - func rotateViewPanGesture(_ recognizer: UIPanGestureRecognizer) { + @objc func rotateViewPanGesture(_ recognizer: UIPanGestureRecognizer) { touchLocation = recognizer.location(in: self.superview) let center = CalculateFunctions.CGRectGetCenter(self.frame) diff --git a/StickerView/StickerView.xcodeproj/project.pbxproj b/StickerView/StickerView.xcodeproj/project.pbxproj index 1b5a8f1..b9d9e2e 100644 --- a/StickerView/StickerView.xcodeproj/project.pbxproj +++ b/StickerView/StickerView.xcodeproj/project.pbxproj @@ -166,7 +166,7 @@ }; 1859E5EC1D11677A00B53CB5 = { CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 0910; ProvisioningStyle = Automatic; TestTargetID = 1859E5D81D11677900B53CB5; }; @@ -365,7 +365,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.StickerView; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -377,7 +377,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.StickerView; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -389,7 +389,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.StickerViewTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StickerView.app/StickerView"; }; name = Debug; @@ -402,7 +403,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.StickerViewTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StickerView.app/StickerView"; }; name = Release; diff --git a/StickerView/adjustToFitFontOrWidth.swift b/StickerView/adjustToFitFontOrWidth.swift index 9214ccd..dff5c8c 100644 --- a/StickerView/adjustToFitFontOrWidth.swift +++ b/StickerView/adjustToFitFontOrWidth.swift @@ -25,13 +25,13 @@ extension adjustFontSizeToFillRectProtocol { var tempFont = UIFont(name: view.labelTextView.fontName, size: view.labelTextView.fontSize) var copyTextAttributes = labelView.textAttributes - copyTextAttributes[NSFontAttributeName] = tempFont + copyTextAttributes[NSAttributedStringKey.font] = tempFont var attributedText = NSAttributedString(string: view.labelTextView.text, attributes: copyTextAttributes) while stickerMinimumFontSize <= stickerMaximumFontSize { mid = stickerMinimumFontSize + (stickerMaximumFontSize - stickerMinimumFontSize) / 2 tempFont = UIFont(name: view.labelTextView.fontName, size: CGFloat(mid))! - copyTextAttributes[NSFontAttributeName] = tempFont + copyTextAttributes[NSAttributedStringKey.font] = tempFont attributedText = NSAttributedString(string: view.labelTextView.text, attributes: copyTextAttributes) difference = newBounds.height - attributedText.boundingRect(with: CGSize(width: newBounds.width - 24, height: CGFloat.greatestFiniteMagnitude), options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil).height From 503436a6fa2a1dc11afe2a47d1eb19ea2daf702c Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 14:33:36 +0100 Subject: [PATCH 03/11] Upgraded to recommended project settings --- StickerView/StickerView.xcodeproj/project.pbxproj | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/StickerView/StickerView.xcodeproj/project.pbxproj b/StickerView/StickerView.xcodeproj/project.pbxproj index b9d9e2e..139489d 100644 --- a/StickerView/StickerView.xcodeproj/project.pbxproj +++ b/StickerView/StickerView.xcodeproj/project.pbxproj @@ -156,7 +156,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0910; ORGANIZATIONNAME = luiyezheng; TargetAttributes = { 1859E5D81D11677900B53CB5 = { @@ -273,7 +273,9 @@ 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_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; @@ -281,7 +283,11 @@ 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_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; @@ -323,7 +329,9 @@ 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_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; @@ -331,7 +339,11 @@ 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_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; From 061316871049fd36ac6ad2520e0c9202b140f6bc Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 14:54:14 +0100 Subject: [PATCH 04/11] Upgraded Podfile in example project --- Example/Example/Podfile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Example/Example/Podfile b/Example/Example/Podfile index bcfb9b1..30a668d 100644 --- a/Example/Example/Podfile +++ b/Example/Example/Podfile @@ -1,3 +1,16 @@ -use_frameworks! -pod "JLStickerTextView", :git => -"https://github.com/luiyezheng/JLStickerTextView.git" +# Uncomment the next line to define a global platform for your project +platform :ios, '10.0' + +target 'Example' do + # Comment the next line if you're not using Swift and don't want to use dynamic frameworks + use_frameworks! + + # Pods for Example + pod "JLStickerTextView", :git => "https://github.com/luiyezheng/JLStickerTextView.git" + + target 'ExampleTests' do + inherit! :search_paths + # Pods for testing + end + +end From 6ac33516b2e94f8d449219c227bda5ec0feb5215 Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 14:55:25 +0100 Subject: [PATCH 05/11] Upgraded example project syntax to Swift 4 --- .../Example/Example.xcodeproj/project.pbxproj | 127 +++- Example/Example/Example/ViewController.swift | 8 +- Example/Example/Podfile.lock | 16 +- .../Example/Pods/JLStickerTextView/README.md | 122 ++-- .../Source/JLAttributedTextView.swift | 22 +- .../Source/JLStickerImageView.swift | 31 +- .../Source/JLStickerLabelView.swift | 101 ++- .../Source/adjustToFitFontOrWidth.swift | 4 +- .../JLStickerTextView.podspec.json | 6 +- Example/Example/Pods/Manifest.lock | 16 +- .../Pods/Pods.xcodeproj/project.pbxproj | 575 ++++++++++++------ .../xcschemes/JLStickerTextView.xcscheme | 60 -- .../apple.xcuserdatad/xcschemes/Pods.xcscheme | 60 -- .../xcschemes/xcschememanagement.plist | 32 - .../JLStickerTextView/Info.plist | 4 +- .../JLStickerTextView-prefix.pch | 8 + .../JLStickerTextView-umbrella.h | 10 + .../JLStickerTextView.xcconfig | 9 +- .../{Pods => Pods-Example}/Info.plist | 2 +- .../Pods-Example-acknowledgements.markdown} | 2 +- .../Pods-Example-acknowledgements.plist} | 4 +- .../Pods-Example/Pods-Example-dummy.m | 5 + .../Pods-Example/Pods-Example-frameworks.sh | 112 ++++ .../Pods-Example/Pods-Example-resources.sh | 106 ++++ .../Pods-Example/Pods-Example-umbrella.h | 16 + .../Pods-Example/Pods-Example.debug.xcconfig | 11 + .../Pods-Example/Pods-Example.modulemap | 6 + .../Pods-Example.release.xcconfig | 11 + .../Pods-ExampleTests/Info.plist | 26 + ...ods-ExampleTests-acknowledgements.markdown | 3 + .../Pods-ExampleTests-acknowledgements.plist | 29 + .../Pods-ExampleTests-dummy.m | 5 + .../Pods-ExampleTests-frameworks.sh} | 40 +- .../Pods-ExampleTests-resources.sh | 106 ++++ .../Pods-ExampleTests-umbrella.h | 16 + .../Pods-ExampleTests.debug.xcconfig | 8 + .../Pods-ExampleTests.modulemap | 6 + .../Pods-ExampleTests.release.xcconfig | 8 + .../Target Support Files/Pods/Pods-dummy.m | 5 - .../Pods/Pods-resources.sh | 95 --- .../Target Support Files/Pods/Pods-umbrella.h | 6 - .../Pods/Pods.debug.xcconfig | 8 - .../Target Support Files/Pods/Pods.modulemap | 6 - .../Pods/Pods.release.xcconfig | 8 - 44 files changed, 1196 insertions(+), 665 deletions(-) delete mode 100644 Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/JLStickerTextView.xcscheme delete mode 100644 Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/Pods.xcscheme delete mode 100644 Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist rename Example/Example/Pods/Target Support Files/{Pods => Pods-Example}/Info.plist (92%) rename Example/Example/Pods/Target Support Files/{Pods/Pods-acknowledgements.markdown => Pods-Example/Pods-Example-acknowledgements.markdown} (96%) rename Example/Example/Pods/Target Support Files/{Pods/Pods-acknowledgements.plist => Pods-Example/Pods-Example-acknowledgements.plist} (94%) create mode 100644 Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m create mode 100755 Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh create mode 100755 Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh create mode 100644 Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h create mode 100644 Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig create mode 100644 Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap create mode 100644 Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig create mode 100644 Example/Example/Pods/Target Support Files/Pods-ExampleTests/Info.plist create mode 100644 Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-acknowledgements.markdown create mode 100644 Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-acknowledgements.plist create mode 100644 Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-dummy.m rename Example/Example/Pods/Target Support Files/{Pods/Pods-frameworks.sh => Pods-ExampleTests/Pods-ExampleTests-frameworks.sh} (56%) create mode 100755 Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-resources.sh create mode 100644 Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-umbrella.h create mode 100644 Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.debug.xcconfig create mode 100644 Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.modulemap create mode 100644 Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.release.xcconfig delete mode 100644 Example/Example/Pods/Target Support Files/Pods/Pods-dummy.m delete mode 100755 Example/Example/Pods/Target Support Files/Pods/Pods-resources.sh delete mode 100644 Example/Example/Pods/Target Support Files/Pods/Pods-umbrella.h delete mode 100644 Example/Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig delete mode 100644 Example/Example/Pods/Target Support Files/Pods/Pods.modulemap delete mode 100644 Example/Example/Pods/Target Support Files/Pods/Pods.release.xcconfig diff --git a/Example/Example/Example.xcodeproj/project.pbxproj b/Example/Example/Example.xcodeproj/project.pbxproj index 5908af4..1bdcce6 100644 --- a/Example/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example/Example.xcodeproj/project.pbxproj @@ -13,7 +13,8 @@ 18BE709C1CCB10680019CC05 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 18BE709B1CCB10680019CC05 /* Assets.xcassets */; }; 18BE709F1CCB10680019CC05 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18BE709D1CCB10680019CC05 /* LaunchScreen.storyboard */; }; 18BE70AA1CCB10680019CC05 /* ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18BE70A91CCB10680019CC05 /* ExampleTests.swift */; }; - 7E6822858C44EBEEABB2D097 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EDCF8665C3912098B4D004A /* Pods.framework */; }; + 44BBC6A0302D8BE5C518290E /* Pods_ExampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27C90531B62D9278E539C9AA /* Pods_ExampleTests.framework */; }; + CBE36830E3E8BB5561865533 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D7E240BF1B8DC925EDA61B5 /* Pods_Example.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -37,9 +38,13 @@ 18BE70A51CCB10680019CC05 /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 18BE70A91CCB10680019CC05 /* ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleTests.swift; sourceTree = ""; }; 18BE70AB1CCB10680019CC05 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1955558952E2A0A2231B1871 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + 27C90531B62D9278E539C9AA /* Pods_ExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2EDCF8665C3912098B4D004A /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 633B7FAFA58CB94F46843F16 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 6767B06DC112917070D1E183 /* Pods-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.release.xcconfig"; sourceTree = ""; }; + 8D7E240BF1B8DC925EDA61B5 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D191D19EED9A038BBE8542CE /* Pods-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.debug.xcconfig"; sourceTree = ""; }; + E1F18AC7184DB4D2ED9D7470 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; + E6D1652159641C9BA9D41DB4 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -47,7 +52,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7E6822858C44EBEEABB2D097 /* Pods.framework in Frameworks */, + CBE36830E3E8BB5561865533 /* Pods_Example.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -55,6 +60,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 44BBC6A0302D8BE5C518290E /* Pods_ExampleTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -67,8 +73,8 @@ 18BE70931CCB10680019CC05 /* Example */, 18BE70A81CCB10680019CC05 /* ExampleTests */, 18BE70921CCB10680019CC05 /* Products */, - 2D88313B8C3A3759E4BCE491 /* Pods */, 50CD509E19FD05EDFF447E1D /* Frameworks */, + 78E4C6CCECC38B5C05F0952A /* Pods */, ); sourceTree = ""; }; @@ -103,21 +109,25 @@ path = ExampleTests; sourceTree = ""; }; - 2D88313B8C3A3759E4BCE491 /* Pods */ = { + 50CD509E19FD05EDFF447E1D /* Frameworks */ = { isa = PBXGroup; children = ( - 633B7FAFA58CB94F46843F16 /* Pods.debug.xcconfig */, - 1955558952E2A0A2231B1871 /* Pods.release.xcconfig */, + 2EDCF8665C3912098B4D004A /* Pods.framework */, + 8D7E240BF1B8DC925EDA61B5 /* Pods_Example.framework */, + 27C90531B62D9278E539C9AA /* Pods_ExampleTests.framework */, ); - name = Pods; + name = Frameworks; sourceTree = ""; }; - 50CD509E19FD05EDFF447E1D /* Frameworks */ = { + 78E4C6CCECC38B5C05F0952A /* Pods */ = { isa = PBXGroup; children = ( - 2EDCF8665C3912098B4D004A /* Pods.framework */, + E1F18AC7184DB4D2ED9D7470 /* Pods-Example.debug.xcconfig */, + E6D1652159641C9BA9D41DB4 /* Pods-Example.release.xcconfig */, + D191D19EED9A038BBE8542CE /* Pods-ExampleTests.debug.xcconfig */, + 6767B06DC112917070D1E183 /* Pods-ExampleTests.release.xcconfig */, ); - name = Frameworks; + name = Pods; sourceTree = ""; }; /* End PBXGroup section */ @@ -127,12 +137,12 @@ isa = PBXNativeTarget; buildConfigurationList = 18BE70AE1CCB10680019CC05 /* Build configuration list for PBXNativeTarget "Example" */; buildPhases = ( - A621D6B85F4D8F11DF6934AC /* Check Pods Manifest.lock */, + E2B193EEC1094774AF97F145 /* [CP] Check Pods Manifest.lock */, 18BE708D1CCB10680019CC05 /* Sources */, 18BE708E1CCB10680019CC05 /* Frameworks */, 18BE708F1CCB10680019CC05 /* Resources */, - E302DD593268B86DC01F08D8 /* Embed Pods Frameworks */, - 2654991302B78101DB904FB1 /* Copy Pods Resources */, + B6C87A135E60609399A95A5A /* [CP] Embed Pods Frameworks */, + 96C3E8C0891AACD9E17F0F14 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -147,9 +157,12 @@ isa = PBXNativeTarget; buildConfigurationList = 18BE70B11CCB10680019CC05 /* Build configuration list for PBXNativeTarget "ExampleTests" */; buildPhases = ( + 67AB07CB54EA5FCEF2F76AC0 /* [CP] Check Pods Manifest.lock */, 18BE70A11CCB10680019CC05 /* Sources */, 18BE70A21CCB10680019CC05 /* Frameworks */, 18BE70A31CCB10680019CC05 /* Resources */, + 1C2401FDBA07F765DD6FEAD0 /* [CP] Embed Pods Frameworks */, + 993BC6115FE33CFFF1411D9B /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -222,49 +235,103 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2654991302B78101DB904FB1 /* Copy Pods Resources */ = { + 1C2401FDBA07F765DD6FEAD0 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 67AB07CB54EA5FCEF2F76AC0 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ExampleTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 96C3E8C0891AACD9E17F0F14 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 993BC6115FE33CFFF1411D9B /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - A621D6B85F4D8F11DF6934AC /* Check Pods Manifest.lock */ = { + B6C87A135E60609399A95A5A /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/JLStickerTextView/JLStickerTextView.framework", ); - name = "Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JLStickerTextView.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - E302DD593268B86DC01F08D8 /* Embed Pods Frameworks */ = { + E2B193EEC1094774AF97F145 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "Embed Pods Frameworks"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -354,7 +421,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -394,7 +461,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -404,10 +471,11 @@ }; 18BE70AF1CCB10680019CC05 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 633B7FAFA58CB94F46843F16 /* Pods.debug.xcconfig */; + baseConfigurationReference = E1F18AC7184DB4D2ED9D7470 /* Pods-Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.Example; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -417,10 +485,11 @@ }; 18BE70B01CCB10680019CC05 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1955558952E2A0A2231B1871 /* Pods.release.xcconfig */; + baseConfigurationReference = E6D1652159641C9BA9D41DB4 /* Pods-Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.Example; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -430,6 +499,7 @@ }; 18BE70B21CCB10680019CC05 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = D191D19EED9A038BBE8542CE /* Pods-ExampleTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = ExampleTests/Info.plist; @@ -443,6 +513,7 @@ }; 18BE70B31CCB10680019CC05 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 6767B06DC112917070D1E183 /* Pods-ExampleTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; INFOPLIST_FILE = ExampleTests/Info.plist; diff --git a/Example/Example/Example/ViewController.swift b/Example/Example/Example/ViewController.swift index 7ba09db..0a1171a 100644 --- a/Example/Example/Example/ViewController.swift +++ b/Example/Example/Example/ViewController.swift @@ -10,7 +10,7 @@ import UIKit import JLStickerTextView class ViewController: UIViewController { - var colorsArray = [UIColor.white(), UIColor.black(), UIColor.yellow()] + var colorsArray = [UIColor.white, UIColor.black, UIColor.yellow] var fontNamesArray = ["AcademyEngravedLetPlain", "AlNile-Bold", "Chalkduster"] var textAlphaArray = [0.3, 0.6, 1.0] var lineSpacings = [1,30,50] @@ -54,11 +54,11 @@ class ViewController: UIViewController { stickerView.addLabel() //Modify the Label - stickerView.textColor = UIColor.white() + stickerView.textColor = UIColor.white stickerView.textAlpha = 1 stickerView.currentlyEditingLabel.closeView!.image = UIImage(named: "cancel") stickerView.currentlyEditingLabel.rotateView?.image = UIImage(named: "rotate") - stickerView.currentlyEditingLabel.border?.strokeColor = UIColor.white().cgColor + stickerView.currentlyEditingLabel.border?.strokeColor = UIColor.white.cgColor } @@ -67,7 +67,7 @@ class ViewController: UIViewController { let shadowOffset = shadowOffsets[Int(index)] stickerView.textShadowOffset = CGSize(width: CGFloat(shadowOffset), height: 10) - stickerView.textShadowColor = UIColor.red() + stickerView.textShadowColor = UIColor.red } diff --git a/Example/Example/Podfile.lock b/Example/Example/Podfile.lock index 2a40a7d..c073570 100644 --- a/Example/Example/Podfile.lock +++ b/Example/Example/Podfile.lock @@ -1,19 +1,21 @@ PODS: - - JLStickerTextView (0.1.1) + - JLStickerTextView (0.1.2) DEPENDENCIES: - - JLStickerTextView (from `https://github.com/luiyezheng/JLStickerTextView.git`) + - JLStickerTextView (from `https://github.com/FrediWeber/JLStickerTextView.git`) EXTERNAL SOURCES: JLStickerTextView: - :git: https://github.com/luiyezheng/JLStickerTextView.git + :git: https://github.com/FrediWeber/JLStickerTextView.git CHECKOUT OPTIONS: JLStickerTextView: - :commit: 59fe30b3ff13da71c5e263a58518cad4d2ca02af - :git: https://github.com/luiyezheng/JLStickerTextView.git + :commit: 503436a6fa2a1dc11afe2a47d1eb19ea2daf702c + :git: https://github.com/FrediWeber/JLStickerTextView.git SPEC CHECKSUMS: - JLStickerTextView: 830123837eb0ac93de76759725eb4779a8ff280b + JLStickerTextView: 99158380c95dc5455568892beb81d0529f3a547d -COCOAPODS: 0.39.0 +PODFILE CHECKSUM: 3aefea575854fb1036bb2622eda26b3b400fa05f + +COCOAPODS: 1.3.1 diff --git a/Example/Example/Pods/JLStickerTextView/README.md b/Example/Example/Pods/JLStickerTextView/README.md index 7cc40c4..f636335 100644 --- a/Example/Example/Pods/JLStickerTextView/README.md +++ b/Example/Example/Pods/JLStickerTextView/README.md @@ -1,31 +1,40 @@ -##About +## About StickerTextView is an subclass of UIImageView. You can add multiple text to it, edit, rotate, resize the text as you want with one finger, then render the text on Image. -![](https://github.com/luiyezheng/JLStickerTextView/blob/master/demoScreenshot.png) +![](https://github.com/luiyezheng/JLStickerTextView/blob/master/demoScreenshot.jpg) -##Features +## Features * You can add multiple Text to StickerTextView at the same time * Multiple line Text support * Rotate, resize the text with one finger -* set the Color, alpha, font, alignment of the text +* Set the Color, alpha, font, alignment, TextShadow, lineSpacing...... of the text * StickerTextView also handle the process of rendering text on Image * Written in Swift -##Installation -###CocoaPods +## Installation + +### CocoaPods To integrate StickerTextView into your Xcode project using CocoaPods, specify it in your Podfile and run `pod install`: ```Ruby use_frameworks! pod "JLStickerTextView", "~> 0.1.1" ``` +To get the latest version: +```Ruby +use_frameworks! +pod "JLStickerTextView", :git => +"https://github.com/luiyezheng/JLStickerTextView.git" +``` -###Manually +### Manually Just drag the Source files into your project -##Usage -###Start +## Usage + +### Start + First, import `JLStickerTextView`, then subclass the UIImageView, which you want to add text on, to JLStickerImageView, like this: ```Swift @@ -38,36 +47,26 @@ class ViewController: UIViewController { If you use Storyboard, you also need connect the UIImageView to `JLStikcerImageView` Class in Identity Inspector. ![](https://github.com/luiyezheng/JLStickerTextView/blob/master/Inspector.png) -###Add new Label +### Add new Label + It is quite easy to add new label to current StickerImageView: ```Swift stickerView.addLabel() ``` -###set the Label -You can set the color, font , alignment and alpha of the label -####Color -```Swift -stickerView.textColor = UIColor.whiteColor() -``` -####Alpha -```Swift -sticker.textAlpha = CGFloat(textAlpha) -``` -####Font -```Swift -stickerView.fontName = fontName -``` +### Set the Label -####Alignment +You can set the color, font , alignment, alpha.... of the label.(check all avaliable text attributes) -``` -stickerView.textAlignment = NSTextAlignment.Center -``` + +```Swift +stickerView.textColor = UIColor.whiteColor() +``` **Note**: when you set the properties, you make change to the current selected TextLabel. -###Render Text on Image +### Render Text on Image + When you feel good, you are going to render the Text on Image and save the image: ```Swift @@ -75,7 +74,23 @@ let image = stickerView.renderTextOnView(stickerView) UIImageWriteToSavedPhotosAlbum(image!, nil, nil, nil) ``` -###Scale stickerView proportionally +### Customize the StickerTextView appearance + +Customize stickerTextView appearance is very strightforward: + +```swift +//Set the image of close Button +stickerView.currentlyEditingLabel.closeView!.image = UIImage(named: "cancel") +//Set the image of rotate Button +stickerView.currentlyEditingLabel.rotateView?.image = UIImage(named: "rotate") +//Set the border color of textLabel +stickerView.currentlyEditingLabel.border?.strokeColor = UIColor.redColor().CGColor + +``` +**Note**: `closeView` and `rotateView` are both UIimageView, while `border` is CAShapeLayer + +### Scale stickerView proportionally + This function is not complete yet, I just make it to fit my requirement. ``` @@ -84,25 +99,48 @@ stickerView.limitImageViewToSuperView() When you render the text on UIImageView whose content mode is AspectFit, it is possible you will get some unwanted border. This function will scale UIImageView to fit the image. -##Plan -Here are some ideas: +

Avaliable Text Attributes Reference(Let's add more 😉)

+ +|Key | `JLStickerImageView` Property | value Type | +| ------------------------- | ------------------------------ | ------------- | +| `Font` | `.fontName` | `String` | +| `Alignment` | `.textAlignment` | `NSTextAlignment` | +| `Alpha` | `.textAlpha` | `CGFloat ` | +| `textColor` | `.textColor` | `UIColor` | +| `lineSpacing` | `.lineSpacing` | `CGFloat` | +|`TextShadow` | `.textShadowOffset` | `CGSize` | +| | `.textShadowColor` | `UIColor` | +| | `.textShadowBlur` | `CGFloat` | + +## Contributon + +Any suggestion, request, pull are welcome. If you encounter any problem, feel free to create an issue. -* more options for text(eg: lineSpacing) -* interface to custome the appearance of StickerLabelView(close Button, rotate button, border,etc) -* more general solution for Scaling stickerView proportionally -* add placeholder +If you want to add more text attributes: -##Contributon -No specific restriction for contribution yet. Any suggestion, request, pull are welcome. If you encounter any problem, feel free to create an issue. +1. Please fork this project +2. Define the attribute you want in `JLAttributedTextView.swift` +3. implement user interface in `JLStickerImageVIew.swift` +4. Write appropriate docs and comments in the README.md +5. Submit a pull request -##Reference +## Plan + +Here are some ideas: + +- [ ] More options for text(eg: lineSpacing) +- [x] Interface to customize the appearance of StickerLabelView(close Button, rotate button, border,etc) +- [ ] More general solution for Scaling stickerView proportionally +- [ ] Support placeholder + +## Reference Based on + * [IQLabelView](https://github.com/kcandr/IQLabelView) Also inspired by -* [TextDrawer](https://github.com/remirobert/TextDrawer) - - +* [TextDrawer](https://github.com/remirobert/TextDrawer) +* [TextAttributes](https://github.com/delba/TextAttributes) diff --git a/Example/Example/Pods/JLStickerTextView/Source/JLAttributedTextView.swift b/Example/Example/Pods/JLStickerTextView/Source/JLAttributedTextView.swift index 07febb7..6aead66 100644 --- a/Example/Example/Pods/JLStickerTextView/Source/JLAttributedTextView.swift +++ b/Example/Example/Pods/JLStickerTextView/Source/JLAttributedTextView.swift @@ -18,7 +18,7 @@ public class JLAttributedTextView: UITextView { public var textAlpha: CGFloat = 1 { didSet { textAttributes[NSForegroundColorAttributeName] = foregroundColor?.withAlphaComponent(textAlpha) - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -29,7 +29,7 @@ public class JLAttributedTextView: UITextView { didSet { let font = UIFont(name: fontName, size: fontSize) textAttributes[NSFontAttributeName] = font - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) self.font = font } @@ -39,7 +39,7 @@ public class JLAttributedTextView: UITextView { didSet { let font = UIFont(name: fontName, size: fontSize) textAttributes[NSFontAttributeName] = font - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) self.font = font } @@ -51,7 +51,7 @@ public class JLAttributedTextView: UITextView { public var foregroundColor: UIColor? { didSet { textAttributes[NSForegroundColorAttributeName] = foregroundColor - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -90,7 +90,7 @@ public class JLAttributedTextView: UITextView { set { paragraphStyle.alignment = newValue textAttributes[NSParagraphStyleAttributeName] = paragraphStyle - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -103,7 +103,7 @@ public class JLAttributedTextView: UITextView { set { paragraphStyle.lineSpacing = newValue textAttributes[NSParagraphStyleAttributeName] = paragraphStyle - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -116,7 +116,7 @@ public class JLAttributedTextView: UITextView { set { paragraphStyle.paragraphSpacing = newValue textAttributes[NSParagraphStyleAttributeName] = paragraphStyle - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -128,7 +128,7 @@ public class JLAttributedTextView: UITextView { didSet { textAttributes[NSShadowAttributeName] = shadow textAttributes[NSParagraphStyleAttributeName] = paragraphStyle - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -137,7 +137,7 @@ public class JLAttributedTextView: UITextView { shadow?.shadowOffset = textShadowOffset textAttributes[NSShadowAttributeName] = shadow textAttributes[NSParagraphStyleAttributeName] = paragraphStyle - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -147,7 +147,7 @@ public class JLAttributedTextView: UITextView { shadow?.shadowColor = textShadowColor textAttributes[NSShadowAttributeName] = shadow textAttributes[NSParagraphStyleAttributeName] = paragraphStyle - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -157,7 +157,7 @@ public class JLAttributedTextView: UITextView { shadow?.shadowBlurRadius = textShadowBlur textAttributes[NSShadowAttributeName] = shadow textAttributes[NSParagraphStyleAttributeName] = paragraphStyle - self.attributedText = AttributedString(string: self.text, attributes: textAttributes) + self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } diff --git a/Example/Example/Pods/JLStickerTextView/Source/JLStickerImageView.swift b/Example/Example/Pods/JLStickerTextView/Source/JLStickerImageView.swift index 0f0b75e..eb7b073 100644 --- a/Example/Example/Pods/JLStickerTextView/Source/JLStickerImageView.swift +++ b/Example/Example/Pods/JLStickerTextView/Source/JLStickerImageView.swift @@ -10,10 +10,10 @@ import UIKit public class JLStickerImageView: UIImageView, UIGestureRecognizerDelegate { public var currentlyEditingLabel: JLStickerLabelView! - private var labels: NSMutableArray! + internal var labels: NSMutableArray! private var renderedView: UIView! - private lazy var tapOutsideGestureRecognizer: UITapGestureRecognizer! = { + internal lazy var tapOutsideGestureRecognizer: UITapGestureRecognizer! = { let tapGesture = UITapGestureRecognizer(target: self, action: #selector(JLStickerImageView.tapOutside)) tapGesture.delegate = self return tapGesture @@ -22,7 +22,6 @@ public class JLStickerImageView: UIImageView, UIGestureRecognizerDelegate { //MARK: - //MARK: init - init() { super.init(frame: CGRect.zero) @@ -51,7 +50,7 @@ extension JLStickerImageView { if let label: JLStickerLabelView = currentlyEditingLabel { label.hideEditingHandlers() } - + let labelFrame = CGRect(x: self.bounds.midX - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), y: self.bounds.midY - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), width: 60, height: 50) @@ -59,13 +58,13 @@ extension JLStickerImageView { labelView.delegate = self labelView.showsContentShadow = false //labelView.enableMoveRestriction = false - labelView.borderColor = UIColor.white() + labelView.borderColor = UIColor.white labelView.labelTextView.fontName = "Baskerville-BoldItalic" self.addSubview(labelView) self.currentlyEditingLabel = labelView adjustsWidthToFillItsContens(currentlyEditingLabel, labelView: currentlyEditingLabel.labelTextView) self.labels.add(labelView) - + self.addGestureRecognizer(tapOutsideGestureRecognizer) } @@ -88,17 +87,17 @@ extension JLStickerImageView { self.translatesAutoresizingMaskIntoConstraints = true let imageSize = self.image?.size let aspectRatio = imageSize!.width / imageSize!.height - - if imageSize?.width > imageSize?.height { + + guard let imageWidth = imageSize?.width, let imageHeight = imageSize?.height else { return } + + if imageWidth > imageHeight { self.bounds.size.width = self.superview!.bounds.size.width self.bounds.size.height = self.superview!.bounds.size.width / aspectRatio }else { self.bounds.size.height = self.superview!.bounds.size.height self.bounds.size.width = self.superview!.bounds.size.height * aspectRatio } - } - } //MARK- @@ -144,7 +143,7 @@ extension JLStickerImageView: JLStickerLabelViewDelegate { } public func labelViewDidEndEditing(_ label: JLStickerLabelView) { - + } @@ -177,7 +176,7 @@ extension JLStickerImageView: adjustFontSizeToFillRectProtocol { if self.currentlyEditingLabel != nil { self.currentlyEditingLabel.labelTextView.fontName = newValue adjustsWidthToFillItsContens(currentlyEditingLabel, labelView: currentlyEditingLabel.labelTextView) - + } } get { @@ -239,7 +238,7 @@ extension JLStickerImageView: adjustFontSizeToFillRectProtocol { //MARK: - //MARK: text Background - + public var textBackgroundColor: UIColor! { set { if self.currentlyEditingLabel != nil { @@ -262,13 +261,13 @@ extension JLStickerImageView: adjustFontSizeToFillRectProtocol { } get { return self.currentlyEditingLabel.labelTextView.textBackgroundAlpha - + } } //MARK: - //MARK: text shadow - + public var textShadowOffset: CGSize! { set { if self.currentlyEditingLabel != nil { @@ -304,6 +303,4 @@ extension JLStickerImageView: adjustFontSizeToFillRectProtocol { return self.currentlyEditingLabel.labelTextView.shadow?.shadowBlurRadius } } - - } diff --git a/Example/Example/Pods/JLStickerTextView/Source/JLStickerLabelView.swift b/Example/Example/Pods/JLStickerTextView/Source/JLStickerLabelView.swift index 640818d..d007dc9 100644 --- a/Example/Example/Pods/JLStickerTextView/Source/JLStickerLabelView.swift +++ b/Example/Example/Pods/JLStickerTextView/Source/JLStickerLabelView.swift @@ -11,14 +11,14 @@ import UIKit public class JLStickerLabelView: UIView { //MARK: - //MARK: Gestures - + private lazy var moveGestureRecognizer: UIPanGestureRecognizer! = { let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(JLStickerLabelView.moveGesture(_:))) panRecognizer.delegate = self return panRecognizer }() - private lazy var singleTapShowHide: UITapGestureRecognizer! = { + internal lazy var singleTapShowHide: UITapGestureRecognizer! = { let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(JLStickerLabelView.contentTapped(_:))) tapRecognizer.delegate = self return tapRecognizer @@ -39,36 +39,36 @@ public class JLStickerLabelView: UIView { //MARK: - //MARK: properties - private var lastTouchedView: JLStickerLabelView? + internal var lastTouchedView: JLStickerLabelView? var delegate: JLStickerLabelViewDelegate? - private var globalInset: CGFloat? + internal var globalInset: CGFloat? - private var initialBounds: CGRect? - private var initialDistance: CGFloat? + internal var initialBounds: CGRect? + internal var initialDistance: CGFloat? - private var beginningPoint: CGPoint? - private var beginningCenter: CGPoint? + internal var beginningPoint: CGPoint? + internal var beginningCenter: CGPoint? - private var touchLocation: CGPoint? + internal var touchLocation: CGPoint? - private var deltaAngle: CGFloat? - private var beginBounds: CGRect? + internal var deltaAngle: CGFloat? + internal var beginBounds: CGRect? public var border: CAShapeLayer? public var labelTextView: JLAttributedTextView! public var rotateView: UIImageView? public var closeView: UIImageView? - private var isShowingEditingHandles = true + internal var isShowingEditingHandles = true public var borderColor: UIColor? { didSet { border?.strokeColor = borderColor?.cgColor } } - + //MARK: - //MARK: Set Control Buttons @@ -93,12 +93,12 @@ public class JLStickerLabelView: UIView { public var showsContentShadow: Bool = false { didSet { if showsContentShadow { - self.layer.shadowColor = UIColor.black().cgColor + self.layer.shadowColor = UIColor.black.cgColor self.layer.shadowOffset = CGSize(width: 0, height: 5) self.layer.shadowOpacity = 1.0 self.layer.shadowRadius = 4.0 }else { - self.layer.shadowColor = UIColor.clear().cgColor + self.layer.shadowColor = UIColor.clear.cgColor self.layer.shadowOffset = CGSize.zero self.layer.shadowOpacity = 0.0 self.layer.shadowRadius = 0.0 @@ -108,7 +108,7 @@ public class JLStickerLabelView: UIView { //MARK: - //MARK: didMoveToSuperView - + override public func didMoveToSuperview() { super.didMoveToSuperview() if self.superview != nil { @@ -120,7 +120,7 @@ public class JLStickerLabelView: UIView { //MARK: - //MARK: init - + init() { super.init(frame: CGRect.zero) setup() @@ -160,7 +160,7 @@ public class JLStickerLabelView: UIView { func setup() { self.globalInset = 19 - self.backgroundColor = UIColor.clear() + self.backgroundColor = UIColor.clear self.autoresizingMask = [.flexibleHeight, .flexibleWidth] self.border?.strokeColor = UIColor(red: 33, green: 45, blue: 59, alpha: 1).cgColor @@ -202,13 +202,12 @@ extension JLStickerLabelView: UITextViewDelegate { } public func textViewDidBeginEditing(_ textView: UITextView) { - + if let delegate: JLStickerLabelViewDelegate = delegate { if delegate.responds(to: #selector(JLStickerLabelViewDelegate.labelViewDidStartEditing(_:))) { delegate.labelViewDidStartEditing!(self) } } - } public func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { @@ -216,7 +215,7 @@ extension JLStickerLabelView: UITextViewDelegate { self.showEditingHandles() } //if textView.text != "" { - //adjustsWidthToFillItsContens(self, labelView: labelTextView) + //adjustsWidthToFillItsContens(self, labelView: labelTextView) //} return true @@ -225,12 +224,10 @@ extension JLStickerLabelView: UITextViewDelegate { public func textViewDidChange(_ textView: UITextView) { if textView.text != "" { adjustsWidthToFillItsContens(self, labelView: labelTextView) - labelTextView.attributedText = AttributedString(string: labelTextView.text, attributes: labelTextView.textAttributes) - + labelTextView.attributedText = NSAttributedString(string: labelTextView.text, attributes: labelTextView.textAttributes) + } - } - } //MARK: - //MARK: GestureRecognizer @@ -303,7 +300,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR if let delegate: JLStickerLabelViewDelegate = delegate { delegate.labelViewDidEndEditing!(self) } - + default:break } @@ -363,12 +360,11 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR self.refresh() - //self.adjustsWidthToFillItsContens(self, labelView: labelTextView) + //self.adjustsWidthToFillItsContens(self, labelView: labelTextView) default:break } } - } //MARK: - @@ -379,13 +375,13 @@ extension JLStickerLabelView { labelTextView?.autoresizingMask = [.flexibleWidth, .flexibleHeight] labelTextView?.clipsToBounds = true labelTextView?.delegate = self - labelTextView?.backgroundColor = UIColor.clear() + labelTextView?.backgroundColor = UIColor.clear labelTextView?.tintColor = UIColor(red: 33, green: 45, blue: 59, alpha: 1) labelTextView?.isScrollEnabled = false labelTextView.isSelectable = true labelTextView.textContainerInset = UIEdgeInsetsMake(0, 0, 0, 0) labelTextView?.text = "Tap to Edit" - + } func setupBorder() { @@ -394,7 +390,7 @@ extension JLStickerLabelView { border?.fillColor = nil border?.lineDashPattern = [10, 2] border?.lineWidth = 8 - + } func setupCloseAndRotateView() { @@ -404,7 +400,7 @@ extension JLStickerLabelView { closeView!.layer.borderWidth = 3 closeView?.contentMode = .scaleAspectFill closeView?.clipsToBounds = true - closeView?.backgroundColor = UIColor.clear() + closeView?.backgroundColor = UIColor.clear closeView?.layer.cornerRadius = globalInset! - 10 closeView?.image = UIImage(named: "cancel") closeView?.isUserInteractionEnabled = true @@ -412,9 +408,9 @@ extension JLStickerLabelView { rotateView = UIImageView(frame: CGRect(x: self.bounds.size.width - globalInset! * 2, y: self.bounds.size.height - globalInset! * 2, width: globalInset! * 2 - 6, height: globalInset! * 2 - 6)) rotateView?.autoresizingMask = [.flexibleLeftMargin, .flexibleTopMargin] - rotateView?.backgroundColor = UIColor.clear() + rotateView?.backgroundColor = UIColor.clear rotateView?.layer.cornerRadius = globalInset! - 10 - rotateView?.layer.borderColor = UIColor.white().cgColor + rotateView?.layer.borderColor = UIColor.white.cgColor rotateView?.layer.borderWidth = 3 rotateView?.clipsToBounds = true //self.rotateImage = UIImage(named: "rotate-option") @@ -422,7 +418,6 @@ extension JLStickerLabelView { rotateView?.isUserInteractionEnabled = true self.addSubview(rotateView!) } - } @@ -430,27 +425,24 @@ extension JLStickerLabelView { //MARK: Help funcitons extension JLStickerLabelView { - private func refresh() { + internal func refresh() { if let superView: UIView = self.superview { - if let transform: CGAffineTransform = superView.transform { - let scale = CalculateFunctions.CGAffineTransformGetScale(transform) - let t = CGAffineTransform(scaleX: scale.width, y: scale.height) - self.closeView?.transform = t.invert() - self.rotateView?.transform = t.invert() - - if (isShowingEditingHandles) { - if let border: CALayer = border { - self.labelTextView?.layer.addSublayer(border) - } - }else { - border?.removeFromSuperlayer() + let transform: CGAffineTransform = superView.transform + let scale = CalculateFunctions.CGAffineTransformGetScale(transform) + let t = CGAffineTransform(scaleX: scale.width, y: scale.height) + self.closeView?.transform = t.inverted() + self.rotateView?.transform = t.inverted() + + if (isShowingEditingHandles) { + if let border: CALayer = border { + self.labelTextView?.layer.addSublayer(border) } + }else { + border?.removeFromSuperlayer() } - } - } - + public func hideEditingHandlers() { lastTouchedView = nil @@ -472,7 +464,6 @@ extension JLStickerLabelView { delegate.labelViewDidHideEditingHandles!(self) } } - } public func showEditingHandles() { @@ -499,7 +490,7 @@ extension JLStickerLabelView { } } - private func estimatedCenter() -> CGPoint{ + internal func estimatedCenter() -> CGPoint{ let newCenter: CGPoint! var newCenterX = beginningCenter!.x + (touchLocation!.x - beginningPoint!.x) var newCenterY = beginningCenter!.y + (touchLocation!.y - beginningPoint!.y) @@ -519,7 +510,6 @@ extension JLStickerLabelView { } return newCenter } - } //MARK: - @@ -570,10 +560,7 @@ extension JLStickerLabelView { */ @objc optional func labelViewDidEndEditing(_ label: JLStickerLabelView) -> Void - - @objc optional func labelViewDidSelected(_ label: JLStickerLabelView) -> Void - } diff --git a/Example/Example/Pods/JLStickerTextView/Source/adjustToFitFontOrWidth.swift b/Example/Example/Pods/JLStickerTextView/Source/adjustToFitFontOrWidth.swift index fee742c..9214ccd 100644 --- a/Example/Example/Pods/JLStickerTextView/Source/adjustToFitFontOrWidth.swift +++ b/Example/Example/Pods/JLStickerTextView/Source/adjustToFitFontOrWidth.swift @@ -26,13 +26,13 @@ extension adjustFontSizeToFillRectProtocol { var tempFont = UIFont(name: view.labelTextView.fontName, size: view.labelTextView.fontSize) var copyTextAttributes = labelView.textAttributes copyTextAttributes[NSFontAttributeName] = tempFont - var attributedText = AttributedString(string: view.labelTextView.text, attributes: copyTextAttributes) + var attributedText = NSAttributedString(string: view.labelTextView.text, attributes: copyTextAttributes) while stickerMinimumFontSize <= stickerMaximumFontSize { mid = stickerMinimumFontSize + (stickerMaximumFontSize - stickerMinimumFontSize) / 2 tempFont = UIFont(name: view.labelTextView.fontName, size: CGFloat(mid))! copyTextAttributes[NSFontAttributeName] = tempFont - attributedText = AttributedString(string: view.labelTextView.text, attributes: copyTextAttributes) + attributedText = NSAttributedString(string: view.labelTextView.text, attributes: copyTextAttributes) difference = newBounds.height - attributedText.boundingRect(with: CGSize(width: newBounds.width - 24, height: CGFloat.greatestFiniteMagnitude), options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil).height diff --git a/Example/Example/Pods/Local Podspecs/JLStickerTextView.podspec.json b/Example/Example/Pods/Local Podspecs/JLStickerTextView.podspec.json index 5d45e9f..5c48ca2 100644 --- a/Example/Example/Pods/Local Podspecs/JLStickerTextView.podspec.json +++ b/Example/Example/Pods/Local Podspecs/JLStickerTextView.podspec.json @@ -1,6 +1,6 @@ { "name": "JLStickerTextView", - "version": "0.1.1", + "version": "0.1.2", "summary": "add text(multiple line support) to imageView, edit, rotate or resize them as you want, then render the text on image", "homepage": "https://github.com/luiyezheng/JLStickerTextView", "license": { @@ -12,10 +12,10 @@ }, "source": { "git": "https://github.com/luiyezheng/JLStickerTextView.git", - "tag": "0.1.1" + "tag": "0.1.2" }, "platforms": { - "ios": "8.0" + "ios": "10.0" }, "source_files": "Source", "requires_arc": false, diff --git a/Example/Example/Pods/Manifest.lock b/Example/Example/Pods/Manifest.lock index 2a40a7d..c073570 100644 --- a/Example/Example/Pods/Manifest.lock +++ b/Example/Example/Pods/Manifest.lock @@ -1,19 +1,21 @@ PODS: - - JLStickerTextView (0.1.1) + - JLStickerTextView (0.1.2) DEPENDENCIES: - - JLStickerTextView (from `https://github.com/luiyezheng/JLStickerTextView.git`) + - JLStickerTextView (from `https://github.com/FrediWeber/JLStickerTextView.git`) EXTERNAL SOURCES: JLStickerTextView: - :git: https://github.com/luiyezheng/JLStickerTextView.git + :git: https://github.com/FrediWeber/JLStickerTextView.git CHECKOUT OPTIONS: JLStickerTextView: - :commit: 59fe30b3ff13da71c5e263a58518cad4d2ca02af - :git: https://github.com/luiyezheng/JLStickerTextView.git + :commit: 503436a6fa2a1dc11afe2a47d1eb19ea2daf702c + :git: https://github.com/FrediWeber/JLStickerTextView.git SPEC CHECKSUMS: - JLStickerTextView: 830123837eb0ac93de76759725eb4779a8ff280b + JLStickerTextView: 99158380c95dc5455568892beb81d0529f3a547d -COCOAPODS: 0.39.0 +PODFILE CHECKSUM: 3aefea575854fb1036bb2622eda26b3b400fa05f + +COCOAPODS: 1.3.1 diff --git a/Example/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Example/Pods/Pods.xcodeproj/project.pbxproj index 5ca67ad..62a703f 100644 --- a/Example/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,87 +7,127 @@ objects = { /* Begin PBXBuildFile section */ - 0D67195AA82C9A75FA8A315B9133DD67 /* Pods-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14A10B69FACA5040B3BF62C34477CEF9 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */; }; - 211910E4F7438894C00941C682366F0D /* JLStickerTextView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 31A38FA86A2D199AC83DA735326D2F2A /* JLStickerTextView-dummy.m */; }; - 225EB39FD1DBB6557C8CF067540FFF81 /* CalcuteFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7938BC5E6460576C821666E35895FE8 /* CalcuteFunctions.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 439CB6F7DF59BBC8615E1FE8715C8DA6 /* JLStickerLabelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFAFB18D0CC2433E1BEC4DA7E968DE3E /* JLStickerLabelView.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 44F7175BBB57BEB1C569D774D1088305 /* JLAttributedTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A883A83510AB951E8876B23C76CF1C61 /* JLAttributedTextView.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 4855E46D2C216D71A9CE41F5686D2929 /* JLStickerImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 468F36FEC1272DFBBD8105B9FA2FBFD7 /* JLStickerImageView.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 8A1BA495FAE38766461955A4E819FC8B /* adjustToFitFontOrWidth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4174933D8908AC414686EFB014F03237 /* adjustToFitFontOrWidth.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - B6D47E9E04D8C4E52147A3D6E6405DA8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */; }; - C572E4490ED5A8C428C788EE10994523 /* JLStickerTextView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CA15DA4D29CC7F599F2AD88E9DE7AD9 /* JLStickerTextView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C6F58E0F506E0CCFDB11939BA0189231 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */; }; - F5D881BD3C399070B3B8426A8EACF072 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3B7BDF5CE5CB8F095FE12DA55D9A9BB /* UIKit.framework */; }; + 00461B9358DCD1AFE11C9EFAE3161F76 /* JLStickerImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 468F36FEC1272DFBBD8105B9FA2FBFD7 /* JLStickerImageView.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 0170D362849E918F2481D115997C9669 /* Pods-ExampleTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 88577313DBF99AC687AC7D40C55BFC81 /* Pods-ExampleTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0F76C56FD08DF012446D5FDD74E6CFCF /* adjustToFitFontOrWidth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4174933D8908AC414686EFB014F03237 /* adjustToFitFontOrWidth.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 19D829F1AA20B3D9FD830B5A12724728 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */; }; + 1B6B0AF7BCFD89516530320E7A3BED6B /* JLStickerTextView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CA15DA4D29CC7F599F2AD88E9DE7AD9 /* JLStickerTextView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3B2EE76CCC4420003CB486DD0D88F06F /* Pods-Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 520D5F99525C72C3724539F504D67F6C /* Pods-Example-dummy.m */; }; + 3F9F5C8CDB0A5C4672443C0BBE0D94E1 /* JLAttributedTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A883A83510AB951E8876B23C76CF1C61 /* JLAttributedTextView.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 424313FA2A5E72FF90C8410ECA902D51 /* Pods-ExampleTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E30E5E764B176ED81DD2E83EDE6672F /* Pods-ExampleTests-dummy.m */; }; + 641F7FAE40EDE75146C31254DD94EF34 /* JLStickerTextView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 31A38FA86A2D199AC83DA735326D2F2A /* JLStickerTextView-dummy.m */; }; + 70A43DAC0D5AEBA125CD9A4BC55FF86A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; + 835F6C5194C08A74BA674BF9CADCA6F2 /* CalcuteFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7938BC5E6460576C821666E35895FE8 /* CalcuteFunctions.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 929A73D8EA8BAADD95972BE32DA20033 /* Pods-Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 30EB4A15C77553786DE27EEEAA3A4375 /* Pods-Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D3F596A145452CD076DC67E4FF058116 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; + E214F59A480FACD7A9C33EF0B0463097 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */; }; + EEE75B4CD237B176DEDB927C680A150E /* JLStickerLabelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFAFB18D0CC2433E1BEC4DA7E968DE3E /* JLStickerLabelView.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - A6B42A9B186F28E2159662BE88507F30 /* PBXContainerItemProxy */ = { + 6B463B6274052085381EC4765C53A077 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 32D538B784EC21F384D813954B3C42AF; + remoteGlobalIDString = 0BCD1C9585D66C4E3F23F06554E8D7B9; remoteInfo = JLStickerTextView; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 068DFDD5C2EDA47BBDC37ED3BC64A45A /* JLStickerTextView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = JLStickerTextView.modulemap; sourceTree = ""; }; + 003320EF395C9A459CE5CC3675BC0272 /* Pods-ExampleTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-ExampleTests.modulemap"; sourceTree = ""; }; + 019A69B69D5FE7DC84A608AC8B65A458 /* Pods-Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Example-acknowledgements.markdown"; sourceTree = ""; }; + 02053F68A810999D267F4FF50F67DE98 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.release.xcconfig"; sourceTree = ""; }; + 051BE2E981F8F61B7860FBEAD105B4DC /* Pods-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExampleTests.debug.xcconfig"; sourceTree = ""; }; + 068DFDD5C2EDA47BBDC37ED3BC64A45A /* JLStickerTextView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = JLStickerTextView.modulemap; sourceTree = ""; }; + 083798B91EF2DF01E94243D3EF5D744B /* Pods-Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example-frameworks.sh"; sourceTree = ""; }; 196B108899798367117B0303CB5B6D26 /* JLStickerTextView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JLStickerTextView.xcconfig; sourceTree = ""; }; - 2173317FE1BD1F06DA829FEBB440CF02 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1B0C878D8BF4F4AFC097627A4514EC40 /* Pods-Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example-resources.sh"; sourceTree = ""; }; + 261A8525A8B4294431DD193D26FF3C55 /* Pods-Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Example.modulemap"; sourceTree = ""; }; 26707C1E6ED2FF3E09F470DF65B12B5C /* JLStickerTextView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JLStickerTextView-prefix.pch"; sourceTree = ""; }; - 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-umbrella.h"; sourceTree = ""; }; + 30EB4A15C77553786DE27EEEAA3A4375 /* Pods-Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Example-umbrella.h"; sourceTree = ""; }; 31A38FA86A2D199AC83DA735326D2F2A /* JLStickerTextView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JLStickerTextView-dummy.m"; sourceTree = ""; }; 4174933D8908AC414686EFB014F03237 /* adjustToFitFontOrWidth.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = adjustToFitFontOrWidth.swift; path = Source/adjustToFitFontOrWidth.swift; sourceTree = ""; }; 468F36FEC1272DFBBD8105B9FA2FBFD7 /* JLStickerImageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JLStickerImageView.swift; path = Source/JLStickerImageView.swift; sourceTree = ""; }; - 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 79A9DEDC89FE8336BF5FEDAAF75BF7FC /* Pods.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Pods.modulemap; sourceTree = ""; }; - 87B213035BAC5F75386F62D3C75D2342 /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; - 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; - 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; + 4B0924F376B2DA786E4F32D168EE3FDB /* Pods-ExampleTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ExampleTests-acknowledgements.markdown"; sourceTree = ""; }; + 520D5F99525C72C3724539F504D67F6C /* Pods-Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Example-dummy.m"; sourceTree = ""; }; + 5E30E5E764B176ED81DD2E83EDE6672F /* Pods-ExampleTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ExampleTests-dummy.m"; sourceTree = ""; }; + 65C2CF85869AE035935DD70CFFAA7A93 /* Pods-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExampleTests.release.xcconfig"; sourceTree = ""; }; + 710E58DFCA366056B4CF22711E0CEE42 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.debug.xcconfig"; sourceTree = ""; }; + 7462F678379586E6AD56A618B470ECD5 /* JLStickerTextView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = JLStickerTextView.framework; path = JLStickerTextView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7FA5261030BA8439F488C7474DE684BC /* Pods-Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-acknowledgements.plist"; sourceTree = ""; }; + 85EF699463A9763F4EB667FEC3C64768 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 88577313DBF99AC687AC7D40C55BFC81 /* Pods-ExampleTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ExampleTests-umbrella.h"; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 999D20F883DDA7E5FF88F9E652235401 /* Pods-ExampleTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExampleTests-resources.sh"; sourceTree = ""; }; 9CA15DA4D29CC7F599F2AD88E9DE7AD9 /* JLStickerTextView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JLStickerTextView-umbrella.h"; sourceTree = ""; }; A883A83510AB951E8876B23C76CF1C61 /* JLAttributedTextView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JLAttributedTextView.swift; path = Source/JLAttributedTextView.swift; sourceTree = ""; }; + AE23E4831A3113D5473A5203D0B83693 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; AFAFB18D0CC2433E1BEC4DA7E968DE3E /* JLStickerLabelView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JLStickerLabelView.swift; path = Source/JLStickerLabelView.swift; sourceTree = ""; }; B410C52943D02F210405020981220CEE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; B7938BC5E6460576C821666E35895FE8 /* CalcuteFunctions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CalcuteFunctions.swift; path = Source/CalcuteFunctions.swift; sourceTree = ""; }; - BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - C3B7BDF5CE5CB8F095FE12DA55D9A9BB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - CBC0F7C552B739C909B650A0F42F7F38 /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; - D0405803033A2A777B8E4DFA0C1800ED /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; - DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; - E7F21354943D9F42A70697D5A5EF72E9 /* Pods-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-frameworks.sh"; sourceTree = ""; }; - E8446514FBAD26C0E18F24A5715AEF67 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - EDE2BDA4CF767D708DC14D6376A89AA3 /* JLStickerTextView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JLStickerTextView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C3B669240EDE35EAF36576AE1877023E /* Pods-ExampleTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExampleTests-acknowledgements.plist"; sourceTree = ""; }; + D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + DA005456657EE7C0632AF706162C9ACF /* Pods-ExampleTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExampleTests-frameworks.sh"; sourceTree = ""; }; + F24483B97696B63843654642C3CFC559 /* Pods_ExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_ExampleTests.framework; path = "Pods-ExampleTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + F2BA772F51D1256FC97695D3E57E4A5F /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Example.framework; path = "Pods-Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 922A6FD649211FD71DB4CDDF41B1C1E4 /* Frameworks */ = { + 5B0AB7DAF35AD31882B3490B637243D4 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C6F58E0F506E0CCFDB11939BA0189231 /* Foundation.framework in Frameworks */, - F5D881BD3C399070B3B8426A8EACF072 /* UIKit.framework in Frameworks */, + 70A43DAC0D5AEBA125CD9A4BC55FF86A /* Foundation.framework in Frameworks */, + 19D829F1AA20B3D9FD830B5A12724728 /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - A22F0E7D8FF7A407C95A3DB6A1287305 /* Frameworks */ = { + AF0A9E3F2F07C0ED8515EA8A3A5BF827 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B6D47E9E04D8C4E52147A3D6E6405DA8 /* Foundation.framework in Frameworks */, + D3F596A145452CD076DC67E4FF058116 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CD0B5D3DACC586187291BB961323F6DD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E214F59A480FACD7A9C33EF0B0463097 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 18340F12838DEE43507667CC74401EB1 /* iOS */ = { + 0B6280A94317A0DE054EDDEF85B60445 /* Pods-ExampleTests */ = { isa = PBXGroup; children = ( - 6E7E5AF37923BFA48D6994B9BFC6535F /* Foundation.framework */, - C3B7BDF5CE5CB8F095FE12DA55D9A9BB /* UIKit.framework */, + AE23E4831A3113D5473A5203D0B83693 /* Info.plist */, + 003320EF395C9A459CE5CC3675BC0272 /* Pods-ExampleTests.modulemap */, + 4B0924F376B2DA786E4F32D168EE3FDB /* Pods-ExampleTests-acknowledgements.markdown */, + C3B669240EDE35EAF36576AE1877023E /* Pods-ExampleTests-acknowledgements.plist */, + 5E30E5E764B176ED81DD2E83EDE6672F /* Pods-ExampleTests-dummy.m */, + DA005456657EE7C0632AF706162C9ACF /* Pods-ExampleTests-frameworks.sh */, + 999D20F883DDA7E5FF88F9E652235401 /* Pods-ExampleTests-resources.sh */, + 88577313DBF99AC687AC7D40C55BFC81 /* Pods-ExampleTests-umbrella.h */, + 051BE2E981F8F61B7860FBEAD105B4DC /* Pods-ExampleTests.debug.xcconfig */, + 65C2CF85869AE035935DD70CFFAA7A93 /* Pods-ExampleTests.release.xcconfig */, ); - name = iOS; + name = "Pods-ExampleTests"; + path = "Target Support Files/Pods-ExampleTests"; + sourceTree = ""; + }; + 0C163F781E651B382C08A1EEEEA69498 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + C44BF67F021B503D1BF228A867D129F3 /* Pods-Example */, + 0B6280A94317A0DE054EDDEF85B60445 /* Pods-ExampleTests */, + ); + name = "Targets Support Files"; sourceTree = ""; }; 2E64FF84A118E9CAD791A1BB51D3B0F8 /* JLStickerTextView */ = { @@ -100,43 +140,45 @@ AFAFB18D0CC2433E1BEC4DA7E968DE3E /* JLStickerLabelView.swift */, 99E24713052DAEF183BB935B1F2AC43E /* Support Files */, ); + name = JLStickerTextView; path = JLStickerTextView; sourceTree = ""; }; 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { isa = PBXGroup; children = ( - 18340F12838DEE43507667CC74401EB1 /* iOS */, + 438B396F6B4147076630CAEFE34282C1 /* iOS */, ); name = Frameworks; sourceTree = ""; }; - 75D98FF52E597A11900E131B6C4E1ADA /* Pods */ = { + 438B396F6B4147076630CAEFE34282C1 /* iOS */ = { isa = PBXGroup; children = ( - E8446514FBAD26C0E18F24A5715AEF67 /* Info.plist */, - 79A9DEDC89FE8336BF5FEDAAF75BF7FC /* Pods.modulemap */, - D0405803033A2A777B8E4DFA0C1800ED /* Pods-acknowledgements.markdown */, - 87B213035BAC5F75386F62D3C75D2342 /* Pods-acknowledgements.plist */, - 894E5DA93A9F359521A89826BE6DA777 /* Pods-dummy.m */, - E7F21354943D9F42A70697D5A5EF72E9 /* Pods-frameworks.sh */, - CBC0F7C552B739C909B650A0F42F7F38 /* Pods-resources.sh */, - 2BCC458FDD5F692BBB2BFC64BB5701FC /* Pods-umbrella.h */, - 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */, - DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */, + D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */, + B63C6A64CF66340668996F78DA6BB482 /* UIKit.framework */, ); - name = Pods; - path = "Target Support Files/Pods"; + name = iOS; + sourceTree = ""; + }; + 59098A5EAB8EF3796ACB7AC3D61FD5A3 /* Products */ = { + isa = PBXGroup; + children = ( + 7462F678379586E6AD56A618B470ECD5 /* JLStickerTextView.framework */, + F2BA772F51D1256FC97695D3E57E4A5F /* Pods_Example.framework */, + F24483B97696B63843654642C3CFC559 /* Pods_ExampleTests.framework */, + ); + name = Products; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( - BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, CA96D04E84D76BD766955A7D0A3F8B8B /* Pods */, - EF3C5B8364D7CE9B23644A0B98884A1A /* Products */, - B7B80995527643776607AFFA75B91E24 /* Targets Support Files */, + 59098A5EAB8EF3796ACB7AC3D61FD5A3 /* Products */, + 0C163F781E651B382C08A1EEEEA69498 /* Targets Support Files */, ); sourceTree = ""; }; @@ -154,12 +196,22 @@ path = "../Target Support Files/JLStickerTextView"; sourceTree = ""; }; - B7B80995527643776607AFFA75B91E24 /* Targets Support Files */ = { + C44BF67F021B503D1BF228A867D129F3 /* Pods-Example */ = { isa = PBXGroup; children = ( - 75D98FF52E597A11900E131B6C4E1ADA /* Pods */, + 85EF699463A9763F4EB667FEC3C64768 /* Info.plist */, + 261A8525A8B4294431DD193D26FF3C55 /* Pods-Example.modulemap */, + 019A69B69D5FE7DC84A608AC8B65A458 /* Pods-Example-acknowledgements.markdown */, + 7FA5261030BA8439F488C7474DE684BC /* Pods-Example-acknowledgements.plist */, + 520D5F99525C72C3724539F504D67F6C /* Pods-Example-dummy.m */, + 083798B91EF2DF01E94243D3EF5D744B /* Pods-Example-frameworks.sh */, + 1B0C878D8BF4F4AFC097627A4514EC40 /* Pods-Example-resources.sh */, + 30EB4A15C77553786DE27EEEAA3A4375 /* Pods-Example-umbrella.h */, + 710E58DFCA366056B4CF22711E0CEE42 /* Pods-Example.debug.xcconfig */, + 02053F68A810999D267F4FF50F67DE98 /* Pods-Example.release.xcconfig */, ); - name = "Targets Support Files"; + name = "Pods-Example"; + path = "Target Support Files/Pods-Example"; sourceTree = ""; }; CA96D04E84D76BD766955A7D0A3F8B8B /* Pods */ = { @@ -170,44 +222,43 @@ name = Pods; sourceTree = ""; }; - EF3C5B8364D7CE9B23644A0B98884A1A /* Products */ = { - isa = PBXGroup; - children = ( - EDE2BDA4CF767D708DC14D6376A89AA3 /* JLStickerTextView.framework */, - 2173317FE1BD1F06DA829FEBB440CF02 /* Pods.framework */, - ); - name = Products; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 6279DBE850113B20A658EFB53F24734E /* Headers */ = { + 07BFBDB30C06ECE7E0B09F46EC0C0606 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 0D67195AA82C9A75FA8A315B9133DD67 /* Pods-umbrella.h in Headers */, + 1B6B0AF7BCFD89516530320E7A3BED6B /* JLStickerTextView-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 950FEEC8398A302626E0574E3A31B4D6 /* Headers */ = { + 9D0F1CE37452FD7BE26A1A9826D0F5DF /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C572E4490ED5A8C428C788EE10994523 /* JLStickerTextView-umbrella.h in Headers */, + 929A73D8EA8BAADD95972BE32DA20033 /* Pods-Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E826C11020EDC20D4ADE21E1294BC856 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0170D362849E918F2481D115997C9669 /* Pods-ExampleTests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 32D538B784EC21F384D813954B3C42AF /* JLStickerTextView */ = { + 0BCD1C9585D66C4E3F23F06554E8D7B9 /* JLStickerTextView */ = { isa = PBXNativeTarget; - buildConfigurationList = A2AB848501CFD70F9BD737DAC99E7F87 /* Build configuration list for PBXNativeTarget "JLStickerTextView" */; + buildConfigurationList = EAF78638FEC1A62D8D175F1124DDC6D8 /* Build configuration list for PBXNativeTarget "JLStickerTextView" */; buildPhases = ( - 673D5E13973B4F7B90105C699E5DB155 /* Sources */, - 922A6FD649211FD71DB4CDDF41B1C1E4 /* Frameworks */, - 950FEEC8398A302626E0574E3A31B4D6 /* Headers */, + 374AAC2310696501CE370F5D6C42685E /* Sources */, + 5B0AB7DAF35AD31882B3490B637243D4 /* Frameworks */, + 07BFBDB30C06ECE7E0B09F46EC0C0606 /* Headers */, ); buildRules = ( ); @@ -215,25 +266,42 @@ ); name = JLStickerTextView; productName = JLStickerTextView; - productReference = EDE2BDA4CF767D708DC14D6376A89AA3 /* JLStickerTextView.framework */; + productReference = 7462F678379586E6AD56A618B470ECD5 /* JLStickerTextView.framework */; productType = "com.apple.product-type.framework"; }; - C5E2582A824C62684259216111765E40 /* Pods */ = { + 3D00216CD20881E953DB34499621E37B /* Pods-Example */ = { isa = PBXNativeTarget; - buildConfigurationList = 4B06FCD981D69719574A00E26E6FE432 /* Build configuration list for PBXNativeTarget "Pods" */; + buildConfigurationList = CFBCF52A967810FBAE159D2C24D2CA5B /* Build configuration list for PBXNativeTarget "Pods-Example" */; buildPhases = ( - BFABCC742E7F18E77D7164BDE7AC3581 /* Sources */, - A22F0E7D8FF7A407C95A3DB6A1287305 /* Frameworks */, - 6279DBE850113B20A658EFB53F24734E /* Headers */, + 41F379D4C90F88239B20C844AC854157 /* Sources */, + CD0B5D3DACC586187291BB961323F6DD /* Frameworks */, + 9D0F1CE37452FD7BE26A1A9826D0F5DF /* Headers */, ); buildRules = ( ); dependencies = ( - 54F767FE800149B561A549A8D5D8ACF9 /* PBXTargetDependency */, + B4A17B7346365A5B7D0512FD658C2DB4 /* PBXTargetDependency */, ); - name = Pods; - productName = Pods; - productReference = 2173317FE1BD1F06DA829FEBB440CF02 /* Pods.framework */; + name = "Pods-Example"; + productName = "Pods-Example"; + productReference = F2BA772F51D1256FC97695D3E57E4A5F /* Pods_Example.framework */; + productType = "com.apple.product-type.framework"; + }; + CBB4EB89245F1CA0291FC81BF2390E2D /* Pods-ExampleTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 351B782ED1D28A8BB05F0604649FCF84 /* Build configuration list for PBXNativeTarget "Pods-ExampleTests" */; + buildPhases = ( + 5FC3868D957D0B5C68451F9F9CE62E2F /* Sources */, + AF0A9E3F2F07C0ED8515EA8A3A5BF827 /* Frameworks */, + E826C11020EDC20D4ADE21E1294BC856 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Pods-ExampleTests"; + productName = "Pods-ExampleTests"; + productReference = F24483B97696B63843654642C3CFC559 /* Pods_ExampleTests.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -242,13 +310,8 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0700; + LastSwiftUpdateCheck = 0830; LastUpgradeCheck = 0700; - TargetAttributes = { - 32D538B784EC21F384D813954B3C42AF = { - LastSwiftMigration = 0800; - }; - }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -258,177 +321,332 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = EF3C5B8364D7CE9B23644A0B98884A1A /* Products */; + productRefGroup = 59098A5EAB8EF3796ACB7AC3D61FD5A3 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 32D538B784EC21F384D813954B3C42AF /* JLStickerTextView */, - C5E2582A824C62684259216111765E40 /* Pods */, + 0BCD1C9585D66C4E3F23F06554E8D7B9 /* JLStickerTextView */, + 3D00216CD20881E953DB34499621E37B /* Pods-Example */, + CBB4EB89245F1CA0291FC81BF2390E2D /* Pods-ExampleTests */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 673D5E13973B4F7B90105C699E5DB155 /* Sources */ = { + 374AAC2310696501CE370F5D6C42685E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8A1BA495FAE38766461955A4E819FC8B /* adjustToFitFontOrWidth.swift in Sources */, - 225EB39FD1DBB6557C8CF067540FFF81 /* CalcuteFunctions.swift in Sources */, - 44F7175BBB57BEB1C569D774D1088305 /* JLAttributedTextView.swift in Sources */, - 4855E46D2C216D71A9CE41F5686D2929 /* JLStickerImageView.swift in Sources */, - 439CB6F7DF59BBC8615E1FE8715C8DA6 /* JLStickerLabelView.swift in Sources */, - 211910E4F7438894C00941C682366F0D /* JLStickerTextView-dummy.m in Sources */, + 0F76C56FD08DF012446D5FDD74E6CFCF /* adjustToFitFontOrWidth.swift in Sources */, + 835F6C5194C08A74BA674BF9CADCA6F2 /* CalcuteFunctions.swift in Sources */, + 3F9F5C8CDB0A5C4672443C0BBE0D94E1 /* JLAttributedTextView.swift in Sources */, + 00461B9358DCD1AFE11C9EFAE3161F76 /* JLStickerImageView.swift in Sources */, + EEE75B4CD237B176DEDB927C680A150E /* JLStickerLabelView.swift in Sources */, + 641F7FAE40EDE75146C31254DD94EF34 /* JLStickerTextView-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - BFABCC742E7F18E77D7164BDE7AC3581 /* Sources */ = { + 41F379D4C90F88239B20C844AC854157 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 14A10B69FACA5040B3BF62C34477CEF9 /* Pods-dummy.m in Sources */, + 3B2EE76CCC4420003CB486DD0D88F06F /* Pods-Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5FC3868D957D0B5C68451F9F9CE62E2F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 424313FA2A5E72FF90C8410ECA902D51 /* Pods-ExampleTests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 54F767FE800149B561A549A8D5D8ACF9 /* PBXTargetDependency */ = { + B4A17B7346365A5B7D0512FD658C2DB4 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = JLStickerTextView; - target = 32D538B784EC21F384D813954B3C42AF /* JLStickerTextView */; - targetProxy = A6B42A9B186F28E2159662BE88507F30 /* PBXContainerItemProxy */; + target = 0BCD1C9585D66C4E3F23F06554E8D7B9 /* JLStickerTextView */; + targetProxy = 6B463B6274052085381EC4765C53A077 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 2B389FAB51F6EEA43F72CA7BDC8E8E28 /* Debug */ = { + 279B31792DA0411559FE47F59B2EC16B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 051BE2E981F8F61B7860FBEAD105B4DC /* Pods-ExampleTests.debug.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-ExampleTests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-ExampleTests/Pods-ExampleTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_ExampleTests; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 40A9EFD5B5B492BF753D6C13FB4E4644 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 02053F68A810999D267F4FF50F67DE98 /* Pods-Example.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_Example; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 7C07ED8089F70A31B83996A8910D7F18 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 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_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", "DEBUG=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - 4170B24C593D1B7621A046FD40791BFA /* Release */ = { + 8CC16D3DF64FBB6582956D921C06D659 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DA312349A49333542E6F4B36B329960E /* Pods.release.xcconfig */; + baseConfigurationReference = 65C2CF85869AE035935DD70CFFAA7A93 /* Pods-ExampleTests.release.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = "Target Support Files/Pods/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-ExampleTests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods/Pods.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MODULEMAP_FILE = "Target Support Files/Pods-ExampleTests/Pods-ExampleTests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; - PRODUCT_NAME = Pods; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_ExampleTests; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 5A0C6FE968931D888F00C9EC18DDF5BC /* Release */ = { + 97CE60919136E6C0CBC4D2CAF7046ED8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 196B108899798367117B0303CB5B6D26 /* JLStickerTextView.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/JLStickerTextView/JLStickerTextView-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/JLStickerTextView/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/JLStickerTextView/JLStickerTextView.modulemap"; + PRODUCT_NAME = JLStickerTextView; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 98F29E7567052F62660DDD7069ADF73C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 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_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = 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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; }; name = Release; }; - 74C651876E7CD21AE234D62DEC37B8B9 /* Debug */ = { + A402674A4BA0E5479F4D156318F2F2BD /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 977577C045EDA9D9D1F46E2598D19FC7 /* Pods.debug.xcconfig */; + baseConfigurationReference = 710E58DFCA366056B4CF22711E0CEE42 /* Pods-Example.debug.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - INFOPLIST_FILE = "Target Support Files/Pods/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods/Pods.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; - PRODUCT_NAME = Pods; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -436,55 +654,29 @@ }; name = Debug; }; - 94E275A7EE04BC8ADE1174B064E35C46 /* Release */ = { + CEBBAC6F88734C11D077581540014A20 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 196B108899798367117B0303CB5B6D26 /* JLStickerTextView.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/JLStickerTextView/JLStickerTextView-prefix.pch"; INFOPLIST_FILE = "Target Support Files/JLStickerTextView/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/JLStickerTextView/JLStickerTextView.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = JLStickerTextView; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - DDC58A51183D5D2465C4A8B9ABB997E4 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 196B108899798367117B0303CB5B6D26 /* JLStickerTextView.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/JLStickerTextView/JLStickerTextView-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/JLStickerTextView/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/JLStickerTextView/JLStickerTextView.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = JLStickerTextView; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -499,26 +691,35 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2B389FAB51F6EEA43F72CA7BDC8E8E28 /* Debug */, - 5A0C6FE968931D888F00C9EC18DDF5BC /* Release */, + 7C07ED8089F70A31B83996A8910D7F18 /* Debug */, + 98F29E7567052F62660DDD7069ADF73C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 351B782ED1D28A8BB05F0604649FCF84 /* Build configuration list for PBXNativeTarget "Pods-ExampleTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 279B31792DA0411559FE47F59B2EC16B /* Debug */, + 8CC16D3DF64FBB6582956D921C06D659 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4B06FCD981D69719574A00E26E6FE432 /* Build configuration list for PBXNativeTarget "Pods" */ = { + CFBCF52A967810FBAE159D2C24D2CA5B /* Build configuration list for PBXNativeTarget "Pods-Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 74C651876E7CD21AE234D62DEC37B8B9 /* Debug */, - 4170B24C593D1B7621A046FD40791BFA /* Release */, + A402674A4BA0E5479F4D156318F2F2BD /* Debug */, + 40A9EFD5B5B492BF753D6C13FB4E4644 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A2AB848501CFD70F9BD737DAC99E7F87 /* Build configuration list for PBXNativeTarget "JLStickerTextView" */ = { + EAF78638FEC1A62D8D175F1124DDC6D8 /* Build configuration list for PBXNativeTarget "JLStickerTextView" */ = { isa = XCConfigurationList; buildConfigurations = ( - DDC58A51183D5D2465C4A8B9ABB997E4 /* Debug */, - 94E275A7EE04BC8ADE1174B064E35C46 /* Release */, + CEBBAC6F88734C11D077581540014A20 /* Debug */, + 97CE60919136E6C0CBC4D2CAF7046ED8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/JLStickerTextView.xcscheme b/Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/JLStickerTextView.xcscheme deleted file mode 100644 index af6b3f8..0000000 --- a/Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/JLStickerTextView.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/Pods.xcscheme b/Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/Pods.xcscheme deleted file mode 100644 index 990e5d4..0000000 --- a/Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/Pods.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist b/Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index e8eed9e..0000000 --- a/Example/Example/Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - SchemeUserState - - JLStickerTextView.xcscheme - - isShown - - - Pods.xcscheme - - isShown - - - - SuppressBuildableAutocreation - - 32D538B784EC21F384D813954B3C42AF - - primary - - - C5E2582A824C62684259216111765E40 - - primary - - - - - diff --git a/Example/Example/Pods/Target Support Files/JLStickerTextView/Info.plist b/Example/Example/Pods/Target Support Files/JLStickerTextView/Info.plist index c3f6ee3..7c241fa 100644 --- a/Example/Example/Pods/Target Support Files/JLStickerTextView/Info.plist +++ b/Example/Example/Pods/Target Support Files/JLStickerTextView/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.1.1 + 0.1.2 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView-prefix.pch b/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView-prefix.pch index aa992a4..beb2a24 100644 --- a/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView-prefix.pch +++ b/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView-umbrella.h b/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView-umbrella.h index 3032ff5..50f3484 100644 --- a/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView-umbrella.h +++ b/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView-umbrella.h @@ -1,4 +1,14 @@ +#ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif FOUNDATION_EXPORT double JLStickerTextViewVersionNumber; diff --git a/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView.xcconfig b/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView.xcconfig index 067bd38..1fb84f2 100644 --- a/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView.xcconfig +++ b/Example/Example/Pods/Target Support Files/JLStickerTextView/JLStickerTextView.xcconfig @@ -1,6 +1,11 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/JLStickerTextView GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/JLStickerTextView" "${PODS_ROOT}/Headers/Public" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" OTHER_LDFLAGS = -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} -SKIP_INSTALL = YES \ No newline at end of file +PODS_TARGET_SRCROOT = ${PODS_ROOT}/JLStickerTextView +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Example/Pods/Target Support Files/Pods/Info.plist b/Example/Example/Pods/Target Support Files/Pods-Example/Info.plist similarity index 92% rename from Example/Example/Pods/Target Support Files/Pods/Info.plist rename to Example/Example/Pods/Target Support Files/Pods-Example/Info.plist index 6974542..2243fe6 100644 --- a/Example/Example/Pods/Target Support Files/Pods/Info.plist +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.cocoapods.${PRODUCT_NAME:rfc1034identifier} + ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Example/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown similarity index 96% rename from Example/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown rename to Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown index 4f2eb0e..fcdd931 100644 --- a/Example/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown @@ -12,4 +12,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Generated by CocoaPods - http://cocoapods.org +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist similarity index 94% rename from Example/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist rename to Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist index a8529b0..d0e912f 100644 --- a/Example/Example/Pods/Target Support Files/Pods/Pods-acknowledgements.plist +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist @@ -23,6 +23,8 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + License + MIT Title JLStickerTextView Type @@ -30,7 +32,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI FooterText - Generated by CocoaPods - http://cocoapods.org + Generated by CocoaPods - https://cocoapods.org Title Type diff --git a/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m new file mode 100644 index 0000000..6ee3f90 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_Example : NSObject +@end +@implementation PodsDummy_Pods_Example +@end diff --git a/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh new file mode 100755 index 0000000..1186c31 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh @@ -0,0 +1,112 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies the dSYM of a vendored framework +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/JLStickerTextView/JLStickerTextView.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/JLStickerTextView/JLStickerTextView.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh new file mode 100755 index 0000000..a7df440 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh @@ -0,0 +1,106 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h new file mode 100644 index 0000000..ecf498e --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_ExampleVersionString[]; + diff --git a/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig new file mode 100644 index 0000000..251106a --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JLStickerTextView" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JLStickerTextView/JLStickerTextView.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "JLStickerTextView" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap new file mode 100644 index 0000000..4b5189f --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap @@ -0,0 +1,6 @@ +framework module Pods_Example { + umbrella header "Pods-Example-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig new file mode 100644 index 0000000..251106a --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JLStickerTextView" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JLStickerTextView/JLStickerTextView.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "JLStickerTextView" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Info.plist b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-acknowledgements.markdown b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-acknowledgements.markdown new file mode 100644 index 0000000..102af75 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-acknowledgements.plist b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-acknowledgements.plist new file mode 100644 index 0000000..7acbad1 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-dummy.m b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-dummy.m new file mode 100644 index 0000000..c0024d5 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_ExampleTests : NSObject +@end +@implementation PodsDummy_Pods_ExampleTests +@end diff --git a/Example/Example/Pods/Target Support Files/Pods/Pods-frameworks.sh b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-frameworks.sh similarity index 56% rename from Example/Example/Pods/Target Support Files/Pods/Pods-frameworks.sh rename to Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-frameworks.sh index 630031d..88dd537 100755 --- a/Example/Example/Pods/Target Support Files/Pods/Pods-frameworks.sh +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-frameworks.sh @@ -6,6 +6,10 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -16,16 +20,16 @@ install_framework() local source="$1" fi - local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then echo "Symlinked..." source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" @@ -54,13 +58,27 @@ install_framework() fi } +# Copies the dSYM of a vendored framework +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" + fi +} + # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" fi } @@ -71,7 +89,7 @@ strip_invalid_archs() { archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" stripped="" for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -82,10 +100,6 @@ strip_invalid_archs() { fi } - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "Pods/JLStickerTextView.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "Pods/JLStickerTextView.framework" +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait fi diff --git a/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-resources.sh b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-resources.sh new file mode 100755 index 0000000..a7df440 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-resources.sh @@ -0,0 +1,106 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-umbrella.h b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-umbrella.h new file mode 100644 index 0000000..b12f2ef --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_ExampleTestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_ExampleTestsVersionString[]; + diff --git a/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.debug.xcconfig b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.debug.xcconfig new file mode 100644 index 0000000..33eb538 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.debug.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JLStickerTextView" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JLStickerTextView/JLStickerTextView.framework/Headers" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.modulemap b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.modulemap new file mode 100644 index 0000000..08843bd --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_ExampleTests { + umbrella header "Pods-ExampleTests-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.release.xcconfig b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.release.xcconfig new file mode 100644 index 0000000..33eb538 --- /dev/null +++ b/Example/Example/Pods/Target Support Files/Pods-ExampleTests/Pods-ExampleTests.release.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JLStickerTextView" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JLStickerTextView/JLStickerTextView.framework/Headers" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Example/Pods/Target Support Files/Pods/Pods-dummy.m b/Example/Example/Pods/Target Support Files/Pods/Pods-dummy.m deleted file mode 100644 index ade64bd..0000000 --- a/Example/Example/Pods/Target Support Files/Pods/Pods-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods : NSObject -@end -@implementation PodsDummy_Pods -@end diff --git a/Example/Example/Pods/Target Support Files/Pods/Pods-resources.sh b/Example/Example/Pods/Target Support Files/Pods/Pods-resources.sh deleted file mode 100755 index 16774fb..0000000 --- a/Example/Example/Pods/Target Support Files/Pods/Pods-resources.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -realpath() { - DIRECTORY="$(cd "${1%/*}" && pwd)" - FILENAME="${1##*/}" - echo "$DIRECTORY/$FILENAME" -} - -install_resource() -{ - case $1 in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" - ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" - ;; - *.framework) - echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" - xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" - xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - /*) - echo "$1" - echo "$1" >> "$RESOURCES_TO_COPY" - ;; - *) - echo "${PODS_ROOT}/$1" - echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; - esac - - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "`realpath $PODS_ROOT`*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/Example/Example/Pods/Target Support Files/Pods/Pods-umbrella.h b/Example/Example/Pods/Target Support Files/Pods/Pods-umbrella.h deleted file mode 100644 index 21dcfd2..0000000 --- a/Example/Example/Pods/Target Support Files/Pods/Pods-umbrella.h +++ /dev/null @@ -1,6 +0,0 @@ -#import - - -FOUNDATION_EXPORT double PodsVersionNumber; -FOUNDATION_EXPORT const unsigned char PodsVersionString[]; - diff --git a/Example/Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/Example/Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig deleted file mode 100644 index 98b11cb..0000000 --- a/Example/Example/Pods/Target Support Files/Pods/Pods.debug.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/JLStickerTextView.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "JLStickerTextView" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Example/Pods/Target Support Files/Pods/Pods.modulemap b/Example/Example/Pods/Target Support Files/Pods/Pods.modulemap deleted file mode 100644 index 8413413..0000000 --- a/Example/Example/Pods/Target Support Files/Pods/Pods.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods { - umbrella header "Pods-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Example/Pods/Target Support Files/Pods/Pods.release.xcconfig b/Example/Example/Pods/Target Support Files/Pods/Pods.release.xcconfig deleted file mode 100644 index 98b11cb..0000000 --- a/Example/Example/Pods/Target Support Files/Pods/Pods.release.xcconfig +++ /dev/null @@ -1,8 +0,0 @@ -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/JLStickerTextView.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "JLStickerTextView" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods -PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file From fe9080c69b74a658b3bdf4bcbbc25e2ba40c8427 Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 14:56:10 +0100 Subject: [PATCH 06/11] Upgraded example project to recommended settings --- .../Example/Example.xcodeproj/project.pbxproj | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Example/Example/Example.xcodeproj/project.pbxproj b/Example/Example/Example.xcodeproj/project.pbxproj index 1bdcce6..3615c6b 100644 --- a/Example/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example/Example.xcodeproj/project.pbxproj @@ -181,7 +181,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0730; + LastUpgradeCheck = 0910; ORGANIZATIONNAME = luiyezheng; TargetAttributes = { 18BE70901CCB10680019CC05 = { @@ -393,13 +393,21 @@ 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_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_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"; @@ -439,13 +447,21 @@ 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_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_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"; @@ -464,6 +480,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; From a3b5993124e77afa86e5564d48e215dfd6503b4a Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 14:56:57 +0100 Subject: [PATCH 07/11] Upgraded pods project to recommended settings --- .../Pods/Pods.xcodeproj/project.pbxproj | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Example/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Example/Pods/Pods.xcodeproj/project.pbxproj index 62a703f..46bc621 100644 --- a/Example/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -35,15 +35,15 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 003320EF395C9A459CE5CC3675BC0272 /* Pods-ExampleTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-ExampleTests.modulemap"; sourceTree = ""; }; + 003320EF395C9A459CE5CC3675BC0272 /* Pods-ExampleTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-ExampleTests.modulemap"; sourceTree = ""; }; 019A69B69D5FE7DC84A608AC8B65A458 /* Pods-Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Example-acknowledgements.markdown"; sourceTree = ""; }; 02053F68A810999D267F4FF50F67DE98 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.release.xcconfig"; sourceTree = ""; }; 051BE2E981F8F61B7860FBEAD105B4DC /* Pods-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExampleTests.debug.xcconfig"; sourceTree = ""; }; - 068DFDD5C2EDA47BBDC37ED3BC64A45A /* JLStickerTextView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = JLStickerTextView.modulemap; sourceTree = ""; }; + 068DFDD5C2EDA47BBDC37ED3BC64A45A /* JLStickerTextView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = JLStickerTextView.modulemap; sourceTree = ""; }; 083798B91EF2DF01E94243D3EF5D744B /* Pods-Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example-frameworks.sh"; sourceTree = ""; }; 196B108899798367117B0303CB5B6D26 /* JLStickerTextView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JLStickerTextView.xcconfig; sourceTree = ""; }; 1B0C878D8BF4F4AFC097627A4514EC40 /* Pods-Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example-resources.sh"; sourceTree = ""; }; - 261A8525A8B4294431DD193D26FF3C55 /* Pods-Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Example.modulemap"; sourceTree = ""; }; + 261A8525A8B4294431DD193D26FF3C55 /* Pods-Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-Example.modulemap"; sourceTree = ""; }; 26707C1E6ED2FF3E09F470DF65B12B5C /* JLStickerTextView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JLStickerTextView-prefix.pch"; sourceTree = ""; }; 30EB4A15C77553786DE27EEEAA3A4375 /* Pods-Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Example-umbrella.h"; sourceTree = ""; }; 31A38FA86A2D199AC83DA735326D2F2A /* JLStickerTextView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JLStickerTextView-dummy.m"; sourceTree = ""; }; @@ -54,11 +54,11 @@ 5E30E5E764B176ED81DD2E83EDE6672F /* Pods-ExampleTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ExampleTests-dummy.m"; sourceTree = ""; }; 65C2CF85869AE035935DD70CFFAA7A93 /* Pods-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExampleTests.release.xcconfig"; sourceTree = ""; }; 710E58DFCA366056B4CF22711E0CEE42 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.debug.xcconfig"; sourceTree = ""; }; - 7462F678379586E6AD56A618B470ECD5 /* JLStickerTextView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = JLStickerTextView.framework; path = JLStickerTextView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7462F678379586E6AD56A618B470ECD5 /* JLStickerTextView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JLStickerTextView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7FA5261030BA8439F488C7474DE684BC /* Pods-Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-acknowledgements.plist"; sourceTree = ""; }; 85EF699463A9763F4EB667FEC3C64768 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 88577313DBF99AC687AC7D40C55BFC81 /* Pods-ExampleTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ExampleTests-umbrella.h"; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 999D20F883DDA7E5FF88F9E652235401 /* Pods-ExampleTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExampleTests-resources.sh"; sourceTree = ""; }; 9CA15DA4D29CC7F599F2AD88E9DE7AD9 /* JLStickerTextView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JLStickerTextView-umbrella.h"; sourceTree = ""; }; A883A83510AB951E8876B23C76CF1C61 /* JLAttributedTextView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JLAttributedTextView.swift; path = Source/JLAttributedTextView.swift; sourceTree = ""; }; @@ -70,8 +70,8 @@ C3B669240EDE35EAF36576AE1877023E /* Pods-ExampleTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExampleTests-acknowledgements.plist"; sourceTree = ""; }; D88AAE1F92055A60CC2FC970D7D34634 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; DA005456657EE7C0632AF706162C9ACF /* Pods-ExampleTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExampleTests-frameworks.sh"; sourceTree = ""; }; - F24483B97696B63843654642C3CFC559 /* Pods_ExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_ExampleTests.framework; path = "Pods-ExampleTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - F2BA772F51D1256FC97695D3E57E4A5F /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Example.framework; path = "Pods-Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + F24483B97696B63843654642C3CFC559 /* Pods_ExampleTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F2BA772F51D1256FC97695D3E57E4A5F /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -140,7 +140,6 @@ AFAFB18D0CC2433E1BEC4DA7E968DE3E /* JLStickerLabelView.swift */, 99E24713052DAEF183BB935B1F2AC43E /* Support Files */, ); - name = JLStickerTextView; path = JLStickerTextView; sourceTree = ""; }; @@ -311,7 +310,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0910; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -616,6 +615,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SYMROOT = "${SRCROOT}/../build"; }; name = Release; From 2e54aeb74a54fdd71362c80155746a1e3cefcf95 Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 15:03:29 +0100 Subject: [PATCH 08/11] Upgraded AppDelegate and Storyboard to Swift 4 --- .../Example/Example.xcodeproj/project.pbxproj | 16 ++++++++------ Example/Example/Example/AppDelegate.swift | 6 ++---- .../Example/Base.lproj/Main.storyboard | 21 +++++++++++-------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/Example/Example/Example.xcodeproj/project.pbxproj b/Example/Example/Example.xcodeproj/project.pbxproj index 3615c6b..3b5d76e 100644 --- a/Example/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example/Example.xcodeproj/project.pbxproj @@ -186,11 +186,11 @@ TargetAttributes = { 18BE70901CCB10680019CC05 = { CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 0800; + LastSwiftMigration = 0910; }; 18BE70A41CCB10680019CC05 = { CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 0800; + LastSwiftMigration = 0910; TestTargetID = 18BE70901CCB10680019CC05; }; }; @@ -496,7 +496,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.Example; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -510,7 +511,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.Example; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -523,7 +525,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.ExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; }; name = Debug; @@ -537,7 +540,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.ExampleTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; }; name = Release; diff --git a/Example/Example/Example/AppDelegate.swift b/Example/Example/Example/AppDelegate.swift index e8c652d..c1c48b5 100644 --- a/Example/Example/Example/AppDelegate.swift +++ b/Example/Example/Example/AppDelegate.swift @@ -12,10 +12,8 @@ import UIKit class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { - // Override point for customization after application launch. + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { return true } diff --git a/Example/Example/Example/Base.lproj/Main.storyboard b/Example/Example/Example/Base.lproj/Main.storyboard index ab8116c..224dc2f 100644 --- a/Example/Example/Example/Base.lproj/Main.storyboard +++ b/Example/Example/Example/Base.lproj/Main.storyboard @@ -1,9 +1,13 @@ - - + + + + + - + + @@ -15,11 +19,11 @@ - + - + @@ -42,7 +46,7 @@ - + @@ -72,14 +76,13 @@ - + - - + From fb5c934f960ef68135c842ac78768e639d986404 Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 15:21:49 +0100 Subject: [PATCH 09/11] Upgraded files in Sources folder also --- Source/JLAttributedTextView.swift | 34 ++++++++++++++--------------- Source/JLStickerImageView.swift | 2 +- Source/JLStickerLabelView.swift | 8 +++---- Source/adjustToFitFontOrWidth.swift | 4 ++-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Source/JLAttributedTextView.swift b/Source/JLAttributedTextView.swift index 6aead66..93d78b6 100644 --- a/Source/JLAttributedTextView.swift +++ b/Source/JLAttributedTextView.swift @@ -11,13 +11,13 @@ import UIKit public class JLAttributedTextView: UITextView { - public private(set) var textAttributes: [String: AnyObject] = [:] + public private(set) var textAttributes: [NSAttributedStringKey: AnyObject] = [:] //MARK: - //MARK: Alpha public var textAlpha: CGFloat = 1 { didSet { - textAttributes[NSForegroundColorAttributeName] = foregroundColor?.withAlphaComponent(textAlpha) + textAttributes[NSAttributedStringKey.foregroundColor] = foregroundColor?.withAlphaComponent(textAlpha) self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -28,7 +28,7 @@ public class JLAttributedTextView: UITextView { public var fontName: String = "HelveticaNeue" { didSet { let font = UIFont(name: fontName, size: fontSize) - textAttributes[NSFontAttributeName] = font + textAttributes[NSAttributedStringKey.font] = font self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) self.font = font @@ -38,7 +38,7 @@ public class JLAttributedTextView: UITextView { public var fontSize: CGFloat = 20 { didSet { let font = UIFont(name: fontName, size: fontSize) - textAttributes[NSFontAttributeName] = font + textAttributes[NSAttributedStringKey.font] = font self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) self.font = font @@ -50,7 +50,7 @@ public class JLAttributedTextView: UITextView { public var foregroundColor: UIColor? { didSet { - textAttributes[NSForegroundColorAttributeName] = foregroundColor + textAttributes[NSAttributedStringKey.foregroundColor] = foregroundColor self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -79,7 +79,7 @@ public class JLAttributedTextView: UITextView { public var paragraphStyle: NSMutableParagraphStyle = NSMutableParagraphStyle() { didSet { - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle } } @@ -89,7 +89,7 @@ public class JLAttributedTextView: UITextView { } set { paragraphStyle.alignment = newValue - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } @@ -102,7 +102,7 @@ public class JLAttributedTextView: UITextView { set { paragraphStyle.lineSpacing = newValue - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } @@ -115,7 +115,7 @@ public class JLAttributedTextView: UITextView { set { paragraphStyle.paragraphSpacing = newValue - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -126,8 +126,8 @@ public class JLAttributedTextView: UITextView { public var shadow: NSShadow? = NSShadow() { didSet { - textAttributes[NSShadowAttributeName] = shadow - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.shadow] = shadow + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } } @@ -135,8 +135,8 @@ public class JLAttributedTextView: UITextView { public var textShadowOffset: CGSize! { didSet { shadow?.shadowOffset = textShadowOffset - textAttributes[NSShadowAttributeName] = shadow - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.shadow] = shadow + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } @@ -145,8 +145,8 @@ public class JLAttributedTextView: UITextView { public var textShadowColor: UIColor! { didSet { shadow?.shadowColor = textShadowColor - textAttributes[NSShadowAttributeName] = shadow - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.shadow] = shadow + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } @@ -155,8 +155,8 @@ public class JLAttributedTextView: UITextView { public var textShadowBlur: CGFloat! { didSet { shadow?.shadowBlurRadius = textShadowBlur - textAttributes[NSShadowAttributeName] = shadow - textAttributes[NSParagraphStyleAttributeName] = paragraphStyle + textAttributes[NSAttributedStringKey.shadow] = shadow + textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) } diff --git a/Source/JLStickerImageView.swift b/Source/JLStickerImageView.swift index eb7b073..0b64377 100644 --- a/Source/JLStickerImageView.swift +++ b/Source/JLStickerImageView.swift @@ -103,7 +103,7 @@ extension JLStickerImageView { //MARK- //MARK: Gesture extension JLStickerImageView { - func tapOutside() { + @objc func tapOutside() { if let _: JLStickerLabelView = currentlyEditingLabel { currentlyEditingLabel.hideEditingHandlers() } diff --git a/Source/JLStickerLabelView.swift b/Source/JLStickerLabelView.swift index d007dc9..e50144a 100644 --- a/Source/JLStickerLabelView.swift +++ b/Source/JLStickerLabelView.swift @@ -241,7 +241,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR } - func contentTapped(_ recognizer: UITapGestureRecognizer) { + @objc func contentTapped(_ recognizer: UITapGestureRecognizer) { if !isShowingEditingHandles { self.showEditingHandles() @@ -252,7 +252,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR } - func closeTap(_ recognizer: UITapGestureRecognizer) { + @objc func closeTap(_ recognizer: UITapGestureRecognizer) { self.removeFromSuperview() if let delegate: JLStickerLabelViewDelegate = delegate { @@ -262,7 +262,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR } } - func moveGesture(_ recognizer: UIPanGestureRecognizer) { + @objc func moveGesture(_ recognizer: UIPanGestureRecognizer) { if !isShowingEditingHandles { self.showEditingHandles() @@ -306,7 +306,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR } } - func rotateViewPanGesture(_ recognizer: UIPanGestureRecognizer) { + @objc func rotateViewPanGesture(_ recognizer: UIPanGestureRecognizer) { touchLocation = recognizer.location(in: self.superview) let center = CalculateFunctions.CGRectGetCenter(self.frame) diff --git a/Source/adjustToFitFontOrWidth.swift b/Source/adjustToFitFontOrWidth.swift index 9214ccd..dff5c8c 100644 --- a/Source/adjustToFitFontOrWidth.swift +++ b/Source/adjustToFitFontOrWidth.swift @@ -25,13 +25,13 @@ extension adjustFontSizeToFillRectProtocol { var tempFont = UIFont(name: view.labelTextView.fontName, size: view.labelTextView.fontSize) var copyTextAttributes = labelView.textAttributes - copyTextAttributes[NSFontAttributeName] = tempFont + copyTextAttributes[NSAttributedStringKey.font] = tempFont var attributedText = NSAttributedString(string: view.labelTextView.text, attributes: copyTextAttributes) while stickerMinimumFontSize <= stickerMaximumFontSize { mid = stickerMinimumFontSize + (stickerMaximumFontSize - stickerMinimumFontSize) / 2 tempFont = UIFont(name: view.labelTextView.fontName, size: CGFloat(mid))! - copyTextAttributes[NSFontAttributeName] = tempFont + copyTextAttributes[NSAttributedStringKey.font] = tempFont attributedText = NSAttributedString(string: view.labelTextView.text, attributes: copyTextAttributes) difference = newBounds.height - attributedText.boundingRect(with: CGSize(width: newBounds.width - 24, height: CGFloat.greatestFiniteMagnitude), options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil).height From 522a45cfd5404af2d68a9b7292e226e0395e4dab Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 15:51:54 +0100 Subject: [PATCH 10/11] Added posibility to define default text --- StickerView/JLStickerImageView.swift | 4 ++-- StickerView/JLStickerLabelView.swift | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/StickerView/JLStickerImageView.swift b/StickerView/JLStickerImageView.swift index 0b64377..1ecb0ab 100644 --- a/StickerView/JLStickerImageView.swift +++ b/StickerView/JLStickerImageView.swift @@ -46,7 +46,7 @@ public class JLStickerImageView: UIImageView, UIGestureRecognizerDelegate { //MARK: - //MARK: Functions extension JLStickerImageView { - public func addLabel() { + public func addLabel(defaultText: String?) { if let label: JLStickerLabelView = currentlyEditingLabel { label.hideEditingHandlers() } @@ -54,7 +54,7 @@ extension JLStickerImageView { let labelFrame = CGRect(x: self.bounds.midX - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), y: self.bounds.midY - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), width: 60, height: 50) - let labelView = JLStickerLabelView(frame: labelFrame) + let labelView = JLStickerLabelView(frame: labelFrame, defaultText: defaultText) labelView.delegate = self labelView.showsContentShadow = false //labelView.enableMoveRestriction = false diff --git a/StickerView/JLStickerLabelView.swift b/StickerView/JLStickerLabelView.swift index e50144a..aaecbe3 100644 --- a/StickerView/JLStickerLabelView.swift +++ b/StickerView/JLStickerLabelView.swift @@ -123,12 +123,12 @@ public class JLStickerLabelView: UIView { init() { super.init(frame: CGRect.zero) - setup() + setup(defaultText: nil) adjustsWidthToFillItsContens(self, labelView: labelTextView) } - override init(frame: CGRect) { + init(frame: CGRect, defaultText: String?) { super.init(frame: frame) if frame.size.width < 25 { @@ -139,13 +139,13 @@ public class JLStickerLabelView: UIView { self.bounds.size.height = 25 } - self.setup() + self.setup(defaultText: defaultText) adjustsWidthToFillItsContens(self, labelView: labelTextView) } required public init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) - setup() + setup(defaultText: nil) adjustsWidthToFillItsContens(self, labelView: labelTextView) } @@ -157,14 +157,18 @@ public class JLStickerLabelView: UIView { } } - func setup() { + func setup(defaultText: String?) { self.globalInset = 19 self.backgroundColor = UIColor.clear self.autoresizingMask = [.flexibleHeight, .flexibleWidth] self.border?.strokeColor = UIColor(red: 33, green: 45, blue: 59, alpha: 1).cgColor - self.setupLabelTextView() + if let defaultText = defaultText { + self.setupLabelTextView(defaultText: defaultText) + } else { + self.setupLabelTextView() + } self.setupBorder() self.insertSubview(labelTextView!, at: 0) @@ -370,7 +374,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR //MARK: - //MARK: setup extension JLStickerLabelView { - func setupLabelTextView() { + func setupLabelTextView(defaultText: String = "Tap to edit") { labelTextView = JLAttributedTextView(frame: self.bounds.insetBy(dx: globalInset!, dy: globalInset!)) labelTextView?.autoresizingMask = [.flexibleWidth, .flexibleHeight] labelTextView?.clipsToBounds = true @@ -380,7 +384,7 @@ extension JLStickerLabelView { labelTextView?.isScrollEnabled = false labelTextView.isSelectable = true labelTextView.textContainerInset = UIEdgeInsetsMake(0, 0, 0, 0) - labelTextView?.text = "Tap to Edit" + labelTextView?.text = defaultText } From e0f02a4d665bd6e9220ff31cfbb7dddcde7d3aea Mon Sep 17 00:00:00 2001 From: Frederik Weber Date: Sun, 5 Nov 2017 16:01:20 +0100 Subject: [PATCH 11/11] Added to Source --- Source/JLStickerImageView.swift | 4 ++-- Source/JLStickerLabelView.swift | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Source/JLStickerImageView.swift b/Source/JLStickerImageView.swift index 0b64377..1ecb0ab 100644 --- a/Source/JLStickerImageView.swift +++ b/Source/JLStickerImageView.swift @@ -46,7 +46,7 @@ public class JLStickerImageView: UIImageView, UIGestureRecognizerDelegate { //MARK: - //MARK: Functions extension JLStickerImageView { - public func addLabel() { + public func addLabel(defaultText: String?) { if let label: JLStickerLabelView = currentlyEditingLabel { label.hideEditingHandlers() } @@ -54,7 +54,7 @@ extension JLStickerImageView { let labelFrame = CGRect(x: self.bounds.midX - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), y: self.bounds.midY - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), width: 60, height: 50) - let labelView = JLStickerLabelView(frame: labelFrame) + let labelView = JLStickerLabelView(frame: labelFrame, defaultText: defaultText) labelView.delegate = self labelView.showsContentShadow = false //labelView.enableMoveRestriction = false diff --git a/Source/JLStickerLabelView.swift b/Source/JLStickerLabelView.swift index e50144a..aaecbe3 100644 --- a/Source/JLStickerLabelView.swift +++ b/Source/JLStickerLabelView.swift @@ -123,12 +123,12 @@ public class JLStickerLabelView: UIView { init() { super.init(frame: CGRect.zero) - setup() + setup(defaultText: nil) adjustsWidthToFillItsContens(self, labelView: labelTextView) } - override init(frame: CGRect) { + init(frame: CGRect, defaultText: String?) { super.init(frame: frame) if frame.size.width < 25 { @@ -139,13 +139,13 @@ public class JLStickerLabelView: UIView { self.bounds.size.height = 25 } - self.setup() + self.setup(defaultText: defaultText) adjustsWidthToFillItsContens(self, labelView: labelTextView) } required public init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) - setup() + setup(defaultText: nil) adjustsWidthToFillItsContens(self, labelView: labelTextView) } @@ -157,14 +157,18 @@ public class JLStickerLabelView: UIView { } } - func setup() { + func setup(defaultText: String?) { self.globalInset = 19 self.backgroundColor = UIColor.clear self.autoresizingMask = [.flexibleHeight, .flexibleWidth] self.border?.strokeColor = UIColor(red: 33, green: 45, blue: 59, alpha: 1).cgColor - self.setupLabelTextView() + if let defaultText = defaultText { + self.setupLabelTextView(defaultText: defaultText) + } else { + self.setupLabelTextView() + } self.setupBorder() self.insertSubview(labelTextView!, at: 0) @@ -370,7 +374,7 @@ extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillR //MARK: - //MARK: setup extension JLStickerLabelView { - func setupLabelTextView() { + func setupLabelTextView(defaultText: String = "Tap to edit") { labelTextView = JLAttributedTextView(frame: self.bounds.insetBy(dx: globalInset!, dy: globalInset!)) labelTextView?.autoresizingMask = [.flexibleWidth, .flexibleHeight] labelTextView?.clipsToBounds = true @@ -380,7 +384,7 @@ extension JLStickerLabelView { labelTextView?.isScrollEnabled = false labelTextView.isSelectable = true labelTextView.textContainerInset = UIEdgeInsetsMake(0, 0, 0, 0) - labelTextView?.text = "Tap to Edit" + labelTextView?.text = defaultText }