From abfe3c187229eae3a15d234527f4bcb5fe7a5eac Mon Sep 17 00:00:00 2001 From: Oktawian Chojnacki Date: Thu, 12 Apr 2018 15:32:11 +0200 Subject: [PATCH] Use Swift 4.1 and target 10.0 --- .gitignore | 1 + Insomnia.podspec | 5 +- Insomnia/Insomnia.swift | 2 +- Tests/Tests.xcodeproj/project.pbxproj | 33 +++++- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ .../xcschemes/Tests.xcscheme | 102 ------------------ 6 files changed, 41 insertions(+), 110 deletions(-) create mode 100644 Tests/Tests.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 Tests/Tests.xcodeproj/xcuserdata/oktawian.xcuserdatad/xcschemes/Tests.xcscheme diff --git a/.gitignore b/.gitignore index 99b233f..751198e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store xcuserdata/* UserInterfaceState.xcuserstate +/Tests/Tests.xcodeproj/xcuserdata/ diff --git a/Insomnia.podspec b/Insomnia.podspec index 4362c8c..e0a0443 100644 --- a/Insomnia.podspec +++ b/Insomnia.podspec @@ -1,12 +1,13 @@ Pod::Spec.new do |s| s.name = "Insomnia" - s.version = "0.9.5" + s.version = "1.0.0" s.summary = "Small class to disable sleep timeout in iOS." s.description = "Sometimes you want your iPhone to stay awake a little bit longer." s.homepage = "https://github.com/ochococo/insomnia/" s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = "Oktawian Chojnacki" - s.platform = :ios, "9.0" + s.platform = :ios, "10.0" s.source = { :git => "https://github.com/ochococo/insomnia.git", :tag => "#{s.version}" } s.source_files = "Insomnia/**/*.{swift}" + s.swift_version = '4.1' end diff --git a/Insomnia/Insomnia.swift b/Insomnia/Insomnia.swift index 5102289..7d34208 100644 --- a/Insomnia/Insomnia.swift +++ b/Insomnia/Insomnia.swift @@ -1,7 +1,7 @@ // // The MIT License (MIT) // -// Copyright (c) 2016 Oktawian Chojnacki +// Copyright (c) 2016-2018 Oktawian Chojnacki // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Tests/Tests.xcodeproj/project.pbxproj b/Tests/Tests.xcodeproj/project.pbxproj index 7c266d8..5b4c70d 100644 --- a/Tests/Tests.xcodeproj/project.pbxproj +++ b/Tests/Tests.xcodeproj/project.pbxproj @@ -141,7 +141,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0820; - LastUpgradeCheck = 0820; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = "Oktawian Chojnacki"; TargetAttributes = { 1AECD9CF1E05E222003D21DC = { @@ -150,6 +150,7 @@ }; 1AECD9E31E05E222003D21DC = { CreatedOnToolsVersion = 8.2; + LastSwiftMigration = 0930; ProvisioningStyle = Automatic; TestTargetID = 1AECD9CF1E05E222003D21DC; }; @@ -251,15 +252,23 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 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_DOCUMENTATION_COMMENTS = YES; 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; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -288,6 +297,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; }; name = Debug; }; @@ -300,15 +310,23 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 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_DOCUMENTATION_COMMENTS = YES; 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; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -329,6 +347,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; VALIDATE_PRODUCT = YES; }; name = Release; @@ -341,7 +360,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.ochococo.Tests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -353,7 +372,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.ochococo.Tests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -366,7 +385,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.ochococo.TestsTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Tests.app/Tests"; }; name = Debug; @@ -380,7 +400,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.ochococo.TestsTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Tests.app/Tests"; }; name = Release; @@ -404,6 +425,7 @@ 1AECD9EF1E05E222003D21DC /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 1AECD9F01E05E222003D21DC /* Build configuration list for PBXNativeTarget "TestsTests" */ = { isa = XCConfigurationList; @@ -412,6 +434,7 @@ 1AECD9F21E05E222003D21DC /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/Tests/Tests.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/Tests.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Tests/Tests.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/Tests.xcodeproj/xcuserdata/oktawian.xcuserdatad/xcschemes/Tests.xcscheme b/Tests/Tests.xcodeproj/xcuserdata/oktawian.xcuserdatad/xcschemes/Tests.xcscheme deleted file mode 100644 index 1fe9b19..0000000 --- a/Tests/Tests.xcodeproj/xcuserdata/oktawian.xcuserdatad/xcschemes/Tests.xcscheme +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -