diff --git a/Clocker.xcodeproj/project.pbxproj b/Clocker.xcodeproj/project.pbxproj index 7669ac08..768efe09 100755 --- a/Clocker.xcodeproj/project.pbxproj +++ b/Clocker.xcodeproj/project.pbxproj @@ -444,7 +444,7 @@ CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application: Abhishek Banthia (AJS5SNW8EY)"; + CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -460,7 +460,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.10; - PROVISIONING_PROFILE = "1885f3d2-2a35-4a0b-b465-4c0119f4bbaf"; + PROVISIONING_PROFILE = ""; SDKROOT = macosx; }; name = Distribution; @@ -471,7 +471,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = Clocker/Clocker.entitlements; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application: Abhishek Banthia (AJS5SNW8EY)"; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -486,7 +486,7 @@ OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.abhishek.Clocker; PRODUCT_NAME = Clocker; - PROVISIONING_PROFILE = "1885f3d2-2a35-4a0b-b465-4c0119f4bbaf"; + PROVISIONING_PROFILE = ""; WRAPPER_EXTENSION = app; }; name = Distribution; @@ -502,7 +502,7 @@ CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application: Abhishek Banthia (AJS5SNW8EY)"; + CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -526,7 +526,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.10; ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE = "1885f3d2-2a35-4a0b-b465-4c0119f4bbaf"; + PROVISIONING_PROFILE = ""; SDKROOT = macosx; }; name = Debug; @@ -542,7 +542,7 @@ CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application: Abhishek Banthia (AJS5SNW8EY)"; + CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -558,7 +558,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.10; - PROVISIONING_PROFILE = "1885f3d2-2a35-4a0b-b465-4c0119f4bbaf"; + PROVISIONING_PROFILE = ""; SDKROOT = macosx; }; name = Release; @@ -569,7 +569,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = Clocker/Clocker.entitlements; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application: Abhishek Banthia (AJS5SNW8EY)"; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = ( @@ -586,7 +586,7 @@ OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.abhishek.Clocker; PRODUCT_NAME = Clocker; - PROVISIONING_PROFILE = "1885f3d2-2a35-4a0b-b465-4c0119f4bbaf"; + PROVISIONING_PROFILE = ""; WRAPPER_EXTENSION = app; }; name = Debug; @@ -597,7 +597,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_ENTITLEMENTS = Clocker/Clocker.entitlements; - CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application: Abhishek Banthia (AJS5SNW8EY)"; + CODE_SIGN_IDENTITY = "Mac Developer"; COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -612,7 +612,7 @@ OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.abhishek.Clocker; PRODUCT_NAME = Clocker; - PROVISIONING_PROFILE = "1885f3d2-2a35-4a0b-b465-4c0119f4bbaf"; + PROVISIONING_PROFILE = ""; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate index ae3969b4..bd0ae87a 100644 Binary files a/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate and b/Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Clocker/ApplicationDelegate.m b/Clocker/ApplicationDelegate.m index ac6be09c..290534bd 100755 --- a/Clocker/ApplicationDelegate.m +++ b/Clocker/ApplicationDelegate.m @@ -70,7 +70,20 @@ + (void)initialize #pragma mark - NSApplicationDelegate - (void)applicationDidFinishLaunching:(NSNotification *)notification -{ +{ + NSNumber *opened = [[NSUserDefaults standardUserDefaults] objectForKey:@"noOfTimes"]; + if (opened == nil) + { + [[NSUserDefaults standardUserDefaults] setObject:[NSMutableArray array] + forKey:CLDefaultPreferenceKey]; + NSInteger noOfTimes = opened.integerValue + 1; + NSNumber *noOfTime = [NSNumber numberWithInteger:noOfTimes]; + [[NSUserDefaults standardUserDefaults] setObject:noOfTime forKey:@"noOfTimes"];; + + } + + + NSArray *defaultPreference = [[NSUserDefaults standardUserDefaults] objectForKey:CLDefaultPreferenceKey]; NSMutableArray *newDefaults = [[NSMutableArray alloc] init];