Skip to content

Commit

Permalink
Update ch15
Browse files Browse the repository at this point in the history
  • Loading branch information
rnapier committed Sep 11, 2012
1 parent 2f2b043 commit 9174d33
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 19 deletions.
8 changes: 4 additions & 4 deletions ch15/Connection/Connection.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
FB11838B13E7563F00E13D59 /* ConnectionAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConnectionAppDelegate.h; sourceTree = "<group>"; };
FB11838C13E7563F00E13D59 /* ConnectionAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConnectionAppDelegate.m; sourceTree = "<group>"; };
FB11838F13E7563F00E13D59 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = "<group>"; };
FB11839113E7563F00E13D59 /* ConnectionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConnectionViewController.h; sourceTree = "<group>"; };
FB11839213E7563F00E13D59 /* ConnectionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConnectionViewController.m; sourceTree = "<group>"; };
FB11839113E7563F00E13D59 /* ConnectionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ConnectionViewController.h; path = Connection/ConnectionViewController.h; sourceTree = "<group>"; };
FB11839213E7563F00E13D59 /* ConnectionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ConnectionViewController.m; path = Connection/ConnectionViewController.m; sourceTree = "<group>"; };
FBB097CA13E84F2B00F732C1 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
FBC6861C13EC7946006238F6 /* My Example Server.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "My Example Server.cer"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand All @@ -55,6 +55,8 @@
FB11836D13E7563F00E13D59 = {
isa = PBXGroup;
children = (
FB11839113E7563F00E13D59 /* ConnectionViewController.h */,
FB11839213E7563F00E13D59 /* ConnectionViewController.m */,
FBB097CA13E84F2B00F732C1 /* Security.framework */,
FB11838213E7563F00E13D59 /* Connection */,
FB11837B13E7563F00E13D59 /* Frameworks */,
Expand Down Expand Up @@ -86,8 +88,6 @@
FB11838B13E7563F00E13D59 /* ConnectionAppDelegate.h */,
FB11838C13E7563F00E13D59 /* ConnectionAppDelegate.m */,
FB11838E13E7563F00E13D59 /* MainStoryboard.storyboard */,
FB11839113E7563F00E13D59 /* ConnectionViewController.h */,
FB11839213E7563F00E13D59 /* ConnectionViewController.m */,
FB11838313E7563F00E13D59 /* Supporting Files */,
);
path = Connection;
Expand Down
24 changes: 21 additions & 3 deletions ch15/Connection/Connection/ConnectionViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,30 @@
// ConnectionViewController.h
// Connection
//
// Created by Rob Napier on 8/1/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
// Copyright (c) 2012 Rob Napier
//
// This code is licensed under the MIT License:
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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 NON-INFRINGEMENT. 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.
//

#import <UIKit/UIKit.h>

@interface ConnectionViewController : UIViewController <NSURLConnectionDelegate, NSURLConnectionDataDelegate>
@property (nonatomic, readwrite, strong) NSURLConnection *connection;
@end
26 changes: 25 additions & 1 deletion ch15/Connection/Connection/ConnectionViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,38 @@
// ConnectionViewController.m
// Connection
//
// Created by Rob Napier on 8/1/11.
// Copyright (c) 2012 Rob Napier
//
// This code is licensed under the MIT License:
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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 NON-INFRINGEMENT. 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.
//

#import "ConnectionViewController.h"

CFAbsoluteTime SecCertificateNotValidBefore(SecCertificateRef certificate);
CFAbsoluteTime SecCertificateNotValidAfter(SecCertificateRef certificate);

@interface ConnectionViewController ()
@property (nonatomic, readwrite, strong) NSURLConnection *connection;
@end

@implementation ConnectionViewController

#pragma mark - View lifecycle
Expand Down
23 changes: 21 additions & 2 deletions ch15/CryptPic/CryptPic/RNCryptManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,27 @@
// RNCryptManager.h
// CryptPic
//
// Created by Rob Napier on 8/9/11.
// Copyright (c) 2011 Rob Napier. All rights reserved.
// Copyright (c) 2012 Rob Napier
//
// This code is licensed under the MIT License:
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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 NON-INFRINGEMENT. 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.
//

#import <Foundation/Foundation.h>
Expand Down
23 changes: 21 additions & 2 deletions ch15/CryptPic/CryptPic/RNCryptManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,27 @@
// RNCryptManager.m
// CryptPic
//
// Created by Rob Napier on 8/9/11.
// Copyright (c) 2011 Rob Napier. All rights reserved.
// Copyright (c) 2012 Rob Napier
//
// This code is licensed under the MIT License:
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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 NON-INFRINGEMENT. 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.
//

#import "RNCryptManager.h"
Expand Down
4 changes: 2 additions & 2 deletions ch15/FileExplorer/FileExplorer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -226,7 +226,7 @@
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
4 changes: 1 addition & 3 deletions ch15/FileExplorer/FileExplorer/DirectoryViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
#import "DirectoryViewController.h"

@implementation DirectoryViewController
@synthesize path=path_;
@synthesize contents=contents_;

- (void)setPath:(NSString *)path {
path_ = path;
_path = path;
[self setTitle:[path lastPathComponent]];
}

Expand Down
2 changes: 0 additions & 2 deletions ch15/FileExplorer/FileExplorer/FileExplorerAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

@implementation FileExplorerAppDelegate

@synthesize window = _window;

- (void)applicationWillResignActive:(UIApplication *)application
{
/*
Expand Down

0 comments on commit 9174d33

Please sign in to comment.