diff --git a/.swift-version b/.swift-version index 5186d07..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0 +4.2 diff --git a/.travis.yml b/.travis.yml index 1b64408..60a57b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ # * https://github.com/supermarin/xcpretty#usage language: objective-c -osx_image: xcode9 +osx_image: xcode10 # cache: cocoapods # podfile: Example/Podfile @@ -12,5 +12,5 @@ before_install: - pod install --project-directory=Example script: -- set -o pipefail && travis_retry xcodebuild test -project Yoshi/Yoshi.xcodeproj -scheme YoshiTests -destination 'platform=iOS Simulator,name=iPhone 6,OS=11.0' | xcpretty +- set -o pipefail && travis_retry xcodebuild test -project Yoshi/Yoshi.xcodeproj -scheme YoshiTests -destination 'platform=iOS Simulator,name=iPhone 8,OS=12.0' | xcpretty - pod lib lint --allow-warnings diff --git a/Example/Podfile b/Example/Podfile index 3bd3daf..5a6670c 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' +platform :ios, '12.0' use_frameworks! target 'YoshiExample' do diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 99785f3..8c22104 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 (3.0.0-beta.2) + - Yoshi/QAKit (3.0.0-beta.2): - 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: 1e0f101768c6f2d0cc289f64b065f54bc732d60a -PODFILE CHECKSUM: 3e1269998b54f9d27d611d2231c251556652c10a +PODFILE CHECKSUM: 6937f5f3704e17fb013434d20f6bd261b2e48f51 -COCOAPODS: 1.2.0 +COCOAPODS: 1.5.3 diff --git a/Example/YoshiExample.xcodeproj/project.pbxproj b/Example/YoshiExample.xcodeproj/project.pbxproj index 1657ddd..6470c31 100644 --- a/Example/YoshiExample.xcodeproj/project.pbxproj +++ b/Example/YoshiExample.xcodeproj/project.pbxproj @@ -207,9 +207,12 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/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; @@ -222,9 +225,12 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/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; @@ -237,13 +243,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 */ @@ -333,6 +342,7 @@ OTHER_SWIFT_FLAGS = "-D DEBUG"; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -378,6 +388,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; VALIDATE_PRODUCT = YES; }; name = Release; @@ -386,7 +397,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 611645F651489CBB0C351E8B /* Pods-YoshiExample.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -402,7 +412,6 @@ SWIFT_OBJC_BRIDGING_HEADER = "YoshiExample/YoshiExample-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -411,7 +420,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 4B69EFE97A45841AA3569F78 /* Pods-YoshiExample.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -427,7 +435,6 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "YoshiExample/YoshiExample-Bridging-Header.h"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; 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..d6b31ba 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 = "3.0.0-beta.2" s.summary = "A helpful companion for your iOS app." # This description is used to generate tags and improve search results. diff --git a/Yoshi/Yoshi.xcodeproj/project.pbxproj b/Yoshi/Yoshi.xcodeproj/project.pbxproj index f3f9226..f42c373 100644 --- a/Yoshi/Yoshi.xcodeproj/project.pbxproj +++ b/Yoshi/Yoshi.xcodeproj/project.pbxproj @@ -574,7 +574,7 @@ SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -594,7 +594,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/Yoshi/Yoshi/Menus/Protocols/YoshiMenu/YoshiMenuCellDataSource.swift b/Yoshi/Yoshi/Menus/Protocols/YoshiMenu/YoshiMenuCellDataSource.swift index 4b9bc20..ca72beb 100644 --- a/Yoshi/Yoshi/Menus/Protocols/YoshiMenu/YoshiMenuCellDataSource.swift +++ b/Yoshi/Yoshi/Menus/Protocols/YoshiMenu/YoshiMenuCellDataSource.swift @@ -14,14 +14,14 @@ public struct YoshiMenuCellDataSource: YoshiReusableCellDataSource { private let subtitle: String? - private let accessoryType: UITableViewCellAccessoryType + private let accessoryType: UITableViewCell.AccessoryType /// Initalize the YoshiMenuCellDataSource instance /// /// - Parameters: /// - title: Main title for the cell /// - subtitle: Subtitle for the cell - public init(title: String, subtitle: String?, accessoryType: UITableViewCellAccessoryType = .none) { + public init(title: String, subtitle: String?, accessoryType: UITableViewCell.AccessoryType = .none) { self.title = title self.subtitle = subtitle self.accessoryType = accessoryType diff --git a/Yoshi/Yoshi/Menus/YoshiSingleSelectionMenu/YoshiSingleSelectionMenu.swift b/Yoshi/Yoshi/Menus/YoshiSingleSelectionMenu/YoshiSingleSelectionMenu.swift index 462d4d6..1ebb61b 100644 --- a/Yoshi/Yoshi/Menus/YoshiSingleSelectionMenu/YoshiSingleSelectionMenu.swift +++ b/Yoshi/Yoshi/Menus/YoshiSingleSelectionMenu/YoshiSingleSelectionMenu.swift @@ -13,7 +13,7 @@ public typealias YoshiSingleSelection = (title: String, subtitle: String?) /// Once provided with initial selection and options, Yoshi will maintain the selection and present them in a tableview. open class YoshiSingleSelectionMenu: YoshiSubmenu { - open let title: String + public let title: String open var subtitle: String? { return availableSelections[selectedIndex].title diff --git a/Yoshi/Yoshi/Utility/Extensions/UIWindowExtension.swift b/Yoshi/Yoshi/Utility/Extensions/UIWindowExtension.swift index 08400d5..c0e10af 100644 --- a/Yoshi/Yoshi/Utility/Extensions/UIWindowExtension.swift +++ b/Yoshi/Yoshi/Utility/Extensions/UIWindowExtension.swift @@ -27,7 +27,7 @@ extension UIWindow { return 60 } - override open func motionBegan(_ motion: UIEventSubtype, with event: UIEvent?) { + override open func motionBegan(_ motion: UIEvent.EventSubtype, with event: UIEvent?) { Yoshi.motionBegan(motion, withEvent: event) } diff --git a/Yoshi/Yoshi/Yoshi.swift b/Yoshi/Yoshi/Yoshi.swift index 9566044..b134fef 100644 --- a/Yoshi/Yoshi/Yoshi.swift +++ b/Yoshi/Yoshi/Yoshi.swift @@ -29,7 +29,7 @@ public final class Yoshi { - parameter motion: (UIEventSubtype) the motion captured by the original motionBegan call - parameter event: (UIEvent) the event captured by the original motionBegan call */ - public class func motionBegan(_ motion: UIEventSubtype, withEvent event: UIEvent?) { + public class func motionBegan(_ motion: UIEvent.EventSubtype, withEvent event: UIEvent?) { guard motion == .motionShake && YoshiConfigurationManager.sharedInstance.shouldShow(.shakeMotionGesture) else { return diff --git a/Yoshi/Yoshi/YoshiConfigurationManager.swift b/Yoshi/Yoshi/YoshiConfigurationManager.swift index 6328037..ee9c09d 100644 --- a/Yoshi/Yoshi/YoshiConfigurationManager.swift +++ b/Yoshi/Yoshi/YoshiConfigurationManager.swift @@ -54,7 +54,7 @@ internal final class YoshiConfigurationManager { } let window = UIWindow(frame: UIScreen.main.bounds) - window.windowLevel = UIWindowLevelNormal + window.windowLevel = .normal // Use a dummy view controller with clear background. // This way, we can make the actual view controller we want to present a form sheet on the iPad.