Skip to content

Commit

Permalink
Updated project for Swift 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Gubriienko committed Nov 6, 2015
1 parent bba7496 commit 77d606e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions DispatchAfter.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "DispatchAfter"
s.version = "0.1.1"
s.version = "0.1.2"
s.summary = "Simple and modern way to make delayed calls with ability to cancel them"

s.description = <<-DESC
Expand All @@ -17,7 +17,7 @@ Pod::Spec.new do |s|

s.platform = :ios, "8.0"

s.source = { :git => "https://github.com/vGubriienko/SFDispatchAfter.git", :tag => "0.1.1" }
s.source = { :git => "https://github.com/vGubriienko/SFDispatchAfter.git", :tag => "0.1.2" }

s.source_files = "SFDispatchAfter/SFDispatchAfter.swift"

Expand Down
17 changes: 12 additions & 5 deletions SFDispatchAfter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@
7178FA021AC417AE0099FB36 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0620;
LastSwiftMigration = 0710;
LastSwiftUpdateCheck = 0710;
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = "Viktor Gubriienko";
TargetAttributes = {
7178FA091AC417AE0099FB36 = {
Expand Down Expand Up @@ -263,6 +265,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
Expand All @@ -277,7 +280,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -314,7 +317,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -328,8 +331,9 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = SFDispatchAfter/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "SkieSoft.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SFDispatchAfter;
};
name = Debug;
Expand All @@ -340,8 +344,9 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = SFDispatchAfter/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "SkieSoft.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SFDispatchAfter;
};
name = Release;
Expand All @@ -360,6 +365,7 @@
);
INFOPLIST_FILE = SFDispatchAfterTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "SkieSoft.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SFDispatchAfterTests;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SFDispatchAfter.app/SFDispatchAfter";
};
Expand All @@ -375,6 +381,7 @@
);
INFOPLIST_FILE = SFDispatchAfterTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "SkieSoft.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SFDispatchAfterTests;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SFDispatchAfter.app/SFDispatchAfter";
};
Expand Down
4 changes: 2 additions & 2 deletions SFDispatchAfter/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.

var obj1 = SFDispatchObject.dispatchAfter(3.0) {
let obj1 = SFDispatchObject.dispatchAfter(3.0) {
NSLog("Should never be called")
}

let obj2 = SFDispatchObject.dispatchAfter(2.0) {
SFDispatchObject.dispatchAfter(2.0) {
obj1.cancel()
NSLog("Second dispatch. Cancelling first dispatch here.")
}
Expand Down
6 changes: 3 additions & 3 deletions SFDispatchAfter/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>SkieSoft.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<string>0.1.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.1.0</string>
<string>0.1.2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
4 changes: 2 additions & 2 deletions SFDispatchAfter/SFDispatchAfter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SFDispatchObject: NSObject {
} else {
var dispatchObject: SFDispatchObject!

println("Warning: dispatch will be done on the main thread")
print("Warning: dispatch will be done on the main thread")

dispatch_sync(dispatch_get_main_queue(), { () -> Void in
dispatchObject = SFDispatchQueue.addDispatchObject(time, executionBlock: executionBlock)
Expand Down Expand Up @@ -81,7 +81,7 @@ private class SFDispatchQueue: NSObject {
class func cancelDispatchObject(dispatchObject: SFDispatchObject) {
dispatchObject.invalidate()

if let index = find(dispatches, dispatchObject) {
if let index = dispatches.indexOf(dispatchObject) {
dispatches.removeAtIndex(index)
}
}
Expand Down
2 changes: 1 addition & 1 deletion SFDispatchAfterTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>SkieSoft.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down

0 comments on commit 77d606e

Please sign in to comment.