Browse Source

Minor changes.

v1.4.1
Abhishek Banthia 8 years ago
parent
commit
4126d729f1
  1. 1
      Clocker/Model/CLTimezoneData.h
  2. 20
      Clocker/Model/CLTimezoneData.m
  3. 29
      Clocker/Preferences/CLPreferencesViewController.m
  4. 29
      Clocker/pop/pop.xcodeproj/project.pbxproj

1
Clocker/Model/CLTimezoneData.h

@ -47,5 +47,6 @@ typedef NS_ENUM(NSUInteger, CLSelection) {
- (void)setLatitudeForTimezone:(NSString *)latitude;
- (void)setLongitudeForTimezone:(NSString *)longitude;
- (NSString *)getFormattedTimezoneLabel;
- (BOOL)isEmpty;
@end

20
Clocker/Model/CLTimezoneData.m

@ -215,4 +215,24 @@
self.longitude = longitude;
}
- (BOOL)isEmpty
{
if ([self checkPropertyForNil:self.timezoneID] || [self checkPropertyForNil:self.place_id] ||
[self checkPropertyForNil:self.formattedAddress] || [self checkPropertyForNil:self.latitude] || [self checkPropertyForNil:self.longitude]) {
return YES;
}
return NO;
}
- (BOOL)checkPropertyForNil:(id)property
{
if (property == nil || property == [NSNull null]) {
return YES;
}
return NO;
}
@end

29
Clocker/Preferences/CLPreferencesViewController.m

@ -17,6 +17,7 @@
#import "EDSunriseSet.h"
#import "NSString+CLStringAdditions.h"
#import "CLTimezoneDataOperations.h"
#import "MoLoginItem/MoLoginItem.h"
NSString *const CLSearchPredicateKey = @"SELF CONTAINS[cd]%@";
NSString *const CLPreferencesTimezoneNameIdentifier = @"formattedAddress";
@ -903,33 +904,7 @@ NSString *const CLTryAgainMessage = @"Try again, maybe?";
- (IBAction)loginPreferenceChanged:(NSButton *)sender
{
NSError *fileCopyError = nil;
if(sender.state == 0)
{
NSString *destinationDirectory = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES)[0] stringByAppendingPathComponent:@"LaunchAgents/com.abhishek.ClockerHelper.plist"];
if ([[NSFileManager defaultManager] fileExistsAtPath:destinationDirectory])
{
[[NSFileManager defaultManager] removeItemAtPath:destinationDirectory error:&fileCopyError];
}
}
else
{
NSString *source = [[NSBundle mainBundle] pathForResource:@"com.abhishek.ClockerHelper" ofType:@"plist"];
NSString *destinationDirectory = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES)[0] stringByAppendingPathComponent:@"LaunchAgents/com.abhishek.ClockerHelper.plist"];
if ( [[NSFileManager defaultManager] isReadableFileAtPath:source] )
[[NSFileManager defaultManager] copyItemAtPath:source toPath:destinationDirectory error:&fileCopyError];
}
if(fileCopyError)
{
NSLog(@"Following error was encountered while copying the file: %@", fileCopyError);
}
MOEnableLoginItem(sender.state == NSOnState);
}
@end

29
Clocker/pop/pop.xcodeproj/project.pbxproj

@ -1068,7 +1068,7 @@
isa = PBXProject;
attributes = {
LastTestingUpgradeCheck = 0700;
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0810;
ORGANIZATIONNAME = Facebook;
TargetAttributes = {
0755AE4E1BEA15950094AB41 = {
@ -1487,6 +1487,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
@ -1537,6 +1538,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@ -1582,6 +1584,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@ -1724,7 +1727,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 04C0670F1B8D577C00ED0525 /* Framework-iOS.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1742,7 +1745,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 04C0670F1B8D577C00ED0525 /* Framework-iOS.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1760,7 +1763,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 04C0670F1B8D577C00ED0525 /* Framework-iOS.xcconfig */;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1780,11 +1783,14 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
SKIP_INSTALL = YES;
};
name = Profile;
@ -1794,6 +1800,7 @@
baseConfigurationReference = ECC1DB1A18CA291B008C7DEA /* StaticLibrary-iOS.xcconfig */;
buildSettings = {
INFOPLIST_FILE = "pop/pop-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = pop;
PUBLIC_HEADERS_FOLDER_PATH = ../Headers/POP;
};
@ -1805,12 +1812,15 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
SKIP_INSTALL = YES;
};
@ -1822,11 +1832,14 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
SKIP_INSTALL = YES;
};
name = Release;
@ -1836,6 +1849,7 @@
baseConfigurationReference = ECC1DB1A18CA291B008C7DEA /* StaticLibrary-iOS.xcconfig */;
buildSettings = {
INFOPLIST_FILE = "pop/pop-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = pop;
PUBLIC_HEADERS_FOLDER_PATH = ../Headers/POP;
};
@ -1846,6 +1860,7 @@
baseConfigurationReference = ECC1DB1A18CA291B008C7DEA /* StaticLibrary-iOS.xcconfig */;
buildSettings = {
INFOPLIST_FILE = "pop/pop-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_NAME = pop;
PUBLIC_HEADERS_FOLDER_PATH = ../Headers/POP;
};
@ -1961,7 +1976,7 @@
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
INFOPLIST_FILE = "$(SRCROOT)/pop-tests/pop-tests-ios-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "pop-tests";
};
@ -1977,7 +1992,7 @@
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
INFOPLIST_FILE = "$(SRCROOT)/pop-tests/pop-tests-ios-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "pop-tests";
};
@ -1993,7 +2008,7 @@
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
INFOPLIST_FILE = "$(SRCROOT)/pop-tests/pop-tests-ios-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "pop-tests";
};

Loading…
Cancel
Save