Skip to content

Commit

Permalink
Merge pull request #139 from hyperoslo/swift4
Browse files Browse the repository at this point in the history
Swift4
  • Loading branch information
onmyway133 authored Oct 3, 2017
2 parents eb4b12f + 593c2ac commit 9882c47
Show file tree
Hide file tree
Showing 25 changed files with 200 additions and 157 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
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github "hyperoslo/Hue" ~> 2.0
github "hyperoslo/Hue" ~> 3.0
github "hyperoslo/Imaginary" ~> 3.0
5 changes: 4 additions & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
github "hyperoslo/Hue" "f82ffc7dd55d093d3acc6ce5b3d36ca259091fdd"
github "hyperoslo/Cache" "4.0.2"
github "hyperoslo/Hue" "3.0.0"
github "hyperoslo/Imaginary" "3.0.0"
github "onmyway133/SwiftHash" "2.0.1"
76 changes: 47 additions & 29 deletions Example/DemoLightbox/DemoLightbox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,50 @@
29B4A42F1C43A4320060ED52 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B4A42E1C43A4320060ED52 /* ViewController.swift */; };
29B4A4341C43A4320060ED52 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 29B4A4331C43A4320060ED52 /* Assets.xcassets */; };
29B4A4371C43A4320060ED52 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29B4A4351C43A4320060ED52 /* LaunchScreen.storyboard */; };
7193005DD460E198432D8F06 /* Pods_DemoLightbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0977FB7C36F459186E043753 /* Pods_DemoLightbox.framework */; };
B89E57B7A21C44D762123511 /* Pods_DemoLightbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE4E898FD95F4D90F624B067 /* Pods_DemoLightbox.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
0977FB7C36F459186E043753 /* Pods_DemoLightbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DemoLightbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
064155DBC618EBACF5C257C6 /* Pods-DemoLightbox.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoLightbox.release.xcconfig"; path = "Pods/Target Support Files/Pods-DemoLightbox/Pods-DemoLightbox.release.xcconfig"; sourceTree = "<group>"; };
29B4A4291C43A4320060ED52 /* DemoLightbox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoLightbox.app; sourceTree = BUILT_PRODUCTS_DIR; };
29B4A42C1C43A4320060ED52 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
29B4A42E1C43A4320060ED52 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
29B4A4331C43A4320060ED52 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
29B4A4361C43A4320060ED52 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
29B4A4381C43A4320060ED52 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5B9CE7F93A06A0459BF452D8 /* Pods-DemoLightbox.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoLightbox.release.xcconfig"; path = "Pods/Target Support Files/Pods-DemoLightbox/Pods-DemoLightbox.release.xcconfig"; sourceTree = "<group>"; };
C37FDBF69CDC2A95E0E105A7 /* Pods-DemoLightbox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoLightbox.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DemoLightbox/Pods-DemoLightbox.debug.xcconfig"; sourceTree = "<group>"; };
6096248776155BE47C0A196A /* Pods-DemoLightbox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DemoLightbox.debug.xcconfig"; path = "Pods/Target Support Files/Pods-DemoLightbox/Pods-DemoLightbox.debug.xcconfig"; sourceTree = "<group>"; };
DAE713340DA5D2F2EF13EA8D /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EE4E898FD95F4D90F624B067 /* Pods_DemoLightbox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DemoLightbox.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
29B4A4261C43A4320060ED52 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7193005DD460E198432D8F06 /* Pods_DemoLightbox.framework in Frameworks */,
B89E57B7A21C44D762123511 /* Pods_DemoLightbox.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
0C8887567644E86396B8D885 /* Pods */ = {
isa = PBXGroup;
children = (
6096248776155BE47C0A196A /* Pods-DemoLightbox.debug.xcconfig */,
064155DBC618EBACF5C257C6 /* Pods-DemoLightbox.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
29B4A4201C43A4320060ED52 = {
isa = PBXGroup;
children = (
29B4A42B1C43A4320060ED52 /* DemoLightbox */,
29B4A42A1C43A4320060ED52 /* Products */,
B1B2B3DADEEC7FD14D4A9FF8 /* Frameworks */,
80F119CA8153119A6934480D /* Pods */,
0C8887567644E86396B8D885 /* Pods */,
);
sourceTree = "<group>";
};
Expand All @@ -69,20 +78,11 @@
path = DemoLightbox;
sourceTree = "<group>";
};
80F119CA8153119A6934480D /* Pods */ = {
isa = PBXGroup;
children = (
C37FDBF69CDC2A95E0E105A7 /* Pods-DemoLightbox.debug.xcconfig */,
5B9CE7F93A06A0459BF452D8 /* Pods-DemoLightbox.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
B1B2B3DADEEC7FD14D4A9FF8 /* Frameworks */ = {
isa = PBXGroup;
children = (
DAE713340DA5D2F2EF13EA8D /* Pods.framework */,
0977FB7C36F459186E043753 /* Pods_DemoLightbox.framework */,
EE4E898FD95F4D90F624B067 /* Pods_DemoLightbox.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand All @@ -94,12 +94,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 29B4A43B1C43A4320060ED52 /* Build configuration list for PBXNativeTarget "DemoLightbox" */;
buildPhases = (
2CF277B8821F7CE6E2730C9C /* [CP] Check Pods Manifest.lock */,
4DE126F6B5D0C8D6C0E7D848 /* [CP] Check Pods Manifest.lock */,
29B4A4251C43A4320060ED52 /* Sources */,
29B4A4261C43A4320060ED52 /* Frameworks */,
29B4A4271C43A4320060ED52 /* Resources */,
831C9CD301B03A92F6320AEE /* [CP] Embed Pods Frameworks */,
3BCDC27EE322C46C109D231B /* [CP] Copy Pods Resources */,
F162948C45248BBD677112BF /* [CP] Embed Pods Frameworks */,
D1AB0C213924D367899FA1A2 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -117,7 +117,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Hyper Interaktiv AS";
TargetAttributes = {
29B4A4281C43A4320060ED52 = {
Expand Down Expand Up @@ -158,7 +158,7 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
2CF277B8821F7CE6E2730C9C /* [CP] Check Pods Manifest.lock */ = {
4DE126F6B5D0C8D6C0E7D848 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -176,7 +176,7 @@
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;
};
3BCDC27EE322C46C109D231B /* [CP] Copy Pods Resources */ = {
D1AB0C213924D367899FA1A2 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -191,20 +191,26 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DemoLightbox/Pods-DemoLightbox-resources.sh\"\n";
showEnvVarsInLog = 0;
};
831C9CD301B03A92F6320AEE /* [CP] Embed Pods Frameworks */ = {
F162948C45248BBD677112BF /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-DemoLightbox/Pods-DemoLightbox-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Cache/Cache.framework",
"${BUILT_PRODUCTS_DIR}/Hue/Hue.framework",
"${BUILT_PRODUCTS_DIR}/Imaginary/Imaginary.framework",
"${BUILT_PRODUCTS_DIR}/Lightbox/Lightbox.framework",
"${BUILT_PRODUCTS_DIR}/SwiftHash/SwiftHash.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hue.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Imaginary.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Lightbox.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftHash.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -245,14 +251,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 @@ -280,7 +292,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -292,14 +304,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 @@ -320,14 +338,14 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
29B4A43C1C43A4320060ED52 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C37FDBF69CDC2A95E0E105A7 /* Pods-DemoLightbox.debug.xcconfig */;
baseConfigurationReference = 6096248776155BE47C0A196A /* Pods-DemoLightbox.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
Expand All @@ -336,13 +354,13 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.DemoLightbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
29B4A43D1C43A4320060ED52 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5B9CE7F93A06A0459BF452D8 /* Pods-DemoLightbox.release.xcconfig */;
baseConfigurationReference = 064155DBC618EBACF5C257C6 /* Pods-DemoLightbox.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
Expand All @@ -351,7 +369,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.DemoLightbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
Expand Down
4 changes: 2 additions & 2 deletions Example/DemoLightbox/DemoLightbox/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ViewController: UIViewController {

// MARK: - Action methods

func showLightbox() {
@objc func showLightbox() {
let images = [
LightboxImage(imageURL: URL(string: "https://cdn.arstechnica.net/2011/10/05/iphone4s_sample_apple-4e8c706-intro.jpg")!),
LightboxImage(
Expand All @@ -34,7 +34,7 @@ class ViewController: UIViewController {
),
LightboxImage(
image: UIImage(named: "photo2")!,
text: "",
text: "🌲 🌲 🌲 🌲 🌲 🌲 🌲 🌲 🌲 🌲 🌲 🏃 🌲 🏃‍♀️ 🌲 🌲 🌲 🌲 🌲 🌲 🌲 🌲\n\nSuspendisse massa massa, maximus et finibus ac, auctor volutpat diam.\n\nPellentesque consequat magna condimentum mauris bibendum, nec ornare nisl hendrerit. Phasellus nec ultrices sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n\nSuspendisse sit amet facilisis ante, ac suscipit sem. Integer feugiat sit amet erat sit amet mattis. Donec tristique, nunc ut varius elementum, nisi elit viverra ipsum, vitae aliquam justo libero in arcu. Quisque tempor et justo at malesuada. Curabitur justo dolor, ornare convallis sollicitudin sed, consectetur eu turpis. \n\nNulla et dui condimentum, laoreet lacus eu, ultrices nisl. Vivamus in ante volutpat, gravida nunc scelerisque, sagittis tellus. Nullam justo purus, sagittis a tincidunt a, maximus nec sem.",
videoURL: URL(string: "https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
),
LightboxImage(
Expand Down
11 changes: 5 additions & 6 deletions Example/DemoLightbox/Podfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
platform :ios, '8.0'
platform :ios, '9.0'

use_frameworks!
inhibit_all_warnings!

pod 'Lightbox', path: '../../'
target 'DemoLightbox'
target 'DemoLightbox' do
use_frameworks!
pod 'Lightbox', path: '../../'
end
21 changes: 15 additions & 6 deletions Example/DemoLightbox/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
PODS:
- Hue (2.0.1)
- Lightbox (1.0.0):
- Hue (~> 2.0)
- Cache (4.0.2):
- SwiftHash (~> 2.0.0)
- Hue (3.0.0)
- Imaginary (3.0.0):
- Cache (~> 4.0)
- Lightbox (2.0.0):
- Hue (~> 3.0)
- Imaginary (~> 3.0)
- SwiftHash (2.0.0)

DEPENDENCIES:
- Lightbox (from `../../`)
Expand All @@ -11,9 +17,12 @@ EXTERNAL SOURCES:
:path: ../../

SPEC CHECKSUMS:
Hue: 354caec055fdc9d38b5ef33ca2e7224721843baf
Lightbox: d15b5e265e505009932fa447f27b5262b8b1b604
Cache: 363b6899cee63c82ccbd291e64a6c202abc17a88
Hue: b8fe1e43eef13631331eebecb2198b68e2622f95
Imaginary: 2765d293d425cbed3b07fa11642554cbaebe913d
Lightbox: f7f1cc942d81e84d85095531208f5fe1bfd9c639
SwiftHash: d2e09b13495447178cdfb8e46e54a5c46f15f5a9

PODFILE CHECKSUM: cd88b68c201e5c39cef62070056649eaee91c71b
PODFILE CHECKSUM: 408ae3477507a1d4b7ff06ffb3f162eda443424f

COCOAPODS: 1.3.1
9 changes: 5 additions & 4 deletions Lightbox.podspec
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
Pod::Spec.new do |s|
s.name = "Lightbox"
s.summary = "A a convenient and easy to use image viewer for your iOS app, packed with all the features you expect"
s.version = "1.1.0"
s.version = "2.0.0"
s.homepage = "https://github.com/hyperoslo/Lightbox"
s.license = 'MIT'
s.author = { "Hyper Interaktiv AS" => "[email protected]" }
s.source = { :git => "https://github.com/hyperoslo/Lightbox.git", :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/hyperoslo'
s.platform = :ios, '8.0'
s.platform = :ios, '9.0'
s.requires_arc = true
s.source_files = 'Source/**/*'
s.ios.resource = 'Resources/Lightbox.bundle'

s.frameworks = 'UIKit', 'AVFoundation', 'AVKit'
s.dependency 'Hue', '~> 2.0'
s.dependency 'Hue', '~> 3.0'
s.dependency 'Imaginary', '~> 3.0'

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

0 comments on commit 9882c47

Please sign in to comment.