Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Commit 51a1f65

Browse files
authored
Merge pull request #252 from Lickability/migrate-swift-4.2
Upgrades project to Xcode 10 and Swift 4.2
2 parents 79dbc24 + 533d95c commit 51a1f65

23 files changed

+65
-65
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1
1+
4.2

Example/PinpointKitExample.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
TargetAttributes = {
126126
DA19C3E31C67D4420016861F = {
127127
CreatedOnToolsVersion = 7.2.1;
128-
LastSwiftMigration = 0800;
128+
LastSwiftMigration = 1000;
129129
};
130130
};
131131
};
@@ -357,7 +357,7 @@
357357
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
358358
PRODUCT_BUNDLE_IDENTIFIER = net.Lickability.PinpointKitExample;
359359
PRODUCT_NAME = "$(TARGET_NAME)";
360-
SWIFT_VERSION = 4.0;
360+
SWIFT_VERSION = 4.2;
361361
};
362362
name = Debug;
363363
};
@@ -371,7 +371,7 @@
371371
PRODUCT_BUNDLE_IDENTIFIER = net.Lickability.PinpointKitExample;
372372
PRODUCT_NAME = "$(TARGET_NAME)";
373373
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
374-
SWIFT_VERSION = 4.0;
374+
SWIFT_VERSION = 4.2;
375375
};
376376
name = Release;
377377
};

Example/PinpointKitExample/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
NSLog("Initial test log for the system logger.")
1919
return true
2020
}

Example/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 16 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PinpointKit/PinpointKit.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@
689689
PRODUCT_NAME = "$(TARGET_NAME)";
690690
SKIP_INSTALL = YES;
691691
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
692-
SWIFT_VERSION = 4.0;
692+
SWIFT_VERSION = 4.2;
693693
};
694694
name = Debug;
695695
};
@@ -709,7 +709,7 @@
709709
PRODUCT_BUNDLE_IDENTIFIER = net.Lickability.PinpointKit;
710710
PRODUCT_NAME = "$(TARGET_NAME)";
711711
SKIP_INSTALL = YES;
712-
SWIFT_VERSION = 4.0;
712+
SWIFT_VERSION = 4.2;
713713
};
714714
name = Release;
715715
};

PinpointKit/PinpointKit/Sources/Core/AnnotationsView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class AnnotationsView: UIView {
1515
moveViewIfAppropriate(view)
1616
}
1717

18-
override func bringSubview(toFront view: UIView) {
19-
super.bringSubview(toFront: view)
18+
override func bringSubviewToFront(_ view: UIView) {
19+
super.bringSubviewToFront(view)
2020
moveViewIfAppropriate(view)
2121
}
2222

PinpointKit/PinpointKit/Sources/Core/BlurAnnotationView.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ open class BlurAnnotationView: AnnotationView, GLKViewDelegate {
5353
let maximumWidth = max(4.0, min(size.width, size.height) * 0.075)
5454
let outsideStrokeWidth = min(maximumWidth, 14.0) * 1.5
5555

56-
return UIEdgeInsetsInsetRect(annotationFrame, UIEdgeInsets(top: -outsideStrokeWidth, left: -outsideStrokeWidth, bottom: -outsideStrokeWidth, right: -outsideStrokeWidth))
56+
return annotationFrame.inset(by: UIEdgeInsets(top: -outsideStrokeWidth, left: -outsideStrokeWidth, bottom: -outsideStrokeWidth, right: -outsideStrokeWidth))
5757
}
5858

5959
// MARK: - Initializers
@@ -68,9 +68,7 @@ open class BlurAnnotationView: AnnotationView, GLKViewDelegate {
6868
if let EAGLContext = OpenGLES.EAGLContext(api: .openGLES2) {
6969
self.EAGLContext = EAGLContext
7070
GLKView = GLKit.GLKView(frame: bounds, context: EAGLContext)
71-
CIContext = CoreImage.CIContext(eaglContext: EAGLContext, options: [
72-
kCIContextUseSoftwareRenderer: false
73-
])
71+
CIContext = CoreImage.CIContext(eaglContext: EAGLContext, options: [.useSoftwareRenderer: false])
7472
} else {
7573
EAGLContext = nil
7674
GLKView = nil

PinpointKit/PinpointKit/Sources/Core/CheckmarkCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class CheckmarkCell: UITableViewCell {
1818
}
1919
}
2020

21-
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
21+
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
2222
super.init(style: style, reuseIdentifier: reuseIdentifier)
2323

2424
imageView?.image = UIImage(named: "Checkmark", in: Bundle(for: type(of: self)), compatibleWith: nil)

PinpointKit/PinpointKit/Sources/Core/Editing/AnnotationViewFactory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct AnnotationViewFactory {
2222
let strokeColor: UIColor
2323

2424
/// The text attributes of the annotation.
25-
let textAttributes: [String: AnyObject]
25+
let textAttributes: [NSAttributedString.Key: AnyObject]
2626

2727
/**
2828
Constructs an annotation view.

0 commit comments

Comments
 (0)