diff --git a/ChainedAttributedString/NSMutableAttributedString+ChainedAttributes.swift b/ChainedAttributedString/NSMutableAttributedString+ChainedAttributes.swift index 1eac828..e720ebb 100644 --- a/ChainedAttributedString/NSMutableAttributedString+ChainedAttributes.swift +++ b/ChainedAttributedString/NSMutableAttributedString+ChainedAttributes.swift @@ -31,7 +31,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSForegroundColorAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.foregroundColor, withValue: value, forRange: attributeRange) return self } @@ -54,7 +54,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSFontAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.font, withValue: value, forRange: attributeRange) return self } @@ -77,7 +77,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSBackgroundColorAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.backgroundColor, withValue: value, forRange: attributeRange) return self } @@ -100,7 +100,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSKernAttributeName, withValue: value as AnyObject, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.kern, withValue: value as AnyObject, forRange: attributeRange) return self } @@ -123,7 +123,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSUnderlineStyleAttributeName, withValue: value as AnyObject, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.underlineStyle, withValue: value as AnyObject, forRange: attributeRange) return self } @@ -146,7 +146,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSUnderlineColorAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.underlineColor, withValue: value, forRange: attributeRange) return self } @@ -169,7 +169,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSStrikethroughStyleAttributeName, withValue: value as AnyObject, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.strikethroughStyle, withValue: value as AnyObject, forRange: attributeRange) return self } @@ -192,7 +192,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSStrikethroughColorAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.strikethroughColor, withValue: value, forRange: attributeRange) return self } @@ -215,11 +215,76 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSLinkAttributeName, withValue: value as AnyObject, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.link, withValue: value as AnyObject, forRange: attributeRange) return self } + /** + This function adds paragraphy style with line spacing to attributed string. + + - warning: If text passed in "text" parameter is not found, attribute will be applied to whole attributed string. Only first occurence of "text" is styled. + + - parameter value - CGFloat which should be applied as linespacing to the paragraph style + - parameter text - String for which the paragraph style will be applied to (optional, default = whole attributed string) + + - returns: Modified NSMutableAttributedString + */ + func lineSpacing(_ value:CGFloat, forText text:String? = nil) -> NSMutableAttributedString { + + var attributeRange:NSRange? = nil + if let textForAttribute = text { + attributeRange = self.getRangeOfStringInSelf(textForAttribute) + } + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.lineSpacing = value + + self.applyAttribute(NSAttributedString.Key.paragraphStyle, withValue: paragraphStyle as AnyObject, forRange: attributeRange) + + return self + } + + /** + This function adds paragraphy style to attributed string. + */ + + func paragraphStyle(_ paragraphStyle:NSParagraphStyle, forText text:String? = nil) -> NSMutableAttributedString { + var attributeRange:NSRange? = nil + if let textForAttribute = text { + attributeRange = self.getRangeOfStringInSelf(textForAttribute) + } + + self.applyAttribute(NSAttributedString.Key.paragraphStyle, withValue: paragraphStyle as AnyObject, forRange: attributeRange) + + return self + } + + /** + This function adds paragraph style with text alignment attributed string. + + - warning: If text passed in "text" parameter is not found, attribute will be applied to whole attributed string. Only first occurence of "text" is styled. + + - parameter alignment - NSTextAlignment which should be applied as alignment to the paragraph style + - parameter text - String for which the paragraph style will be applied to (optional, default = whole attributed string) + + - returns: Modified NSMutableAttributedString + */ + func alignment(_ alignment:NSTextAlignment, forText text:String? = nil) -> NSMutableAttributedString { + + var attributeRange:NSRange? = nil + if let textForAttribute = text { + attributeRange = self.getRangeOfStringInSelf(textForAttribute) + } + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.alignment = .center + + self.applyAttribute(NSAttributedString.Key.paragraphStyle, withValue: paragraphStyle as AnyObject, forRange: attributeRange) + + return self + } + // MARK: Clear attributes /** @@ -249,7 +314,7 @@ public extension NSMutableAttributedString { // MARK: Applying attributes - fileprivate func applyAttribute(_ attributeName:String, withValue value:AnyObject, forRange range:NSRange? = nil) { + fileprivate func applyAttribute(_ attributeName: NSAttributedString.Key, withValue value: AnyObject, forRange range: NSRange? = nil) { let attributeRange = range ?? self.getRangeOfSelf() self.addAttribute(attributeName, value: value, range: attributeRange) diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index 147288c..61f82b5 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -127,12 +127,12 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0730; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = Example; TargetAttributes = { E0C323FD1D2463D000712168 = { CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 0800; + LastSwiftMigration = 1000; ProvisioningStyle = Manual; }; }; @@ -260,13 +260,23 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -306,13 +316,23 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -331,6 +351,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -340,6 +361,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1B5DE12EDCA817CEB23756C0 /* Pods-Example.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Example/Info.plist; @@ -347,7 +369,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.example.Example; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -355,6 +377,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = FA3411A5A628154C440137FA /* Pods-Example.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Example/Info.plist; @@ -362,7 +385,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.example.Example; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/Example/AppDelegate.swift b/Example/Example/AppDelegate.swift index 205056c..0673675 100644 --- a/Example/Example/AppDelegate.swift +++ b/Example/Example/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..d8db8d6 100644 --- a/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -59,6 +79,16 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/Example/Example/NSMutableAttributedString+ChainedAttributes.swift b/Example/Example/NSMutableAttributedString+ChainedAttributes.swift index 1eac828..2268efc 100644 --- a/Example/Example/NSMutableAttributedString+ChainedAttributes.swift +++ b/Example/Example/NSMutableAttributedString+ChainedAttributes.swift @@ -31,7 +31,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSForegroundColorAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.foregroundColor, withValue: value, forRange: attributeRange) return self } @@ -54,7 +54,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSFontAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.font, withValue: value, forRange: attributeRange) return self } @@ -77,7 +77,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSBackgroundColorAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.backgroundColor, withValue: value, forRange: attributeRange) return self } @@ -100,7 +100,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSKernAttributeName, withValue: value as AnyObject, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.kern, withValue: value as AnyObject, forRange: attributeRange) return self } @@ -123,7 +123,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSUnderlineStyleAttributeName, withValue: value as AnyObject, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.underlineStyle, withValue: value as AnyObject, forRange: attributeRange) return self } @@ -146,7 +146,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSUnderlineColorAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.underlineColor, withValue: value, forRange: attributeRange) return self } @@ -169,7 +169,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSStrikethroughStyleAttributeName, withValue: value as AnyObject, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.strikethroughStyle, withValue: value as AnyObject, forRange: attributeRange) return self } @@ -192,7 +192,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSStrikethroughColorAttributeName, withValue: value, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.strikethroughColor, withValue: value, forRange: attributeRange) return self } @@ -215,7 +215,7 @@ public extension NSMutableAttributedString { attributeRange = self.getRangeOfStringInSelf(textForAttribute) } - self.applyAttribute(NSLinkAttributeName, withValue: value as AnyObject, forRange: attributeRange) + self.applyAttribute(NSAttributedString.Key.link, withValue: value as AnyObject, forRange: attributeRange) return self } @@ -249,7 +249,7 @@ public extension NSMutableAttributedString { // MARK: Applying attributes - fileprivate func applyAttribute(_ attributeName:String, withValue value:AnyObject, forRange range:NSRange? = nil) { + fileprivate func applyAttribute(_ attributeName: NSAttributedString.Key, withValue value: AnyObject, forRange range: NSRange? = nil) { let attributeRange = range ?? self.getRangeOfSelf() self.addAttribute(attributeName, value: value, range: attributeRange) diff --git a/Example/Example/ViewController.swift b/Example/Example/ViewController.swift index c197ff6..92ef783 100644 --- a/Example/Example/ViewController.swift +++ b/Example/Example/ViewController.swift @@ -17,17 +17,22 @@ class ViewController: UIViewController { super.viewDidLoad() //join strings - let one = "Test".attributedString() + "One".attributedString() + _ = "Test".attributedString() + "One".attributedString() //apply attributes - self.exampleLabel.attributedText = "This sample text shows chained attributes".attributedString() + self.exampleLabel.attributedText = "This sample text shows chained attributes\nWith line spacing as an option".attributedString() .textColor(UIColor.red, forText: "sample") .font(UIFont.boldSystemFont(ofSize: 20), forText: "This") .kernSpacing(-1, forText: "text") .strikeThrough(2, forText: "shows") .strikeThroughColor(UIColor.blue) .underline(2, forText: "attributes") - + .paragraphStyle({ + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.lineSpacing = 30 + paragraphStyle.alignment = .center + return paragraphStyle + }()) } } diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 07d1718..2f1ea5f 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -242,7 +242,12 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 1000; + TargetAttributes = { + 00BE248DC4A5943C771442D86059BDFD = { + LastSwiftMigration = 1000; + }; + }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -319,7 +324,7 @@ PRODUCT_NAME = ChainedAttributedString; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -330,6 +335,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 149054C495E8EC590CAB4C524133016F /* Pods-Example.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -366,6 +372,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = E512A5F985F876750237FD237C3AEEDA /* Pods-Example.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -406,20 +413,32 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; + 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_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", @@ -450,19 +469,31 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; + 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_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", @@ -476,6 +507,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SYMROOT = "${SRCROOT}/../build"; VALIDATE_PRODUCT = YES; }; @@ -507,7 +539,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = "";