From 2afa48adc316fee0f6255466d9e7e8ca909b2a08 Mon Sep 17 00:00:00 2001 From: Mohseen Shaikh Date: Thu, 7 Nov 2019 17:29:42 +0530 Subject: [PATCH] Swift 5 migration --- Example/.DS_Store | Bin 0 -> 6148 bytes Example/Podfile.lock | 12 +++++--- .../YoshiExample.xcodeproj/project.pbxproj | 20 ++++++++++---- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++ Example/YoshiExample/AppDelegate.swift | 4 +-- Yoshi.podspec | 2 +- Yoshi/.DS_Store | Bin 0 -> 6148 bytes Yoshi/Yoshi.xcodeproj/project.pbxproj | 19 +++++++++---- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++ .../xcshareddata/xcschemes/Yoshi.xcscheme | 26 +++++++----------- .../xcschemes/YoshiTests.xcscheme | 8 +----- .../YoshiMenu/YoshiMenuCellDataSource.swift | 4 +-- .../YoshiSingleSelectionMenu.swift | 2 +- .../Extensions/UIWindowExtension.swift | 2 +- Yoshi/Yoshi/Yoshi.swift | 2 +- Yoshi/Yoshi/YoshiConfigurationManager.swift | 2 +- 16 files changed, 72 insertions(+), 47 deletions(-) create mode 100644 Example/.DS_Store create mode 100644 Example/YoshiExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Yoshi/.DS_Store create mode 100644 Yoshi/Yoshi.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Example/.DS_Store b/Example/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b1fb97f4e76efa23d2cc6e74ee91ea79214c252a GIT binary patch literal 6148 zcmeHK!AiqG5S`H+f?j&k9^(%P{exK2qagI;P1_XP+K^BYy$HGb5njFc2Z9Iv7*BqJ z2jA=tH6e<$f=HQxnK#+pnJ_QxPL_zcdzp5KT0|5=1%oY^FGS`=8?vDzGRZE-gnD#M zr<76ASZxEwfHCmj7?8cYL&ucU1&yh?e`hqJeeC8T=2G|t&EZXFXPy2q&vbtu?JXOh zRQb4jd7El2E9Cj)CuN1>*a&>&8#;Rc5g@i z$So(1J(@KJjDb1>oBpvS{lEA9{l6Y$PsV^TuvQFkko1!-O48oiC{B891U-R@$hy*_ j3xUyg>>O#uZKxB>MdAQs#nK~2Aoe5RXfR_8{3!z;v1Wsn literal 0 HcmV?d00001 diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 99785f3..7e233a3 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,21 +1,25 @@ PODS: - Instabug (5.2.4) - - Yoshi/Core (2.2.2) - - Yoshi/QAKit (2.2.2): + - Yoshi/Core (4.0.0) + - Yoshi/QAKit (4.0.0): - Yoshi/Core DEPENDENCIES: - Instabug (= 5.2.4) - Yoshi/QAKit (from `../`) +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - Instabug + EXTERNAL SOURCES: Yoshi: :path: "../" SPEC CHECKSUMS: Instabug: 6fa40a5e2a4620f0589dfc8e4e01b1018c8c42b1 - Yoshi: 032a56c87369104a3a1ee80a247e551d91bddc99 + Yoshi: efc151111ba019ff7dc82258c87a68376ec8b699 PODFILE CHECKSUM: 3e1269998b54f9d27d611d2231c251556652c10a -COCOAPODS: 1.2.0 +COCOAPODS: 1.7.5 diff --git a/Example/YoshiExample.xcodeproj/project.pbxproj b/Example/YoshiExample.xcodeproj/project.pbxproj index 1657ddd..02031b6 100644 --- a/Example/YoshiExample.xcodeproj/project.pbxproj +++ b/Example/YoshiExample.xcodeproj/project.pbxproj @@ -173,6 +173,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -207,13 +208,16 @@ files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-resources.sh", + "${PODS_ROOT}/Instabug/Instabug.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Instabug.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-resources.sh\"\n"; showEnvVarsInLog = 0; }; 9807FA47239685B35BD1B1CC /* [CP] Embed Pods Frameworks */ = { @@ -222,13 +226,16 @@ files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Yoshi/Yoshi.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Yoshi.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-YoshiExample/Pods-YoshiExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; A406AEF3198A3BAC81FB073C /* [CP] Check Pods Manifest.lock */ = { @@ -237,13 +244,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-YoshiExample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../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"; + 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 */ @@ -402,7 +412,7 @@ SWIFT_OBJC_BRIDGING_HEADER = "YoshiExample/YoshiExample-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -427,7 +437,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "YoshiExample/YoshiExample-Bridging-Header.h"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Example/YoshiExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/YoshiExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/YoshiExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/YoshiExample/AppDelegate.swift b/Example/YoshiExample/AppDelegate.swift index c6c4579..96ae593 100644 --- a/Example/YoshiExample/AppDelegate.swift +++ b/Example/YoshiExample/AppDelegate.swift @@ -19,7 +19,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. #if DEBUG @@ -87,7 +87,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // MARK: - Yoshi Invocation options // Implement the functionality you want! - override func motionBegan(_ motion: UIEventSubtype, with event: UIEvent?) { + override func motionBegan(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { Yoshi.motionBegan(motion, withEvent: event) } diff --git a/Yoshi.podspec b/Yoshi.podspec index 8c35b3c..4757575 100644 --- a/Yoshi.podspec +++ b/Yoshi.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "Yoshi" - s.version = "3.0.0-beta.1" + s.version = "4.0.0" s.summary = "A helpful companion for your iOS app." # This description is used to generate tags and improve search results. diff --git a/Yoshi/.DS_Store b/Yoshi/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2a7d9b312d8816d429177ba2484696c2d71fd27a GIT binary patch literal 6148 zcmeHKJxc>Y5Pf4(1T0KxCHo76{DUPVeIS*ckcd%~91+3tQu()i^Pyb0h@C|;12gY- zcHS=ciklk%GJRi9fH8m(T@jxe`lkEpJ-djEqSzTvxWxxn*kawQKAuqS74FD*!vU?Tu=$g~-sZI&PwO%Q8f>&OgEoJw@6#E2nIXTC&T4Qw5q4zZhg zPTVXpp@`kie6ey!bE7|DnJavfUs? literal 0 HcmV?d00001 diff --git a/Yoshi/Yoshi.xcodeproj/project.pbxproj b/Yoshi/Yoshi.xcodeproj/project.pbxproj index f3f9226..08e94cd 100644 --- a/Yoshi/Yoshi.xcodeproj/project.pbxproj +++ b/Yoshi/Yoshi.xcodeproj/project.pbxproj @@ -348,7 +348,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1100; ORGANIZATIONNAME = "Prolific Interactive"; TargetAttributes = { 276BCEA01C29A6EF002138C7 = { @@ -357,7 +357,7 @@ }; 276BCEAA1C29A6EF002138C7 = { CreatedOnToolsVersion = 7.2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1100; }; }; }; @@ -366,6 +366,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 276BCE971C29A6EF002138C7; @@ -455,6 +456,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -463,12 +465,14 @@ 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; @@ -511,6 +515,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -519,12 +524,14 @@ 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; @@ -574,7 +581,7 @@ SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -594,7 +601,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -606,7 +613,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.YoshiTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -618,7 +625,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.prolificinteractive.YoshiTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Yoshi/Yoshi.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Yoshi/Yoshi.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Yoshi/Yoshi.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Yoshi/Yoshi.xcodeproj/xcshareddata/xcschemes/Yoshi.xcscheme b/Yoshi/Yoshi.xcodeproj/xcshareddata/xcschemes/Yoshi.xcscheme index 92b844d..aac8985 100644 --- a/Yoshi/Yoshi.xcodeproj/xcshareddata/xcschemes/Yoshi.xcscheme +++ b/Yoshi/Yoshi.xcodeproj/xcshareddata/xcschemes/Yoshi.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -40,23 +48,11 @@ - - - - - - - - - - - -