Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit 8494ea5

Browse files
committed
Swift 4.2 migration
1 parent 6a1d4ab commit 8494ea5

File tree

58 files changed

+536
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+536
-295
lines changed

Customerly.xcodeproj/project.pbxproj

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@
652652
TargetAttributes = {
653653
455CE12E1DE0AABD00FF65DC = {
654654
CreatedOnToolsVersion = 8.1;
655-
LastSwiftMigration = 0820;
655+
LastSwiftMigration = 1000;
656656
ProvisioningStyle = Automatic;
657657
};
658658
455CE1371DE0AABD00FF65DC = {
@@ -662,10 +662,12 @@
662662
455CE14A1DE0AAF200FF65DC = {
663663
CreatedOnToolsVersion = 8.1;
664664
DevelopmentTeam = BVJ7983QHC;
665+
LastSwiftMigration = 1000;
665666
ProvisioningStyle = Automatic;
666667
};
667668
455CE15D1DE0AAF200FF65DC = {
668669
CreatedOnToolsVersion = 8.1;
670+
LastSwiftMigration = 1000;
669671
ProvisioningStyle = Automatic;
670672
TestTargetID = 455CE14A1DE0AAF200FF65DC;
671673
};
@@ -1088,7 +1090,7 @@
10881090
SKIP_INSTALL = YES;
10891091
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
10901092
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1091-
SWIFT_VERSION = 4.0;
1093+
SWIFT_VERSION = 4.2;
10921094
TARGETED_DEVICE_FAMILY = "1,2";
10931095
VERSIONING_SYSTEM = "apple-generic";
10941096
VERSION_INFO_PREFIX = "";
@@ -1146,7 +1148,7 @@
11461148
SDKROOT = iphoneos;
11471149
SKIP_INSTALL = YES;
11481150
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1149-
SWIFT_VERSION = 4.0;
1151+
SWIFT_VERSION = 4.2;
11501152
TARGETED_DEVICE_FAMILY = "1,2";
11511153
VALIDATE_PRODUCT = YES;
11521154
VERSIONING_SYSTEM = "apple-generic";
@@ -1311,7 +1313,7 @@
13111313
SDKROOT = iphoneos;
13121314
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
13131315
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1314-
SWIFT_VERSION = 4.0;
1316+
SWIFT_VERSION = 4.2;
13151317
TARGETED_DEVICE_FAMILY = "1,2";
13161318
};
13171319
name = Debug;
@@ -1362,7 +1364,7 @@
13621364
PRODUCT_NAME = "$(TARGET_NAME)";
13631365
SDKROOT = iphoneos;
13641366
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1365-
SWIFT_VERSION = 4.0;
1367+
SWIFT_VERSION = 4.2;
13661368
TARGETED_DEVICE_FAMILY = "1,2";
13671369
VALIDATE_PRODUCT = YES;
13681370
};
@@ -1419,7 +1421,7 @@
14191421
SDKROOT = iphoneos;
14201422
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
14211423
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1422-
SWIFT_VERSION = 4.0;
1424+
SWIFT_VERSION = 4.2;
14231425
TEST_TARGET_NAME = CustomerlyDemo;
14241426
};
14251427
name = Debug;
@@ -1467,7 +1469,7 @@
14671469
PRODUCT_NAME = "$(TARGET_NAME)";
14681470
SDKROOT = iphoneos;
14691471
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1470-
SWIFT_VERSION = 4.0;
1472+
SWIFT_VERSION = 4.2;
14711473
TEST_TARGET_NAME = CustomerlyDemo;
14721474
VALIDATE_PRODUCT = YES;
14731475
};
Binary file not shown.

CustomerlyDemo/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414

1515
var window: UIWindow?
1616

17-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1818
// Override point for customization after application launch.
1919

2020
Customerly.sharedInstance.configure(appId: "008bc975")

CustomerlyDemo/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>CFBundlePackageType</key>
2222
<string>APPL</string>
2323
<key>CFBundleShortVersionString</key>
24-
<string>2.1.0</string>
24+
<string>2.2.0</string>
2525
<key>CFBundleVersion</key>
2626
<string>1</string>
2727
<key>LSRequiresIPhoneOS</key>

