Skip to content

Commit 73e524f

Browse files
Vermeer, EdwinVermeer, Edwin
authored andcommitted
Fix for Swift 4
1 parent 86019c5 commit 73e524f

File tree

7 files changed

+69
-27
lines changed

7 files changed

+69
-27
lines changed

AppMessage/AppMessage.xcodeproj/project.pbxproj

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
TargetAttributes = {
281281
7F434A2219628D490081F35C = {
282282
CreatedOnToolsVersion = 6.0;
283-
DevelopmentTeam = 443FV7F3ZK;
283+
DevelopmentTeam = NFYKDD8CR4;
284284
LastSwiftMigration = 0800;
285285
SystemCapabilities = {
286286
com.apple.BackgroundModes = {
@@ -359,9 +359,30 @@
359359
files = (
360360
);
361361
inputPaths = (
362+
"${SRCROOT}/../Pods/Target Support Files/Pods-AppMessage/Pods-AppMessage-frameworks.sh",
363+
"${BUILT_PRODUCTS_DIR}/AsyncSwift/Async.framework",
364+
"${BUILT_PRODUCTS_DIR}/CRToast/CRToast.framework",
365+
"${BUILT_PRODUCTS_DIR}/EVCloudKitDao-iOS/EVCloudKitDao.framework",
366+
"${BUILT_PRODUCTS_DIR}/EVReflection-iOS/EVReflection.framework",
367+
"${BUILT_PRODUCTS_DIR}/JSQMessagesViewController/JSQMessagesViewController.framework",
368+
"${BUILT_PRODUCTS_DIR}/JSQSystemSoundPlayer/JSQSystemSoundPlayer.framework",
369+
"${BUILT_PRODUCTS_DIR}/SwiftLocation/SwiftLocation.framework",
370+
"${BUILT_PRODUCTS_DIR}/UIImage-Resize/UIImage_Resize.framework",
371+
"${BUILT_PRODUCTS_DIR}/UzysAssetsPickerController/UzysAssetsPickerController.framework",
372+
"${BUILT_PRODUCTS_DIR}/VIPhotoView/VIPhotoView.framework",
362373
);
363374
name = "[CP] Embed Pods Frameworks";
364375
outputPaths = (
376+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Async.framework",
377+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CRToast.framework",
378+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EVCloudKitDao.framework",
379+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EVReflection.framework",
380+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JSQMessagesViewController.framework",
381+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JSQSystemSoundPlayer.framework",
382+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftLocation.framework",
383+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/UIImage_Resize.framework",
384+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/UzysAssetsPickerController.framework",
385+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/VIPhotoView.framework",
365386
);
366387
runOnlyForDeploymentPostprocessing = 0;
367388
shellPath = /bin/sh;
@@ -374,13 +395,16 @@
374395
files = (
375396
);
376397
inputPaths = (
398+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
399+
"${PODS_ROOT}/Manifest.lock",
377400
);
378401
name = "[CP] Check Pods Manifest.lock";
379402
outputPaths = (
403+
"$(DERIVED_FILE_DIR)/Pods-AppMessage-checkManifestLockResult.txt",
380404
);
381405
runOnlyForDeploymentPostprocessing = 0;
382406
shellPath = /bin/sh;
383-
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";
407+
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";
384408
showEnvVarsInLog = 0;
385409
};
386410
/* End PBXShellScriptBuildPhase section */
@@ -458,7 +482,7 @@
458482
ONLY_ACTIVE_ARCH = YES;
459483
SDKROOT = iphoneos;
460484
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
461-
SWIFT_VERSION = 3.0;
485+
SWIFT_VERSION = 4.0;
462486
TARGETED_DEVICE_FAMILY = "1,2";
463487
};
464488
name = Debug;
@@ -498,7 +522,7 @@
498522
METAL_ENABLE_DEBUG_INFO = NO;
499523
SDKROOT = iphoneos;
500524
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
501-
SWIFT_VERSION = 3.0;
525+
SWIFT_VERSION = 4.0;
502526
TARGETED_DEVICE_FAMILY = "1,2";
503527
VALIDATE_PRODUCT = YES;
504528
};
@@ -514,15 +538,16 @@
514538
CODE_SIGN_ENTITLEMENTS = AppMessage/AppMessage.entitlements;
515539
CODE_SIGN_IDENTITY = "iPhone Developer";
516540
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
541+
DEVELOPMENT_TEAM = NFYKDD8CR4;
517542
INFOPLIST_FILE = AppMessage/Info.plist;
518543
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
519544
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
520-
PRODUCT_BUNDLE_IDENTIFIER = "nl.mirabeau.${PRODUCT_NAME:rfc1034identifier}";
545+
PRODUCT_BUNDLE_IDENTIFIER = nl.clockwork.AppMessage;
521546
PRODUCT_NAME = "$(TARGET_NAME)";
522547
PROVISIONING_PROFILE = "";
523548
SWIFT_OBJC_BRIDGING_HEADER = "AppMessage/AppMessage-Bridging-Header.h";
524549
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
525-
SWIFT_VERSION = 3.0;
550+
SWIFT_VERSION = 4.0;
526551
TARGETED_DEVICE_FAMILY = "1,2";
527552
};
528553
name = Debug;
@@ -537,14 +562,15 @@
537562
CODE_SIGN_ENTITLEMENTS = AppMessage/AppMessage.entitlements;
538563
CODE_SIGN_IDENTITY = "iPhone Developer";
539564
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
565+
DEVELOPMENT_TEAM = NFYKDD8CR4;
540566
INFOPLIST_FILE = AppMessage/Info.plist;
541567
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
542568
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
543-
PRODUCT_BUNDLE_IDENTIFIER = "nl.mirabeau.${PRODUCT_NAME:rfc1034identifier}";
569+
PRODUCT_BUNDLE_IDENTIFIER = nl.clockwork.AppMessage;
544570
PRODUCT_NAME = "$(TARGET_NAME)";
545571
PROVISIONING_PROFILE = "";
546572
SWIFT_OBJC_BRIDGING_HEADER = "AppMessage/AppMessage-Bridging-Header.h";
547-
SWIFT_VERSION = 3.0;
573+
SWIFT_VERSION = 4.0;
548574
TARGETED_DEVICE_FAMILY = "1,2";
549575
};
550576
name = Release;

AppMessage/AppMessage/Controlers/ChatViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class ChatViewController: JSQMessagesViewController, UIActionSheetDelegate, Uzys
423423
} else {
424424
cell.textView!.textColor = UIColor.white
425425
}
426-
cell.textView!.linkTextAttributes = [NSForegroundColorAttributeName : cell.textView!.textColor!, NSUnderlineStyleAttributeName : NSUnderlineStyle.styleSingle.rawValue]
426+
cell.textView!.linkTextAttributes = [NSAttributedStringKey.foregroundColor.rawValue : cell.textView!.textColor!, NSAttributedStringKey.underlineStyle.rawValue : NSUnderlineStyle.styleSingle.rawValue]
427427
}
428428
return cell
429429
}

AppMessage/AppMessage/Controlers/TestsViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ class TestsViewController: UIViewController {
241241
return results.count < 200 // Continue reading if we have less than 200 records and if there are more.
242242
}, insertedHandler: { item in
243243
EVLog("inserted \(item)")
244-
}, updatedHandler: { item in
244+
}, updatedHandler: { item, index in
245245
EVLog("updated \(item)")
246-
}, deletedHandler: { recordId in
246+
}, deletedHandler: { recordId, index in
247247
EVLog("deleted : \(recordId)")
248248
}, errorHandler: { error in
249249
EVLog("<--- ERROR connect")

AppMessage/AppMessage/SSASideMenu.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class SSASideMenu: UIViewController, UIGestureRecognizerDelegate {
203203
@IBInspectable var bouncesHorizontally: Bool = true
204204

205205
// MARK : Public Properties: MenuView
206-
@IBInspectable var statusBarStyle: SSAStatusBarStyle = .black
206+
var statusBarStyle: SSAStatusBarStyle = .black
207207

208208
// MARK : Private Properties: ContentView
209209
@IBInspectable var contentViewScaleValue: Float = 0.7
@@ -227,8 +227,8 @@ class SSASideMenu: UIViewController, UIGestureRecognizerDelegate {
227227
// MARK : Public Properties: SideMenu
228228
@IBInspectable var animationDuration: Float = 0.35
229229
@IBInspectable var panGestureEnabled: Bool = true
230-
@IBInspectable var panDirection: SSASideMenuPanDirection = .edge
231-
@IBInspectable var type: SSASideMenuType = .scale
230+
var panDirection: SSASideMenuPanDirection = .edge
231+
var type: SSASideMenuType = .scale
232232
@IBInspectable var panMinimumOpenThreshold: UInt = 60
233233
@IBInspectable var menuViewControllerTransformation: CGAffineTransform = CGAffineTransform(scaleX: 1.5, y:1.5)
234234
@IBInspectable var backgroundTransformation: CGAffineTransform = CGAffineTransform(scaleX: 1.7, y:1.7)
@@ -345,7 +345,7 @@ class SSASideMenu: UIViewController, UIGestureRecognizerDelegate {
345345
showRightMenuViewController()
346346
}
347347

348-
func hideMenuViewController() {
348+
@objc func hideMenuViewController() {
349349
hideMenuViewController(true)
350350
}
351351

@@ -929,7 +929,7 @@ class SSASideMenu: UIViewController, UIGestureRecognizerDelegate {
929929
return true
930930
}
931931

932-
func panGestureRecognized(_ recognizer: UIPanGestureRecognizer) {
932+
@objc func panGestureRecognized(_ recognizer: UIPanGestureRecognizer) {
933933

934934
delegate?.sideMenuDidRecognizePanGesture?(self, recongnizer: recognizer)
935935

Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ PODS:
33
- CRToast (0.0.9)
44
- EVCloudKitDao (3.3.3):
55
- EVReflection/CloudKit
6-
- EVReflection/CloudKit (4.16.3):
6+
- EVReflection/CloudKit (4.17.2):
77
- EVReflection/Core
8-
- EVReflection/Core (4.16.3)
9-
- JSQMessagesViewController (7.3.4):
8+
- EVReflection/Core (4.17.2)
9+
- JSQMessagesViewController (7.3.5):
1010
- JSQSystemSoundPlayer (~> 2.0.1)
1111
- JSQSystemSoundPlayer (2.0.1)
1212
- SwiftLocation (2.0.7)
@@ -32,8 +32,8 @@ SPEC CHECKSUMS:
3232
AsyncSwift: 632138e42ead868b53c745fcde9bf733ce1527ad
3333
CRToast: 5a78c22b921c5ed3487488af605bc403a9c92fed
3434
EVCloudKitDao: c5581a82ab0304be33e3a80bfe49953508b52d7d
35-
EVReflection: 78a60b3c628a2e765652cdc554a903a3e40b16c8
36-
JSQMessagesViewController: 39fed975e3c9f8eba7292071e29eeb541d105e66
35+
EVReflection: e01af7fff66f12a4223595cf2f3cab393c3575a1
36+
JSQMessagesViewController: 6587f56aedbcb150a8ba1d968e1ef58b1bc758b7
3737
JSQSystemSoundPlayer: c5850e77a4363ffd374cd851154b9af93264ed8d
3838
SwiftLocation: 1fe2e15a5812e961496e82eeaca71d03e829e47a
3939
UIImage-Resize: fa776860f10e6900bbaf53a73e494bdceaaccc77
@@ -42,4 +42,4 @@ SPEC CHECKSUMS:
4242

4343
PODFILE CHECKSUM: 4fef42d1ae6c4f432dcaa117df3e1accfa55a1a6
4444

45-
COCOAPODS: 1.2.1
45+
COCOAPODS: 1.3.0

Source/EVCloudData.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private class DataContainerWrapper {
4646
/**
4747
Class for access to Apple's CloudKit data the easiest way possible
4848
*/
49-
open class EVCloudData: NSObject {
49+
open class EVCloudData: EVObject {
5050

5151
// ------------------------------------------------------------------------
5252
// MARK: - Initialisation
@@ -136,7 +136,7 @@ open class EVCloudData: NSObject {
136136
/**
137137
Overriding the default innit so that we can startup a timer when this is initialized. The timer is used for delayed cashing. For more info see the casching strategies.
138138
*/
139-
override init() {
139+
required public init() {
140140
super.init()
141141
Timer.scheduledTimer(timeInterval: 60, target: self, selector: #selector(EVCloudData.backupAllData), userInfo: nil, repeats: true)
142142
}
@@ -627,7 +627,7 @@ open class EVCloudData: NSObject {
627627
:return: No return value
628628
*/
629629
@discardableResult
630-
open func connect<T:CKDataObject>(
630+
open func connect<T: CKDataObject>(
631631
_ type: T,
632632
predicate: NSPredicate,
633633
orderBy: OrderBy = Descending(field: "creationDate"),

UnitTests/UnitTests.xcodeproj/project.pbxproj

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,14 @@
204204
files = (
205205
);
206206
inputPaths = (
207+
"${SRCROOT}/../Pods/Target Support Files/Pods-OSXTest/Pods-OSXTest-frameworks.sh",
208+
"${BUILT_PRODUCTS_DIR}/EVCloudKitDao-macOS/EVCloudKitDao.framework",
209+
"${BUILT_PRODUCTS_DIR}/EVReflection-macOS/EVReflection.framework",
207210
);
208211
name = "[CP] Embed Pods Frameworks";
209212
outputPaths = (
213+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EVCloudKitDao.framework",
214+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EVReflection.framework",
210215
);
211216
runOnlyForDeploymentPostprocessing = 0;
212217
shellPath = /bin/sh;
@@ -234,13 +239,16 @@
234239
files = (
235240
);
236241
inputPaths = (
242+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
243+
"${PODS_ROOT}/Manifest.lock",
237244
);
238245
name = "[CP] Check Pods Manifest.lock";
239246
outputPaths = (
247+
"$(DERIVED_FILE_DIR)/Pods-OSXTest-checkManifestLockResult.txt",
240248
);
241249
runOnlyForDeploymentPostprocessing = 0;
242250
shellPath = /bin/sh;
243-
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";
251+
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";
244252
showEnvVarsInLog = 0;
245253
};
246254
ADE99A687A8D897407B383BE /* [CP] Embed Pods Frameworks */ = {
@@ -249,9 +257,14 @@
249257
files = (
250258
);
251259
inputPaths = (
260+
"${SRCROOT}/../Pods/Target Support Files/Pods-tvOSTest/Pods-tvOSTest-frameworks.sh",
261+
"${BUILT_PRODUCTS_DIR}/EVCloudKitDao-tvOS/EVCloudKitDao.framework",
262+
"${BUILT_PRODUCTS_DIR}/EVReflection-tvOS/EVReflection.framework",
252263
);
253264
name = "[CP] Embed Pods Frameworks";
254265
outputPaths = (
266+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EVCloudKitDao.framework",
267+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EVReflection.framework",
255268
);
256269
runOnlyForDeploymentPostprocessing = 0;
257270
shellPath = /bin/sh;
@@ -264,13 +277,16 @@
264277
files = (
265278
);
266279
inputPaths = (
280+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
281+
"${PODS_ROOT}/Manifest.lock",
267282
);
268283
name = "[CP] Check Pods Manifest.lock";
269284
outputPaths = (
285+
"$(DERIVED_FILE_DIR)/Pods-tvOSTest-checkManifestLockResult.txt",
270286
);
271287
runOnlyForDeploymentPostprocessing = 0;
272288
shellPath = /bin/sh;
273-
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";
289+
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";
274290
showEnvVarsInLog = 0;
275291
};
276292
B9C7438CE2E2DFE1691BC7F4 /* [CP] Copy Pods Resources */ = {

0 commit comments

Comments
 (0)