Skip to content

Commit

Permalink
Update to Swift 4
Browse files Browse the repository at this point in the history
  • Loading branch information
onmyway133 committed Oct 26, 2017
1 parent a11dd08 commit 9609e2f
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 77 deletions.
4 changes: 0 additions & 4 deletions .slather.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
4.0
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

36 changes: 18 additions & 18 deletions Example/ThemesDemo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
PODS:
- Cache (2.3.0):
- CryptoSwift
- Cheers (1.0.0)
- CryptoSwift (0.6.9)
- Cache (4.0.4):
- SwiftHash (~> 2.0.0)
- Cheers (2.0.0)
- Hue (2.0.1)
- Imaginary (1.0.2):
- Cache (~> 2.0)
- Imaginary (3.0.0):
- Cache (~> 4.0)
- On (1.0.0)
- Themes (1.1.0)
- SwiftHash (2.0.0)
- Themes (2.0.0)

DEPENDENCIES:
- Cheers (from `https://github.com/hyperoslo/Cheers`)
Expand All @@ -19,28 +19,28 @@ DEPENDENCIES:
EXTERNAL SOURCES:
Cheers:
:git: https://github.com/hyperoslo/Cheers
'On':
On:
:git: https://github.com/onmyway133/On
Themes:
:path: "../../"
:path: ../../

CHECKOUT OPTIONS:
Cheers:
:commit: 9857633a9b32b6977e87e27a3132ab201dc4456c
:commit: 46fb62ff13f4fa72c36f0b285693a814de002878
:git: https://github.com/hyperoslo/Cheers
'On':
On:
:commit: c5143a1c69cf1b6a854b005c39ac5b5ca393b969
:git: https://github.com/onmyway133/On

SPEC CHECKSUMS:
Cache: 077e4e799c394ccffc18bb3240f5b55cb9b3cc1b
Cheers: 8c3525c55bc28108699c901bb57e479eaf7fcecd
CryptoSwift: a22f6ba238e9ce4d26ee7bf45b9ed82e7122d4a0
Cache: 1b3907ee2f5a457e7cfe9ac0be22dc9207f55a09
Cheers: df4128f342df005e53ccbba971a0bdfb5d735f6d
Hue: 354caec055fdc9d38b5ef33ca2e7224721843baf
Imaginary: b4f4c069ad23b53243058a040a531e099aee8a1f
'On': 1b72343b67154060b3fc792cb48f95a4a5628102
Themes: b696d271b3a2aec42284bee4e6e9a5014404d6d0
Imaginary: 2765d293d425cbed3b07fa11642554cbaebe913d
On: 1b72343b67154060b3fc792cb48f95a4a5628102
SwiftHash: d2e09b13495447178cdfb8e46e54a5c46f15f5a9
Themes: d3810257315e54a035691c204aa40a92f2f1085b

PODFILE CHECKSUM: 9114c191d5e5e6b54aae6ce640fefbe6394c8098

COCOAPODS: 1.2.1
COCOAPODS: 1.3.1
38 changes: 34 additions & 4 deletions Example/ThemesDemo/ThemesDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Hyper Interaktiv AS";
TargetAttributes = {
D5C7F73F1C3BC9CE008CDDBA = {
Expand Down Expand Up @@ -206,9 +206,24 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-ThemesDemo/Pods-ThemesDemo-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Cache/Cache.framework",
"${BUILT_PRODUCTS_DIR}/Cheers/Cheers.framework",
"${BUILT_PRODUCTS_DIR}/Hue/Hue.framework",
"${BUILT_PRODUCTS_DIR}/Imaginary/Imaginary.framework",
"${BUILT_PRODUCTS_DIR}/On/On.framework",
"${BUILT_PRODUCTS_DIR}/SwiftHash/SwiftHash.framework",
"${BUILT_PRODUCTS_DIR}/Themes/Themes.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cheers.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Imaginary.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/On.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftHash.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Themes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -221,13 +236,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-ThemesDemo-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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";
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;
};
E979EBD339E3BDE843053D1C /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -282,14 +300,20 @@
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_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_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;
Expand Down Expand Up @@ -317,6 +341,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -328,14 +353,20 @@
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_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_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;
Expand All @@ -356,6 +387,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -369,7 +401,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.fantageek.ThemesDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -382,7 +413,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.fantageek.ThemesDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -45,6 +46,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
10 changes: 5 additions & 5 deletions Example/ThemesDemo/ThemesDemo/Sources/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ListController: UITableViewController {
view.addSubview(cheerView)

// default theme
ThemeManager.currentTheme = dayTheme
ThemeManager.shared.currentTheme = dayTheme

use(MyTheme.self) {
$0.title = $1.name
Expand Down Expand Up @@ -87,19 +87,19 @@ class ListController: UITableViewController {
navigationItem.rightBarButtonItems = [starwar, unicorn]

day.on.tap {
ThemeManager.currentTheme = self.dayTheme
ThemeManager.shared.currentTheme = self.dayTheme
}

night.on.tap {
ThemeManager.currentTheme = self.nightTheme
ThemeManager.shared.currentTheme = self.nightTheme
}

unicorn.on.tap {
ThemeManager.currentTheme = self.unicornTheme
ThemeManager.shared.currentTheme = self.unicornTheme
}

starwar.on.tap {
ThemeManager.currentTheme = self.starwarTheme
ThemeManager.shared.currentTheme = self.starwarTheme
}
}

Expand Down
14 changes: 7 additions & 7 deletions Example/YahooWather/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- DayNightSwitch (0.0.3)
- On (1.0.0)
- Themes (1.0.0)
- Themes (2.0.0)

DEPENDENCIES:
- DayNightSwitch (from `https://github.com/finngaida/DayNightSwitch`)
Expand All @@ -11,24 +11,24 @@ DEPENDENCIES:
EXTERNAL SOURCES:
DayNightSwitch:
:git: https://github.com/finngaida/DayNightSwitch
'On':
On:
:git: https://github.com/onmyway133/On
Themes:
:path: "../../"
:path: ../../

CHECKOUT OPTIONS:
DayNightSwitch:
:commit: e5ee0f105c990c6b0f6342a99bd4879a81f0956b
:git: https://github.com/finngaida/DayNightSwitch
'On':
On:
:commit: c5143a1c69cf1b6a854b005c39ac5b5ca393b969
:git: https://github.com/onmyway133/On

SPEC CHECKSUMS:
DayNightSwitch: 9b6877654400a4ca7d63d1dcd28232e60ac32d9e
'On': 1b72343b67154060b3fc792cb48f95a4a5628102
Themes: 0846b95552a1ac87cb1e47eb0b0efe240fc43b00
On: 1b72343b67154060b3fc792cb48f95a4a5628102
Themes: d3810257315e54a035691c204aa40a92f2f1085b

PODFILE CHECKSUM: f8dbccd61f461e42d05073b96fff09e28ac8e74b

COCOAPODS: 1.2.1
COCOAPODS: 1.3.1
12 changes: 11 additions & 1 deletion Example/YahooWather/YahooWather.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-YahooWather-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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";
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;
};
AD57CCDDCDFD20BA5D3F15F6 /* [CP] Embed Pods Frameworks */ = {
Expand All @@ -195,9 +198,16 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-YahooWather/Pods-YahooWather-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/DayNightSwitch/DayNightSwitch.framework",
"${BUILT_PRODUCTS_DIR}/On/On.framework",
"${BUILT_PRODUCTS_DIR}/Themes/Themes.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DayNightSwitch.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/On.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Themes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down
4 changes: 2 additions & 2 deletions Themes.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Themes"
s.summary = "Theme management in Swift"
s.version = "1.1.0"
s.version = "2.0.0"
s.homepage = "https://github.com/onmyway133/Themes"
s.license = 'MIT'
s.author = { "Khoa Pham" => "[email protected]" }
Expand All @@ -20,5 +20,5 @@ Pod::Spec.new do |s|
s.tvos.source_files = 'Sources/**/*'
s.osx.source_files = 'Sources/**/*'

s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' }
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
end
Loading

0 comments on commit 9609e2f

Please sign in to comment.