├── NSDate-ServerDateExample ├── NSDate-ServerDateExample │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── AppDelegate.h │ ├── ViewController.h │ ├── main.m │ ├── NSDate-ServerDateExample-Prefix.pch │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── LaunchImage.launchimage │ │ │ └── Contents.json │ ├── ViewController.m │ ├── NSDate-ServerDateExample-Info.plist │ ├── AppDelegate.m │ └── ViewController.xib └── NSDate-ServerDateExample.xcodeproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── freak4pc.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── NSDate-ServerDateExample.xccheckout │ ├── xcuserdata │ └── freak4pc.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── NSDate-ServerDateExample.xcscheme │ └── project.pbxproj ├── LICENSE ├── NSDate+ServerDate.h ├── NSDate+ServerDate.m ├── NSDate-ServerDate.podspec └── README.md /NSDate-ServerDateExample/NSDate-ServerDateExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample.xcodeproj/project.xcworkspace/xcuserdata/freak4pc.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freak4pc/NSDate-ServerDate/HEAD/NSDate-ServerDateExample/NSDate-ServerDateExample.xcodeproj/project.xcworkspace/xcuserdata/freak4pc.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // NSDate-ServerDateExample 4 | // 5 | // Created by Shai Mishali on 10/2/13. 6 | // Copyright (c) 2013 Shai Mishali. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // NSDate-ServerDateExample 4 | // 5 | // Created by Shai Mishali on 10/2/13. 6 | // Copyright (c) 2013 Shai Mishali. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "NSDate+ServerDate.h" 11 | 12 | @interface ViewController : UIViewController{ 13 | IBOutlet UILabel *lblDate; 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NSDate-ServerDateExample 4 | // 5 | // Created by Shai Mishali on 10/2/13. 6 | // Copyright (c) 2013 Shai Mishali. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/NSDate-ServerDateExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // NSDate-ServerDateExample 4 | // 5 | // Created by Shai Mishali on 10/2/13. 6 | // Copyright (c) 2013 Shai Mishali. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | 21 | // Update label every second 22 | [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(updateLabel) userInfo:nil repeats:YES]; 23 | } 24 | 25 | -(void) updateLabel{ 26 | lblDate.text = [[NSDate serverDate] description]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample.xcodeproj/xcuserdata/freak4pc.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | NSDate-ServerDateExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 789645FA17FC6B4A00709C5D 16 | 17 | primary 18 | 19 | 20 | 7896461B17FC6B4A00709C5D 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 Developed by Shai Mishali 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /NSDate+ServerDate.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+ServerDate.h 3 | // 4 | // Created by Shai Mishali on 10/2/13. 5 | // Copyright (c) 2013 Shai Mishali. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | #define _SD_SERVER @"http://google.com/" 11 | #define _SD_FORMAT @"EEE, dd MMM yyyy HH:mm:ss z" 12 | 13 | /** 14 | NSDate+ServerDate is a NSDate Category that allows you to make sure your time is synced up to a remote server regardless of the User's local settings. 15 | 16 | It does this by performing a one-time-per-session HTTP HEAD Request to the supplied server, getting a "Base" date, and keep counting from there - Making sure you're in sync with the remote server even when the user's clock isn't. 17 | 18 | ## Definitions 19 | Modify _SD_SERVER If you wish to sync your time wish a specific server (e.g. your API server). 20 | Modify _SD_FORMAT If for some reason the Date format your HTTP Server returns is different than the one specified. 21 | */ 22 | @interface NSDate (ServerDate) 23 | 24 | /** 25 | Return the current server date. 26 | 27 | @return NSDate 28 | */ 29 | +(NSDate *) serverDate; 30 | 31 | @end -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/NSDate-ServerDateExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.freak4pc.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample.xcodeproj/project.xcworkspace/xcshareddata/NSDate-ServerDateExample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 99417D62-8772-482C-9A6F-D385A1808698 9 | IDESourceControlProjectName 10 | NSDate-ServerDateExample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 62882575-06D8-4176-8E53-6DF791D49522 14 | https://github.com/freak4pc/NSDate-ServerDate.git 15 | 16 | IDESourceControlProjectPath 17 | NSDate-ServerDateExample/NSDate-ServerDateExample.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 62882575-06D8-4176-8E53-6DF791D49522 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/freak4pc/NSDate-ServerDate.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 62882575-06D8-4176-8E53-6DF791D49522 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 62882575-06D8-4176-8E53-6DF791D49522 36 | IDESourceControlWCCName 37 | NSDate-ServerDate 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /NSDate+ServerDate.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+ServerDate.m 3 | // 4 | // Created by Shai Mishali on 10/2/13. 5 | // Copyright (c) 2013 Shai Mishali. All rights reserved. 6 | // 7 | 8 | #import "NSDate+ServerDate.h" 9 | 10 | static NSTimeInterval _SDInterval; 11 | 12 | @interface NSDate (ServerDateExtras) 13 | +(void)_SDresetServerTime; 14 | @end 15 | 16 | @implementation NSDate (ServerDate) 17 | 18 | +(NSDate *)serverDate{ 19 | if(!_SDInterval){ 20 | [self _SDresetServerTime]; 21 | } 22 | 23 | return [[NSDate date] dateByAddingTimeInterval: _SDInterval]; 24 | } 25 | 26 | #pragma mark - Private Helpers 27 | +(void)_SDresetServerTime{ 28 | NSHTTPURLResponse *resp; 29 | NSError *err; 30 | 31 | NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString:_SD_SERVER]]; 32 | req.HTTPMethod = @"HEAD"; 33 | 34 | [NSURLConnection sendSynchronousRequest:req returningResponse:&resp error:&err]; 35 | NSString *httpDate = [resp allHeaderFields][@"Date"]; 36 | 37 | NSDateFormatter *df = [[NSDateFormatter alloc] init]; 38 | df.dateFormat = _SD_FORMAT; 39 | df.locale = [NSLocale localeWithLocaleIdentifier:@"en_US"]; 40 | 41 | NSDate *serverDate = [df dateFromString: httpDate]; 42 | _SDInterval = [serverDate timeIntervalSinceNow]; 43 | 44 | [[NSNotificationCenter defaultCenter] removeObserver:[self class] name:UIApplicationWillEnterForegroundNotification object:nil]; 45 | [[NSNotificationCenter defaultCenter] addObserver:[self class] selector:@selector(_SDresetServerTime) name:UIApplicationWillEnterForegroundNotification object:nil]; 46 | 47 | #ifdef DEBUG 48 | NSLog(@"Server Clock resetted to: %@", serverDate); 49 | #endif 50 | } 51 | 52 | @end -------------------------------------------------------------------------------- /NSDate-ServerDate.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "NSDate-ServerDate" 3 | s.version = "1.0" 4 | s.summary = "NSDate+ServerDate is a NSDate Category that allows you to make sure your time is synced up to a server regardless of the User's settings." 5 | 6 | s.description = <<-DESC 7 | NSDate+ServerDate 8 | ================ 9 | 10 | NSDate+ServerDate is a NSDate Category that allows you to make sure your time is synced up to a remote server regardless of the User's local settings. 11 | 12 | It does this by performing a one-time-per-session HTTP HEAD Request to the supplied server, getting a "Base" date, and keep counting from there - Making sure you're in sync with the remote server even when the user's clock isn't. 13 | 14 | ## Definitions 15 | Modify ***_SD_SERVER*** If you want to sync your time to a specific server (e.g. your API server). 16 | 17 | Modify ***_SD_FORMAT*** If for some reason the Date format your HTTP Server returns is different than the one specified. 18 | 19 | USAGE 20 | ----- 21 | ```objc 22 | NSDate *serverDate = [NSDate serverDate]; 23 | ``` 24 | 25 | An example Xcode project is part of this Repository. 26 | DESC 27 | 28 | s.homepage = "https://github.com/freak4pc/NSDate-ServerDate" 29 | s.license = 'MIT' 30 | 31 | s.author = { "Shai Mishali" => "freak4pc@gmail.com" } 32 | 33 | s.platform = :ios 34 | s.source = { :git => "https://github.com/freak4pc/NSDate-ServerDate.git", :tag => "v1.0" } 35 | 36 | s.source_files = 'NSDate+ServerDate.**' 37 | s.exclude_files = 'UIActionSheet-BlocksExample/**' 38 | 39 | s.requires_arc = true 40 | end -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | NSDate+ServerDate 2 | ================ 3 | 4 | NSDate+ServerDate is a NSDate Category that allows you to make sure your time is synced up to a remote server regardless of the User's local settings. 5 | 6 | It does this by performing a one-time-per-session HTTP HEAD Request to the supplied server, getting a "Base" date, and keeping the interval between yourself and the server - Making sure you're in sync with the remote server even when the user's clock isn't. 7 | 8 | # Definitions 9 | Modify ***_SD_SERVER*** If you wish to sync your time wish a specific server (e.g. your API server). 10 | 11 | Modify ***_SD_FORMAT*** If for some reason the Date format your HTTP Server returns is different than the one specified. 12 | 13 | USAGE 14 | ----- 15 | ```objc 16 | NSDate *serverDate = [NSDate serverDate]; 17 | ``` 18 | 19 | An example Xcode project is part of this Repository. 20 | 21 | LICENSE 22 | ------------------- 23 | 24 | Copyright (C) 2013 Developed by Shai Mishali 25 | 26 | Permission is hereby granted, free of charge, to any person obtaining a copy 27 | of this software and associated documentation files (the "Software"), to deal 28 | in the Software without restriction, including without limitation the rights 29 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 30 | copies of the Software, and to permit persons to whom the Software is 31 | furnished to do so, subject to the following conditions: 32 | 33 | The above copyright notice and this permission notice shall be included in 34 | all copies or substantial portions of the Software. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 37 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 38 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 39 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 40 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 41 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 42 | THE SOFTWARE. 43 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // NSDate-ServerDateExample 4 | // 5 | // Created by Shai Mishali on 10/2/13. 6 | // Copyright (c) 2013 Shai Mishali. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @implementation AppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; 17 | ViewController *vc = [[ViewController alloc] init]; 18 | self.window.rootViewController = vc; 19 | 20 | [self.window makeKeyAndVisible]; 21 | return YES; 22 | } 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application 25 | { 26 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 27 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 28 | } 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application 31 | { 32 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 33 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 34 | } 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application 37 | { 38 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 39 | } 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application 42 | { 43 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 44 | } 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application 47 | { 48 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample/ViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 25 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample.xcodeproj/xcuserdata/freak4pc.xcuserdatad/xcschemes/NSDate-ServerDateExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /NSDate-ServerDateExample/NSDate-ServerDateExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 789645FF17FC6B4A00709C5D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 789645FE17FC6B4A00709C5D /* Foundation.framework */; }; 11 | 7896460117FC6B4A00709C5D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7896460017FC6B4A00709C5D /* CoreGraphics.framework */; }; 12 | 7896460317FC6B4A00709C5D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7896460217FC6B4A00709C5D /* UIKit.framework */; }; 13 | 7896460917FC6B4A00709C5D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7896460717FC6B4A00709C5D /* InfoPlist.strings */; }; 14 | 7896460B17FC6B4A00709C5D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7896460A17FC6B4A00709C5D /* main.m */; }; 15 | 7896460F17FC6B4A00709C5D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7896460E17FC6B4A00709C5D /* AppDelegate.m */; }; 16 | 7896461517FC6B4A00709C5D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7896461417FC6B4A00709C5D /* ViewController.m */; }; 17 | 7896461717FC6B4A00709C5D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7896461617FC6B4A00709C5D /* Images.xcassets */; }; 18 | 7896463617FC6B5E00709C5D /* NSDate+ServerDate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7896463517FC6B5E00709C5D /* NSDate+ServerDate.m */; }; 19 | 7896463817FC6B9600709C5D /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7896463717FC6B9600709C5D /* ViewController.xib */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 789645FB17FC6B4A00709C5D /* NSDate-ServerDateExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "NSDate-ServerDateExample.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 789645FE17FC6B4A00709C5D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 25 | 7896460017FC6B4A00709C5D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 26 | 7896460217FC6B4A00709C5D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 27 | 7896460617FC6B4A00709C5D /* NSDate-ServerDateExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "NSDate-ServerDateExample-Info.plist"; sourceTree = ""; }; 28 | 7896460817FC6B4A00709C5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 29 | 7896460A17FC6B4A00709C5D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 30 | 7896460C17FC6B4A00709C5D /* NSDate-ServerDateExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDate-ServerDateExample-Prefix.pch"; sourceTree = ""; }; 31 | 7896460D17FC6B4A00709C5D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 32 | 7896460E17FC6B4A00709C5D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 33 | 7896461317FC6B4A00709C5D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 34 | 7896461417FC6B4A00709C5D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 35 | 7896461617FC6B4A00709C5D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 36 | 7896461D17FC6B4A00709C5D /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 37 | 7896463417FC6B5E00709C5D /* NSDate+ServerDate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDate+ServerDate.h"; path = "../../NSDate+ServerDate.h"; sourceTree = ""; }; 38 | 7896463517FC6B5E00709C5D /* NSDate+ServerDate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDate+ServerDate.m"; path = "../../NSDate+ServerDate.m"; sourceTree = ""; }; 39 | 7896463717FC6B9600709C5D /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = ""; }; 40 | /* End PBXFileReference section */ 41 | 42 | /* Begin PBXFrameworksBuildPhase section */ 43 | 789645F817FC6B4A00709C5D /* Frameworks */ = { 44 | isa = PBXFrameworksBuildPhase; 45 | buildActionMask = 2147483647; 46 | files = ( 47 | 7896460117FC6B4A00709C5D /* CoreGraphics.framework in Frameworks */, 48 | 7896460317FC6B4A00709C5D /* UIKit.framework in Frameworks */, 49 | 789645FF17FC6B4A00709C5D /* Foundation.framework in Frameworks */, 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | /* End PBXFrameworksBuildPhase section */ 54 | 55 | /* Begin PBXGroup section */ 56 | 789645F217FC6B4A00709C5D = { 57 | isa = PBXGroup; 58 | children = ( 59 | 7896460417FC6B4A00709C5D /* NSDate-ServerDateExample */, 60 | 789645FD17FC6B4A00709C5D /* Frameworks */, 61 | 789645FC17FC6B4A00709C5D /* Products */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | 789645FC17FC6B4A00709C5D /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 789645FB17FC6B4A00709C5D /* NSDate-ServerDateExample.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | 789645FD17FC6B4A00709C5D /* Frameworks */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 789645FE17FC6B4A00709C5D /* Foundation.framework */, 77 | 7896460017FC6B4A00709C5D /* CoreGraphics.framework */, 78 | 7896460217FC6B4A00709C5D /* UIKit.framework */, 79 | 7896461D17FC6B4A00709C5D /* XCTest.framework */, 80 | ); 81 | name = Frameworks; 82 | sourceTree = ""; 83 | }; 84 | 7896460417FC6B4A00709C5D /* NSDate-ServerDateExample */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 7896463317FC6B5500709C5D /* NSDate+ServerDate */, 88 | 7896460D17FC6B4A00709C5D /* AppDelegate.h */, 89 | 7896460E17FC6B4A00709C5D /* AppDelegate.m */, 90 | 7896461317FC6B4A00709C5D /* ViewController.h */, 91 | 7896463717FC6B9600709C5D /* ViewController.xib */, 92 | 7896461417FC6B4A00709C5D /* ViewController.m */, 93 | 7896461617FC6B4A00709C5D /* Images.xcassets */, 94 | 7896460517FC6B4A00709C5D /* Supporting Files */, 95 | ); 96 | path = "NSDate-ServerDateExample"; 97 | sourceTree = ""; 98 | }; 99 | 7896460517FC6B4A00709C5D /* Supporting Files */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 7896460617FC6B4A00709C5D /* NSDate-ServerDateExample-Info.plist */, 103 | 7896460717FC6B4A00709C5D /* InfoPlist.strings */, 104 | 7896460A17FC6B4A00709C5D /* main.m */, 105 | 7896460C17FC6B4A00709C5D /* NSDate-ServerDateExample-Prefix.pch */, 106 | ); 107 | name = "Supporting Files"; 108 | sourceTree = ""; 109 | }; 110 | 7896463317FC6B5500709C5D /* NSDate+ServerDate */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 7896463417FC6B5E00709C5D /* NSDate+ServerDate.h */, 114 | 7896463517FC6B5E00709C5D /* NSDate+ServerDate.m */, 115 | ); 116 | name = "NSDate+ServerDate"; 117 | sourceTree = ""; 118 | }; 119 | /* End PBXGroup section */ 120 | 121 | /* Begin PBXNativeTarget section */ 122 | 789645FA17FC6B4A00709C5D /* NSDate-ServerDateExample */ = { 123 | isa = PBXNativeTarget; 124 | buildConfigurationList = 7896462D17FC6B4A00709C5D /* Build configuration list for PBXNativeTarget "NSDate-ServerDateExample" */; 125 | buildPhases = ( 126 | 789645F717FC6B4A00709C5D /* Sources */, 127 | 789645F817FC6B4A00709C5D /* Frameworks */, 128 | 789645F917FC6B4A00709C5D /* Resources */, 129 | ); 130 | buildRules = ( 131 | ); 132 | dependencies = ( 133 | ); 134 | name = "NSDate-ServerDateExample"; 135 | productName = "NSDate-ServerDateExample"; 136 | productReference = 789645FB17FC6B4A00709C5D /* NSDate-ServerDateExample.app */; 137 | productType = "com.apple.product-type.application"; 138 | }; 139 | /* End PBXNativeTarget section */ 140 | 141 | /* Begin PBXProject section */ 142 | 789645F317FC6B4A00709C5D /* Project object */ = { 143 | isa = PBXProject; 144 | attributes = { 145 | LastUpgradeCheck = 0500; 146 | ORGANIZATIONNAME = "Shai Mishali"; 147 | }; 148 | buildConfigurationList = 789645F617FC6B4A00709C5D /* Build configuration list for PBXProject "NSDate-ServerDateExample" */; 149 | compatibilityVersion = "Xcode 3.2"; 150 | developmentRegion = English; 151 | hasScannedForEncodings = 0; 152 | knownRegions = ( 153 | en, 154 | Base, 155 | ); 156 | mainGroup = 789645F217FC6B4A00709C5D; 157 | productRefGroup = 789645FC17FC6B4A00709C5D /* Products */; 158 | projectDirPath = ""; 159 | projectRoot = ""; 160 | targets = ( 161 | 789645FA17FC6B4A00709C5D /* NSDate-ServerDateExample */, 162 | ); 163 | }; 164 | /* End PBXProject section */ 165 | 166 | /* Begin PBXResourcesBuildPhase section */ 167 | 789645F917FC6B4A00709C5D /* Resources */ = { 168 | isa = PBXResourcesBuildPhase; 169 | buildActionMask = 2147483647; 170 | files = ( 171 | 7896461717FC6B4A00709C5D /* Images.xcassets in Resources */, 172 | 7896460917FC6B4A00709C5D /* InfoPlist.strings in Resources */, 173 | 7896463817FC6B9600709C5D /* ViewController.xib in Resources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXResourcesBuildPhase section */ 178 | 179 | /* Begin PBXSourcesBuildPhase section */ 180 | 789645F717FC6B4A00709C5D /* Sources */ = { 181 | isa = PBXSourcesBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | 7896461517FC6B4A00709C5D /* ViewController.m in Sources */, 185 | 7896463617FC6B5E00709C5D /* NSDate+ServerDate.m in Sources */, 186 | 7896460F17FC6B4A00709C5D /* AppDelegate.m in Sources */, 187 | 7896460B17FC6B4A00709C5D /* main.m in Sources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXSourcesBuildPhase section */ 192 | 193 | /* Begin PBXVariantGroup section */ 194 | 7896460717FC6B4A00709C5D /* InfoPlist.strings */ = { 195 | isa = PBXVariantGroup; 196 | children = ( 197 | 7896460817FC6B4A00709C5D /* en */, 198 | ); 199 | name = InfoPlist.strings; 200 | sourceTree = ""; 201 | }; 202 | /* End PBXVariantGroup section */ 203 | 204 | /* Begin XCBuildConfiguration section */ 205 | 7896462B17FC6B4A00709C5D /* Debug */ = { 206 | isa = XCBuildConfiguration; 207 | buildSettings = { 208 | ALWAYS_SEARCH_USER_PATHS = NO; 209 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 210 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 211 | CLANG_CXX_LIBRARY = "libc++"; 212 | CLANG_ENABLE_MODULES = YES; 213 | CLANG_ENABLE_OBJC_ARC = YES; 214 | CLANG_WARN_BOOL_CONVERSION = YES; 215 | CLANG_WARN_CONSTANT_CONVERSION = YES; 216 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 217 | CLANG_WARN_EMPTY_BODY = YES; 218 | CLANG_WARN_ENUM_CONVERSION = YES; 219 | CLANG_WARN_INT_CONVERSION = YES; 220 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 221 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 222 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 223 | COPY_PHASE_STRIP = NO; 224 | GCC_C_LANGUAGE_STANDARD = gnu99; 225 | GCC_DYNAMIC_NO_PIC = NO; 226 | GCC_OPTIMIZATION_LEVEL = 0; 227 | GCC_PREPROCESSOR_DEFINITIONS = ( 228 | "DEBUG=1", 229 | "$(inherited)", 230 | ); 231 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 232 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 233 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 234 | GCC_WARN_UNDECLARED_SELECTOR = YES; 235 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 236 | GCC_WARN_UNUSED_FUNCTION = YES; 237 | GCC_WARN_UNUSED_VARIABLE = YES; 238 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 239 | ONLY_ACTIVE_ARCH = YES; 240 | SDKROOT = iphoneos; 241 | }; 242 | name = Debug; 243 | }; 244 | 7896462C17FC6B4A00709C5D /* Release */ = { 245 | isa = XCBuildConfiguration; 246 | buildSettings = { 247 | ALWAYS_SEARCH_USER_PATHS = NO; 248 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 249 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 250 | CLANG_CXX_LIBRARY = "libc++"; 251 | CLANG_ENABLE_MODULES = YES; 252 | CLANG_ENABLE_OBJC_ARC = YES; 253 | CLANG_WARN_BOOL_CONVERSION = YES; 254 | CLANG_WARN_CONSTANT_CONVERSION = YES; 255 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 256 | CLANG_WARN_EMPTY_BODY = YES; 257 | CLANG_WARN_ENUM_CONVERSION = YES; 258 | CLANG_WARN_INT_CONVERSION = YES; 259 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 261 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 262 | COPY_PHASE_STRIP = YES; 263 | ENABLE_NS_ASSERTIONS = NO; 264 | GCC_C_LANGUAGE_STANDARD = gnu99; 265 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 266 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 267 | GCC_WARN_UNDECLARED_SELECTOR = YES; 268 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 269 | GCC_WARN_UNUSED_FUNCTION = YES; 270 | GCC_WARN_UNUSED_VARIABLE = YES; 271 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 272 | SDKROOT = iphoneos; 273 | VALIDATE_PRODUCT = YES; 274 | }; 275 | name = Release; 276 | }; 277 | 7896462E17FC6B4A00709C5D /* Debug */ = { 278 | isa = XCBuildConfiguration; 279 | buildSettings = { 280 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 281 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 282 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 283 | GCC_PREFIX_HEADER = "NSDate-ServerDateExample/NSDate-ServerDateExample-Prefix.pch"; 284 | INFOPLIST_FILE = "NSDate-ServerDateExample/NSDate-ServerDateExample-Info.plist"; 285 | PRODUCT_NAME = "$(TARGET_NAME)"; 286 | WRAPPER_EXTENSION = app; 287 | }; 288 | name = Debug; 289 | }; 290 | 7896462F17FC6B4A00709C5D /* Release */ = { 291 | isa = XCBuildConfiguration; 292 | buildSettings = { 293 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 294 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 295 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 296 | GCC_PREFIX_HEADER = "NSDate-ServerDateExample/NSDate-ServerDateExample-Prefix.pch"; 297 | INFOPLIST_FILE = "NSDate-ServerDateExample/NSDate-ServerDateExample-Info.plist"; 298 | PRODUCT_NAME = "$(TARGET_NAME)"; 299 | WRAPPER_EXTENSION = app; 300 | }; 301 | name = Release; 302 | }; 303 | /* End XCBuildConfiguration section */ 304 | 305 | /* Begin XCConfigurationList section */ 306 | 789645F617FC6B4A00709C5D /* Build configuration list for PBXProject "NSDate-ServerDateExample" */ = { 307 | isa = XCConfigurationList; 308 | buildConfigurations = ( 309 | 7896462B17FC6B4A00709C5D /* Debug */, 310 | 7896462C17FC6B4A00709C5D /* Release */, 311 | ); 312 | defaultConfigurationIsVisible = 0; 313 | defaultConfigurationName = Release; 314 | }; 315 | 7896462D17FC6B4A00709C5D /* Build configuration list for PBXNativeTarget "NSDate-ServerDateExample" */ = { 316 | isa = XCConfigurationList; 317 | buildConfigurations = ( 318 | 7896462E17FC6B4A00709C5D /* Debug */, 319 | 7896462F17FC6B4A00709C5D /* Release */, 320 | ); 321 | defaultConfigurationIsVisible = 0; 322 | }; 323 | /* End XCConfigurationList section */ 324 | }; 325 | rootObject = 789645F317FC6B4A00709C5D /* Project object */; 326 | } 327 | --------------------------------------------------------------------------------