CustomerlySDK.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "CustomerlySDK"
3-
s.version = "2.1.0"
3+
s.version = "2.2.0"
44
s.summary = "customerly.io is the perfect tool to getting closer to your customers"
55
s.description = <<-DESC
66
customerly.io is the perfect tool to getting closer to your customers. Help them where they are with the customer support widget. Manage your audience based on their behaviours, build campaigns and automations.
@@ -21,7 +21,7 @@ Pod::Spec.new do |s|
2121
s.module_name = 'CustomerlySDK'
2222
s.frameworks = "UIKit", "Foundation", "AudioToolbox"
2323
s.requires_arc = true
24-
s.dependency 'ObjectMapper', '3.2.0'
25-
s.dependency 'Kingfisher', '4.8.0'
26-
s.dependency 'Socket.IO-Client-Swift', '13.2.1'
24+
s.dependency 'ObjectMapper', '3.3.0'
25+
s.dependency 'Kingfisher', '4.10.0'
26+
s.dependency 'Socket.IO-Client-Swift', '13.3.0'
2727
end

CustomerlySDK/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.1.0</string>
18+
<string>2.2.0</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

CustomerlySDK/Library/Customerly.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Kingfisher
1010

1111
@objc @objcMembers open class Customerly: NSObject {
1212

13-
open static let sharedInstance = Customerly()
13+
public static let sharedInstance = Customerly()
1414
var customerlyAppId: String = ""
1515
var customerlyIsOpen = false
1616
var bannerMessages: [CyMessageModel] = []

CustomerlySDK/Library/CyBanner.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class CyBanner: CyView {
6262

6363
class func topWindow() -> UIWindow? {
6464
for window in UIApplication.shared.windows.reversed() {
65-
if window.windowLevel == UIWindowLevelNormal && !window.isHidden && window.frame != CGRect.zero { return window }
65+
if window.windowLevel == UIWindow.Level.normal && !window.isHidden && window.frame != CGRect.zero { return window }
6666
}
6767
return nil
6868
}

CustomerlySDK/Library/Models/CyMessageModel.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,19 @@ class CyMessageModel: Mappable {
8383
attachment.bounds.size = CGSize(width: 50, height: 39)
8484

8585
let attributedAttachment = NSAttributedString(attachment: attachment)
86-
let attributedText = NSAttributedString(string: "\n\n\("chatViewRichMessageText".localized(comment: "Chat View"))\n", attributes: [NSAttributedStringKey.foregroundColor:UIColor(hexString:"#1A1A1A")])
86+
let attributedText = NSAttributedString(string: "\n\n\("chatViewRichMessageText".localized(comment: "Chat View"))\n", attributes: [NSAttributedString.Key.foregroundColor:UIColor(hexString:"#1A1A1A")])
8787

8888

8989
let attributedString = NSMutableAttributedString()
9090
attributedString.append(attributedAttachment)
9191
attributedString.append(attributedText)
9292

93-
attributedString.enumerateAttribute(NSAttributedStringKey.attachment, in: NSRange(location: 0, length: attributedString.length)) { (attribute, range, stop) -> Void in
93+
attributedString.enumerateAttribute(NSAttributedString.Key.attachment, in: NSRange(location: 0, length: attributedString.length)) { (attribute, range, stop) -> Void in
9494
if (attribute as? NSTextAttachment) != nil {
9595
//center all attachments in attributed string
9696
let paragraphStyle = NSMutableParagraphStyle()
9797
paragraphStyle.alignment = .center
98-
attributedString.addAttribute(NSAttributedStringKey.paragraphStyle, value: paragraphStyle, range: range)
98+
attributedString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: range)
9999
}
100100
}
101101
return attributedString

CustomerlySDK/Library/Subclasses/CyButton.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ class CyButton: UIButton {
5555
self.layer.shadowRadius = self.shadowRadius
5656

5757
if checkboxButton == true{
58-
self.setImage(self.uncheckedImage, for: UIControlState.normal)
59-
self.setImage(self.checkedImage, for: UIControlState.selected)
60-
self.addTarget(self, action: #selector(buttonChecked), for: UIControlEvents.touchUpInside)
58+
self.setImage(self.uncheckedImage, for: UIControl.State.normal)
59+
self.setImage(self.checkedImage, for: UIControl.State.selected)
60+
self.addTarget(self, action: #selector(buttonChecked), for: UIControl.Event.touchUpInside)
6161
}
6262

6363
}

0 commit comments

Comments
 (0)