Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Conversion to ARC --- updated code is untested, but that should chang…

…e soon
  • Loading branch information...
commit 49c393be192625652e790843c53d20b546a7b381 1 parent 1e2780a
Reid van Melle authored January 18, 2012
4  RunKeeper/RunKeeper.h
@@ -60,7 +60,7 @@ extern NSString *const kRunKeeperNewPointNotification;
60 60
 }
61 61
 
62 62
 // The timestamp for the starting point --- used to calculate relative times
63  
-@property (nonatomic, retain) NSDate *startPointTimestamp;
  63
+@property (nonatomic, strong) NSDate *startPointTimestamp;
64 64
 
65 65
 
66 66
 /** TRUE if RunKeeper API thinks we have a valid connection -- NOTE, we could be wrong.  The API
@@ -73,7 +73,7 @@ extern NSString *const kRunKeeperNewPointNotification;
73 73
 /** The currentPath of GPS points which the RunKeeper API has recorded via notifications (if you 
74 74
  decide to use this feature).  You can safely pass this into the postActivity call.
75 75
  */
76  
-@property (nonatomic, retain) NSMutableArray *currentPath;
  76
+@property (nonatomic, strong) NSMutableArray *currentPath;
77 77
 
78 78
 /** Create a new client with your shiny credentials and secretz pleeze
79 79
  */
20  RunKeeper/RunKeeper.m
@@ -47,12 +47,12 @@ - (NSString*)localizedStatusText:(NSString*)bitlyStatusTxt;
47 47
 - (NSError*)errorWithCode:(NSInteger)code status:(NSString*)status;
48 48
 - (void)newPathPoint:(NSNotification*)note;
49 49
 
50  
-@property (nonatomic, retain) NSDictionary *paths;
51  
-@property (nonatomic, retain) NSNumber *userID;
  50
+@property (nonatomic, strong) NSDictionary *paths;
  51
+@property (nonatomic, strong) NSNumber *userID;
52 52
 
53 53
 // OAuth stuff
54  
-@property (nonatomic, retain) NSString *clientID, *clientSecret;
55  
-@property (nonatomic, retain, readonly) NXOAuth2Client *oauthClient;
  54
+@property (nonatomic, strong) NSString *clientID, *clientSecret;
  55
+@property (nonatomic, strong, readonly) NXOAuth2Client *oauthClient;
56 56
 
57 57
 @end
58 58
 
@@ -165,7 +165,7 @@ - (ASIFormDataRequest*)createPostRequest:(NSString*)path content:(NSString*)cont
165 165
 
166 166
 
167 167
 - (ASIHTTPRequest*)request:(NSString*)path onCompletion:(RIJSONCompletionBlock)completion onFailed:(RIBasicFailedBlock)failed {
168  
-    __block ASIHTTPRequest *request = [self createRequest:path];    
  168
+    __unsafe_unretained ASIHTTPRequest *request = [self createRequest:path];    
169 169
     
170 170
     [request setCompletionBlock:^{
171 171
         // Use when fetching text data
@@ -184,7 +184,7 @@ - (ASIHTTPRequest*)request:(NSString*)path onCompletion:(RIJSONCompletionBlock)c
184 184
 }
185 185
 
186 186
 - (ASIHTTPRequest*)postRequest:(NSString*)path content:(NSString*)content contentType:(NSString*)contentType onCompletion:(RIJSONCompletionBlock)completion onFailed:(RIBasicFailedBlock)failed {
187  
-    __block ASIFormDataRequest *request = [self createPostRequest:path content:content contentType:contentType];    
  187
+    __unsafe_unretained ASIFormDataRequest *request = [self createPostRequest:path content:content contentType:contentType];    
188 188
     
189 189
     [request setCompletionBlock:^{
190 190
         // Use when fetching text data
@@ -218,9 +218,9 @@ - (void)getBasePaths
218 218
         self.paths = nil;
219 219
         self.userID = nil;
220 220
         connected = NO;
221  
-        UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"RunKeeper ERror" 
  221
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"RunKeeper ERror" 
222 222
                                                          message:@"Error while communication with RunKeeper."
223  
-                                                        delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
  223
+                                                        delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
224 224
         [alert show];
225 225
     }];
226 226
 }
@@ -355,10 +355,6 @@ - (NXOAuth2Client*)oauthClient {
355 355
 
356 356
 - (void)dealloc {	
357 357
     [[NSNotificationCenter defaultCenter] removeObserver:self];
358  
-    [oauthClient release];
359  
-    [paths release];
360  
-    [userID release];
361  
-	[super dealloc];
362 358
 }
363 359
 
364 360
 
4  RunKeeper/RunKeeperPathPoint.h
@@ -20,9 +20,9 @@ typedef enum {
20 20
 
21 21
 @interface RunKeeperPathPoint : NSObject {
22 22
 }
23  
-@property (nonatomic, retain) NSDate *time;
  23
+@property (nonatomic, strong) NSDate *time;
24 24
 @property (nonatomic, assign) NSTimeInterval timeStamp;
25  
-@property (nonatomic, retain) CLLocation *location;
  25
+@property (nonatomic, strong) CLLocation *location;
26 26
 @property (nonatomic, assign) RunKeeperPathPointType pointType;
27 27
 
28 28
 - (id)initWithLocation:(CLLocation*)loc ofType:(RunKeeperPathPointType)t;
6  RunKeeper/RunKeeperPathPoint.m
@@ -49,10 +49,4 @@ - (id)proxyForJson {
49 49
             nil];
50 50
 }
51 51
 
52  
-- (void)dealloc
53  
-{
54  
-    [super dealloc];
55  
-    [self.location release];
56  
-}
57  
-
58 52
 @end
76  runkeepersample/runkeepersample.xcodeproj/project.pbxproj
@@ -25,37 +25,37 @@
25 25
 		63C1FBDE1424230F0074CF99 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 63C1FBDC1424230F0074CF99 /* InfoPlist.strings */; };
26 26
 		63C1FBE11424230F0074CF99 /* runkeepersampleTests.h in Resources */ = {isa = PBXBuildFile; fileRef = 63C1FBE01424230F0074CF99 /* runkeepersampleTests.h */; };
27 27
 		63C1FBE31424230F0074CF99 /* runkeepersampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBE21424230F0074CF99 /* runkeepersampleTests.m */; };
28  
-		63C1FC3C1424261C0074CF99 /* NSObject+SBJson.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBF41424261B0074CF99 /* NSObject+SBJson.m */; };
29  
-		63C1FC3D1424261C0074CF99 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBF71424261B0074CF99 /* SBJsonParser.m */; };
30  
-		63C1FC3E1424261C0074CF99 /* SBJsonStreamParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBF91424261B0074CF99 /* SBJsonStreamParser.m */; };
31  
-		63C1FC3F1424261C0074CF99 /* SBJsonStreamParserAccumulator.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBFB1424261B0074CF99 /* SBJsonStreamParserAccumulator.m */; };
32  
-		63C1FC401424261C0074CF99 /* SBJsonStreamParserAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBFD1424261B0074CF99 /* SBJsonStreamParserAdapter.m */; };
33  
-		63C1FC411424261C0074CF99 /* SBJsonStreamParserState.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBFF1424261B0074CF99 /* SBJsonStreamParserState.m */; };
34  
-		63C1FC421424261C0074CF99 /* SBJsonStreamWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC011424261B0074CF99 /* SBJsonStreamWriter.m */; };
35  
-		63C1FC431424261C0074CF99 /* SBJsonStreamWriterAccumulator.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC031424261B0074CF99 /* SBJsonStreamWriterAccumulator.m */; };
36  
-		63C1FC441424261C0074CF99 /* SBJsonStreamWriterState.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC051424261B0074CF99 /* SBJsonStreamWriterState.m */; };
37  
-		63C1FC451424261C0074CF99 /* SBJsonTokeniser.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC071424261B0074CF99 /* SBJsonTokeniser.m */; };
38  
-		63C1FC461424261C0074CF99 /* SBJsonUTF8Stream.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC091424261B0074CF99 /* SBJsonUTF8Stream.m */; };
39  
-		63C1FC471424261C0074CF99 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC0B1424261B0074CF99 /* SBJsonWriter.m */; };
40  
-		63C1FC481424261C0074CF99 /* ASIAuthenticationDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC0E1424261B0074CF99 /* ASIAuthenticationDialog.m */; };
41  
-		63C1FC491424261C0074CF99 /* ASIDataCompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC111424261B0074CF99 /* ASIDataCompressor.m */; };
42  
-		63C1FC4A1424261C0074CF99 /* ASIDataDecompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC131424261B0074CF99 /* ASIDataDecompressor.m */; };
43  
-		63C1FC4B1424261C0074CF99 /* ASIDownloadCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC151424261B0074CF99 /* ASIDownloadCache.m */; };
44  
-		63C1FC4C1424261C0074CF99 /* ASIFormDataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC171424261B0074CF99 /* ASIFormDataRequest.m */; };
45  
-		63C1FC4D1424261C0074CF99 /* ASIHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC191424261B0074CF99 /* ASIHTTPRequest.m */; };
46  
-		63C1FC4E1424261C0074CF99 /* ASIInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC1D1424261B0074CF99 /* ASIInputStream.m */; };
47  
-		63C1FC4F1424261C0074CF99 /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC1F1424261B0074CF99 /* ASINetworkQueue.m */; };
48  
-		63C1FC501424261C0074CF99 /* NSData+NXOAuth2.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC231424261C0074CF99 /* NSData+NXOAuth2.m */; };
49  
-		63C1FC511424261C0074CF99 /* NSString+NXOAuth2.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC251424261C0074CF99 /* NSString+NXOAuth2.m */; };
50  
-		63C1FC521424261C0074CF99 /* NSURL+NXOAuth2.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC271424261C0074CF99 /* NSURL+NXOAuth2.m */; };
51  
-		63C1FC531424261C0074CF99 /* NXOAuth2AccessToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC2B1424261C0074CF99 /* NXOAuth2AccessToken.m */; };
52  
-		63C1FC541424261C0074CF99 /* NXOAuth2Client.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC2D1424261C0074CF99 /* NXOAuth2Client.m */; };
53  
-		63C1FC551424261C0074CF99 /* NXOAuth2Connection.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC301424261C0074CF99 /* NXOAuth2Connection.m */; };
54  
-		63C1FC561424261C0074CF99 /* NXOAuth2Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC331424261C0074CF99 /* NXOAuth2Constants.m */; };
55  
-		63C1FC571424261C0074CF99 /* NXOAuth2FileStreamWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC351424261C0074CF99 /* NXOAuth2FileStreamWrapper.m */; };
56  
-		63C1FC581424261C0074CF99 /* NXOAuth2PostBodyPart.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC371424261C0074CF99 /* NXOAuth2PostBodyPart.m */; };
57  
-		63C1FC591424261C0074CF99 /* NXOAuth2PostBodyStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC391424261C0074CF99 /* NXOAuth2PostBodyStream.m */; };
58  
-		63C1FC5D142426750074CF99 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC5B142426750074CF99 /* Reachability.m */; };
  28
+		63C1FC3C1424261C0074CF99 /* NSObject+SBJson.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBF41424261B0074CF99 /* NSObject+SBJson.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  29
+		63C1FC3D1424261C0074CF99 /* SBJsonParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBF71424261B0074CF99 /* SBJsonParser.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  30
+		63C1FC3E1424261C0074CF99 /* SBJsonStreamParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBF91424261B0074CF99 /* SBJsonStreamParser.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  31
+		63C1FC3F1424261C0074CF99 /* SBJsonStreamParserAccumulator.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBFB1424261B0074CF99 /* SBJsonStreamParserAccumulator.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  32
+		63C1FC401424261C0074CF99 /* SBJsonStreamParserAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBFD1424261B0074CF99 /* SBJsonStreamParserAdapter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  33
+		63C1FC411424261C0074CF99 /* SBJsonStreamParserState.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FBFF1424261B0074CF99 /* SBJsonStreamParserState.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  34
+		63C1FC421424261C0074CF99 /* SBJsonStreamWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC011424261B0074CF99 /* SBJsonStreamWriter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  35
+		63C1FC431424261C0074CF99 /* SBJsonStreamWriterAccumulator.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC031424261B0074CF99 /* SBJsonStreamWriterAccumulator.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  36
+		63C1FC441424261C0074CF99 /* SBJsonStreamWriterState.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC051424261B0074CF99 /* SBJsonStreamWriterState.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  37
+		63C1FC451424261C0074CF99 /* SBJsonTokeniser.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC071424261B0074CF99 /* SBJsonTokeniser.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  38
+		63C1FC461424261C0074CF99 /* SBJsonUTF8Stream.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC091424261B0074CF99 /* SBJsonUTF8Stream.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  39
+		63C1FC471424261C0074CF99 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC0B1424261B0074CF99 /* SBJsonWriter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  40
+		63C1FC481424261C0074CF99 /* ASIAuthenticationDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC0E1424261B0074CF99 /* ASIAuthenticationDialog.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  41
+		63C1FC491424261C0074CF99 /* ASIDataCompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC111424261B0074CF99 /* ASIDataCompressor.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  42
+		63C1FC4A1424261C0074CF99 /* ASIDataDecompressor.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC131424261B0074CF99 /* ASIDataDecompressor.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  43
+		63C1FC4B1424261C0074CF99 /* ASIDownloadCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC151424261B0074CF99 /* ASIDownloadCache.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  44
+		63C1FC4C1424261C0074CF99 /* ASIFormDataRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC171424261B0074CF99 /* ASIFormDataRequest.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  45
+		63C1FC4D1424261C0074CF99 /* ASIHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC191424261B0074CF99 /* ASIHTTPRequest.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  46
+		63C1FC4E1424261C0074CF99 /* ASIInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC1D1424261B0074CF99 /* ASIInputStream.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  47
+		63C1FC4F1424261C0074CF99 /* ASINetworkQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC1F1424261B0074CF99 /* ASINetworkQueue.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  48
+		63C1FC501424261C0074CF99 /* NSData+NXOAuth2.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC231424261C0074CF99 /* NSData+NXOAuth2.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  49
+		63C1FC511424261C0074CF99 /* NSString+NXOAuth2.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC251424261C0074CF99 /* NSString+NXOAuth2.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  50
+		63C1FC521424261C0074CF99 /* NSURL+NXOAuth2.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC271424261C0074CF99 /* NSURL+NXOAuth2.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  51
+		63C1FC531424261C0074CF99 /* NXOAuth2AccessToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC2B1424261C0074CF99 /* NXOAuth2AccessToken.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  52
+		63C1FC541424261C0074CF99 /* NXOAuth2Client.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC2D1424261C0074CF99 /* NXOAuth2Client.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  53
+		63C1FC551424261C0074CF99 /* NXOAuth2Connection.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC301424261C0074CF99 /* NXOAuth2Connection.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  54
+		63C1FC561424261C0074CF99 /* NXOAuth2Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC331424261C0074CF99 /* NXOAuth2Constants.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  55
+		63C1FC571424261C0074CF99 /* NXOAuth2FileStreamWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC351424261C0074CF99 /* NXOAuth2FileStreamWrapper.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  56
+		63C1FC581424261C0074CF99 /* NXOAuth2PostBodyPart.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC371424261C0074CF99 /* NXOAuth2PostBodyPart.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  57
+		63C1FC591424261C0074CF99 /* NXOAuth2PostBodyStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC391424261C0074CF99 /* NXOAuth2PostBodyStream.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
  58
+		63C1FC5D142426750074CF99 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 63C1FC5B142426750074CF99 /* Reachability.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
59 59
 		63C1FC60142426A20074CF99 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C1FC5E142426A20074CF99 /* CoreLocation.framework */; };
60 60
 		63C1FC61142426A20074CF99 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C1FC5F142426A20074CF99 /* SystemConfiguration.framework */; };
61 61
 		63C1FC63142426BE0074CF99 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C1FC62142426BE0074CF99 /* CFNetwork.framework */; };
@@ -184,13 +184,13 @@
184 184
 		63C1FC64142426D10074CF99 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
185 185
 		63C1FC66142426DC0074CF99 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
186 186
 		63C1FC68142426EB0074CF99 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
187  
-		63C1FC6D142433FC0074CF99 /* SynthesizeSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SynthesizeSingleton.h; sourceTree = "<group>"; };
188 187
 		63C1FC77142435AC0074CF99 /* RunKeeper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunKeeper.h; sourceTree = "<group>"; };
189 188
 		63C1FC78142435AC0074CF99 /* RunKeeper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RunKeeper.m; sourceTree = "<group>"; };
190 189
 		63C1FC7A142435D00074CF99 /* RunKeeperErrors.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = RunKeeperErrors.strings; sourceTree = "<group>"; };
191 190
 		63C5E66114C7A5C30016E3AA /* connect-blue-black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "connect-blue-black.png"; sourceTree = "<group>"; };
192 191
 		63C5E66414C7AC0B0016E3AA /* RunKeeperHeartRatePoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunKeeperHeartRatePoint.h; sourceTree = "<group>"; };
193 192
 		63C5E66514C7AC0B0016E3AA /* RunKeeperHeartRatePoint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RunKeeperHeartRatePoint.m; sourceTree = "<group>"; };
  193
+		63C5E67514C7B5680016E3AA /* ARCSingleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ARCSingleton.h; sourceTree = "<group>"; };
194 194
 /* End PBXFileReference section */
195 195
 
196 196
 /* Begin PBXFrameworksBuildPhase section */
@@ -424,7 +424,7 @@
424 424
 		63C1FC5A1424266B0074CF99 /* Util */ = {
425 425
 			isa = PBXGroup;
426 426
 			children = (
427  
-				63C1FC6D142433FC0074CF99 /* SynthesizeSingleton.h */,
  427
+				63C5E67514C7B5680016E3AA /* ARCSingleton.h */,
428 428
 				63C1FC5B142426750074CF99 /* Reachability.m */,
429 429
 				63C1FC5C142426750074CF99 /* Reachability.h */,
430 430
 			);
@@ -664,7 +664,7 @@
664 664
 				GCC_VERSION = com.apple.compilers.llvmgcc42;
665 665
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
666 666
 				GCC_WARN_UNUSED_VARIABLE = YES;
667  
-				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
  667
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
668 668
 				SDKROOT = iphoneos;
669 669
 			};
670 670
 			name = Debug;
@@ -678,7 +678,7 @@
678 678
 				GCC_VERSION = com.apple.compilers.llvmgcc42;
679 679
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
680 680
 				GCC_WARN_UNUSED_VARIABLE = YES;
681  
-				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
  681
+				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
682 682
 				OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
683 683
 				SDKROOT = iphoneos;
684 684
 			};
@@ -688,10 +688,12 @@
688 688
 			isa = XCBuildConfiguration;
689 689
 			buildSettings = {
690 690
 				ALWAYS_SEARCH_USER_PATHS = NO;
  691
+				CLANG_ENABLE_OBJC_ARC = YES;
691 692
 				COPY_PHASE_STRIP = NO;
692 693
 				GCC_DYNAMIC_NO_PIC = NO;
693 694
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
694 695
 				GCC_PREFIX_HEADER = "runkeepersample/runkeepersample-Prefix.pch";
  696
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
695 697
 				INFOPLIST_FILE = "runkeepersample/runkeepersample-Info.plist";
696 698
 				PRODUCT_NAME = "$(TARGET_NAME)";
697 699
 				WRAPPER_EXTENSION = app;
@@ -702,9 +704,11 @@
702 704
 			isa = XCBuildConfiguration;
703 705
 			buildSettings = {
704 706
 				ALWAYS_SEARCH_USER_PATHS = NO;
  707
+				CLANG_ENABLE_OBJC_ARC = YES;
705 708
 				COPY_PHASE_STRIP = YES;
706 709
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
707 710
 				GCC_PREFIX_HEADER = "runkeepersample/runkeepersample-Prefix.pch";
  711
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
708 712
 				INFOPLIST_FILE = "runkeepersample/runkeepersample-Info.plist";
709 713
 				PRODUCT_NAME = "$(TARGET_NAME)";
710 714
 				VALIDATE_PRODUCT = YES;
@@ -723,6 +727,7 @@
723 727
 				);
724 728
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
725 729
 				GCC_PREFIX_HEADER = "runkeepersampleTests/runkeepersampleTests-Prefix.pch";
  730
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
726 731
 				INFOPLIST_FILE = "runkeepersampleTests/runkeepersampleTests-Info.plist";
727 732
 				OTHER_LDFLAGS = (
728 733
 					"-framework",
@@ -745,6 +750,7 @@
745 750
 				);
746 751
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
747 752
 				GCC_PREFIX_HEADER = "runkeepersampleTests/runkeepersampleTests-Prefix.pch";
  753
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
748 754
 				INFOPLIST_FILE = "runkeepersampleTests/runkeepersampleTests-Info.plist";
749 755
 				OTHER_LDFLAGS = (
750 756
 					"-framework",
34  runkeepersample/runkeepersample/ARCSingleton.h
... ...
@@ -0,0 +1,34 @@
  1
+//
  2
+//  EDPSingleton.h
  3
+//  TestPrep
  4
+//
  5
+//  Created by Travis Foster on 9/30/11.
  6
+//  Copyright (c) 2011 -. All rights reserved.
  7
+//
  8
+
  9
+#ifndef EDP_Singleton_h
  10
+#define EDP_Singleton_h
  11
+
  12
+
  13
+// ARC-compatible singleton using blocks 
  14
+
  15
+#define SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER(__CLASSNAME__)	\
  16
+    \
  17
++ (__CLASSNAME__*) sharedInstance;
  18
+
  19
+
  20
+#define SYNTHESIZE_SINGLETON_FOR_CLASS(__CLASSNAME__)	\
  21
+    \
  22
+static __CLASSNAME__* _##__CLASSNAME__##_sharedInstance = nil;	\
  23
+\
  24
++ (__CLASSNAME__*) sharedInstance	\
  25
+{	\
  26
+    static dispatch_once_t _##__CLASSNAME__##_Once = 0;	\
  27
+    dispatch_once(&_##__CLASSNAME__##_Once, ^{	\
  28
+        _##__CLASSNAME__##_sharedInstance = [[self alloc] init]; \
  29
+    });	\
  30
+    \
  31
+    return _##__CLASSNAME__##_sharedInstance;	\
  32
+}	
  33
+
  34
+#endif // EDP_Singleton_h
5  runkeepersample/runkeepersample/AppData.h
@@ -7,6 +7,7 @@
7 7
 //
8 8
 
9 9
 #import <Foundation/Foundation.h>
  10
+#import "ARCSingleton.h"
10 11
 
11 12
 @class RunKeeper;
12 13
 
@@ -15,8 +16,8 @@
15 16
     RunKeeper *runKeeper;    
16 17
 }
17 18
 
18  
-@property (nonatomic, retain) RunKeeper *runKeeper;
  19
+SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER(AppData)
19 20
 
20  
-+ (AppData*)sharedAppData;
  21
+@property (nonatomic, strong) RunKeeper *runKeeper;
21 22
 
22 23
 @end
3  runkeepersample/runkeepersample/AppData.m
@@ -7,7 +7,6 @@
7 7
 //
8 8
 
9 9
 #import "AppData.h"
10  
-#import "SynthesizeSingleton.h"
11 10
 #import "RunKeeper.h"
12 11
 
13 12
 #define kRunKeeperClientID @"055cac1c950b46e6ac7910d62800a854"
@@ -25,7 +24,7 @@ - (RunKeeper*)runKeeper
25 24
         return runKeeper;
26 25
     }
27 26
     
28  
-    self.runKeeper = [[[RunKeeper alloc] initWithClientID:kRunKeeperClientID clientSecret:kRunKeeperClientSecret] autorelease];
  27
+    self.runKeeper = [[RunKeeper alloc] initWithClientID:kRunKeeperClientID clientSecret:kRunKeeperClientSecret];
29 28
     return runKeeper;
30 29
     
31 30
 }
10  runkeepersample/runkeepersample/RootViewController.h
@@ -29,11 +29,11 @@ typedef enum {
29 29
     NSTimeInterval elapsedTime;
30 30
 }
31 31
 
32  
-@property (nonatomic, retain) CLLocationManager *locationManager;
33  
-@property (nonatomic, retain) NSDate *beginTime, *startTime, *endTime;
34  
-@property (nonatomic, retain) NSTimer *tickTimer;
35  
-@property (nonatomic, retain) IBOutlet UILabel *progressLabel;
36  
-@property (nonatomic, retain) IBOutlet UIButton *startButton, *pauseButton, *disconnectButton, *connectButton;
  32
+@property (nonatomic, strong) CLLocationManager *locationManager;
  33
+@property (nonatomic, strong) NSDate *beginTime, *startTime, *endTime;
  34
+@property (nonatomic, strong) NSTimer *tickTimer;
  35
+@property (nonatomic, strong) IBOutlet UILabel *progressLabel;
  36
+@property (nonatomic, strong) IBOutlet UIButton *startButton, *pauseButton, *disconnectButton, *connectButton;
37 37
 
38 38
 - (IBAction)toggleStart;
39 39
 - (IBAction)togglePause;
55  runkeepersample/runkeepersample/RootViewController.m
@@ -37,7 +37,7 @@ @implementation RootViewController
37 37
 
38 38
 - (void)updateViews
39 39
 {
40  
-    RunKeeper *rk = [AppData sharedAppData].runKeeper;
  40
+    RunKeeper *rk = [AppData sharedInstance].runKeeper;
41 41
     self.connectButton.enabled = !rk.connected;
42 42
     self.disconnectButton.hidden = !rk.connected;
43 43
     self.pauseButton.hidden = YES;
@@ -56,6 +56,9 @@ - (void)viewDidLoad
56 56
     self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
57 57
     self.locationManager.distanceFilter = 0.0;
58 58
     [self.locationManager startUpdatingLocation]; 
  59
+    
  60
+    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"History" style:UIBarButtonItemStyleBordered 
  61
+                                                                              target:self action:@selector(viewHistory:)];
59 62
 }
60 63
 
61 64
 - (void)viewWillAppear:(BOOL)animated
@@ -81,7 +84,7 @@ - (void)viewDidDisappear:(BOOL)animated
81 84
 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
82 85
 {
83 86
     if (buttonIndex == 1) {
84  
-        RunKeeper *rk = [AppData sharedAppData].runKeeper;
  87
+        RunKeeper *rk = [AppData sharedInstance].runKeeper;
85 88
         [rk postActivity:kRKRunning 
86 89
                    start:self.beginTime 
87 90
                 distance:nil 
@@ -92,17 +95,17 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto
92 95
                     path:rk.currentPath 
93 96
          heartRatePoints:nil
94 97
                  success:^{
95  
-                     UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Success" 
  98
+                     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Success" 
96 99
                                                                       message:@"Your activity was posted to your RunKeeper account."
97  
-                                                                     delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
  100
+                                                                     delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
98 101
                      [alert show];
99 102
                      
100 103
                  }
101 104
                   failed:^(NSError *err){
102 105
                       NSString *msg = [NSString stringWithFormat:@"Upload to RunKeeper failed: %@", [err localizedDescription]]; 
103  
-                      UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Failed" 
  106
+                      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Failed" 
104 107
                                                                        message:msg
105  
-                                                                      delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
  108
+                                                                      delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
106 109
                       [alert show];
107 110
                   }];
108 111
     }
@@ -117,7 +120,7 @@ - (IBAction)toggleStart
117 120
         self.beginTime = self.startTime;
118 121
         [self.startButton setTitle:@"STOP" forState:UIControlStateNormal];
119 122
         self.pauseButton.hidden = NO;
120  
-        RunKeeperPathPoint *point = [[[RunKeeperPathPoint alloc] initWithLocation:self.locationManager.location ofType:kRKStartPoint] autorelease];
  123
+        RunKeeperPathPoint *point = [[RunKeeperPathPoint alloc] initWithLocation:self.locationManager.location ofType:kRKStartPoint];
121 124
         [[NSNotificationCenter defaultCenter] postNotificationName:kRunKeeperNewPointNotification object:point];
122 125
         self.tickTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(tick) userInfo:nil	repeats:YES];
123 126
     } else if ((state == kRunning) || (state == kPaused)) {
@@ -128,11 +131,11 @@ - (IBAction)toggleStart
128 131
         self.tickTimer = nil;
129 132
         self.endTime = [NSDate date];
130 133
         elapsedTime += [self.endTime timeIntervalSinceDate:self.startTime];
131  
-        RunKeeperPathPoint *point = [[[RunKeeperPathPoint alloc] initWithLocation:self.locationManager.location ofType:kRKEndPoint] autorelease];
  134
+        RunKeeperPathPoint *point = [[RunKeeperPathPoint alloc] initWithLocation:self.locationManager.location ofType:kRKEndPoint];
132 135
         [[NSNotificationCenter defaultCenter] postNotificationName:kRunKeeperNewPointNotification  object:point];
133  
-        UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Upload?" 
  136
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Upload?" 
134 137
                                                          message:@"Would you like to upload your activity to RunKeeper?"
135  
-                                                        delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"OK", nil] autorelease];
  138
+                                                        delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"OK", nil];
136 139
         [alert show];
137 140
         self.progressLabel.text = @"Touch start to begin";
138 141
         
@@ -147,7 +150,7 @@ - (IBAction)togglePause
147 150
         elapsedTime += [[NSDate date] timeIntervalSinceDate:self.startTime];
148 151
         [tickTimer invalidate];
149 152
         self.tickTimer = nil;
150  
-        RunKeeperPathPoint *point = [[[RunKeeperPathPoint alloc] initWithLocation:locationManager.location ofType:kRKPausePoint] autorelease];
  153
+        RunKeeperPathPoint *point = [[RunKeeperPathPoint alloc] initWithLocation:locationManager.location ofType:kRKPausePoint];
151 154
         [[NSNotificationCenter defaultCenter] postNotificationName:kRunKeeperNewPointNotification 
152 155
                                                             object:point];
153 156
     } else if (state == kPaused) {
@@ -155,7 +158,7 @@ - (IBAction)togglePause
155 158
         [self.pauseButton setTitle:@"PAUSE" forState:UIControlStateNormal];
156 159
         self.startTime = [NSDate date];
157 160
         self.tickTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(tick) userInfo:nil	repeats:YES];
158  
-        RunKeeperPathPoint *point = [[[RunKeeperPathPoint alloc] initWithLocation:locationManager.location ofType:kRKResumePoint] autorelease];
  161
+        RunKeeperPathPoint *point = [[RunKeeperPathPoint alloc] initWithLocation:locationManager.location ofType:kRKResumePoint];
159 162
         [[NSNotificationCenter defaultCenter] postNotificationName:kRunKeeperNewPointNotification 
160 163
                                                             object:point];
161 164
     }
@@ -163,16 +166,16 @@ - (IBAction)togglePause
163 166
 
164 167
 - (IBAction)connectToRunKeeper
165 168
 {
166  
-    [[AppData sharedAppData].runKeeper tryToConnect:self];
  169
+    [[AppData sharedInstance].runKeeper tryToConnect:self];
167 170
 }
168 171
 
169 172
 - (IBAction)disconnect
170 173
 {
171  
-    [[AppData sharedAppData].runKeeper disconnect];
  174
+    [[AppData sharedInstance].runKeeper disconnect];
172 175
     [self updateViews];
173  
-    UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Disconnect" 
  176
+    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Disconnect" 
174 177
                                                      message:@"Running Intensity is no longer linked to your RunKeeper account"
175  
-                                                    delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
  178
+                                                    delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
176 179
     [alert show];
177 180
 }
178 181
 
@@ -186,7 +189,7 @@ - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLoca
186 189
 {
187 190
     //NSLog(@"didUpdateLocation: %@", newLocation);
188 191
     if ((state == kRunning) || (state == kPaused)) {
189  
-        RunKeeperPathPoint *point = [[[RunKeeperPathPoint alloc] initWithLocation:newLocation ofType:kRKGPSPoint] autorelease];
  192
+        RunKeeperPathPoint *point = [[RunKeeperPathPoint alloc] initWithLocation:newLocation ofType:kRKGPSPoint];
190 193
         [[NSNotificationCenter defaultCenter] postNotificationName:kRunKeeperNewPointNotification object:point];
191 194
     }
192 195
     
@@ -198,9 +201,9 @@ - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLoca
198 201
 - (void)connected
199 202
 {
200 203
     [self updateViews];
201  
-    UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Connected" 
  204
+    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Connected" 
202 205
                                                      message:@"Running Intensity is linked to your RunKeeper account"
203  
-                                                    delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
  206
+                                                    delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
204 207
     [alert show];
205 208
     
206 209
 }
@@ -209,9 +212,9 @@ - (void)connected
209 212
 - (void)connectionFailed:(NSError*)err
210 213
 {
211 214
     [self updateViews];
212  
-    UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Connection Failed" 
  215
+    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Connection Failed" 
213 216
                                                      message:@"The link to your RunKeeper account failed."
214  
-                                                    delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
  217
+                                                    delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
215 218
     [alert show];
216 219
 }
217 220
 
@@ -219,7 +222,7 @@ - (void)connectionFailed:(NSError*)err
219 222
 // tryToAuthorize at this point
220 223
 - (void)needsAuthentication
221 224
 {
222  
-    [[AppData sharedAppData].runKeeper tryToAuthorize];
  225
+    [[AppData sharedInstance].runKeeper tryToAuthorize];
223 226
 }
224 227
 
225 228
 
@@ -254,17 +257,9 @@ - (void)viewDidUnload
254 257
 
255 258
 - (void)dealloc
256 259
 {
257  
-    [super dealloc];
258  
-    [self.progressLabel release];
259  
-    [self.startButton release];
260  
-    [self.pauseButton release];
261  
-    [self.disconnectButton release];
262  
-    [self.connectButton release];
263 260
     [tickTimer invalidate];
264  
-	[tickTimer release];
265 261
     if (locationManager) {
266 262
         [locationManager stopUpdatingLocation];
267  
-        [locationManager release];
268 263
     }
269 264
 }
270 265
 
68  runkeepersample/runkeepersample/SynthesizeSingleton.h
... ...
@@ -1,68 +0,0 @@
1  
-//
2  
-//  SynthesizeSingleton.h
3  
-//  CocoaWithLove
4  
-//
5  
-//  Created by Matt Gallagher on 20/10/08.
6  
-//  Copyright 2009 Matt Gallagher. All rights reserved.
7  
-//
8  
-//  Permission is given to use this source code file without charge in any
9  
-//  project, commercial or otherwise, entirely at your risk, with the condition
10  
-//  that any redistribution (in part or whole) of source code must retain
11  
-//  this copyright and permission notice. Attribution in compiled projects is
12  
-//  appreciated but not required.
13  
-//
14  
-
15  
-#define SYNTHESIZE_SINGLETON_FOR_CLASS(classname) \
16  
- \
17  
-static classname *shared##classname = nil; \
18  
- \
19  
-+ (classname *)shared##classname \
20  
-{ \
21  
-	@synchronized(self) \
22  
-	{ \
23  
-		if (shared##classname == nil) \
24  
-		{ \
25  
-			shared##classname = [[self alloc] init]; \
26  
-		} \
27  
-	} \
28  
-	 \
29  
-	return shared##classname; \
30  
-} \
31  
- \
32  
-+ (id)allocWithZone:(NSZone *)zone \
33  
-{ \
34  
-	@synchronized(self) \
35  
-	{ \
36  
-		if (shared##classname == nil) \
37  
-		{ \
38  
-			shared##classname = [super allocWithZone:zone]; \
39  
-			return shared##classname; \
40  
-		} \
41  
-	} \
42  
-	 \
43  
-	return nil; \
44  
-} \
45  
- \
46  
-- (id)copyWithZone:(NSZone *)zone \
47  
-{ \
48  
-	return self; \
49  
-} \
50  
- \
51  
-- (id)retain \
52  
-{ \
53  
-	return self; \
54  
-} \
55  
- \
56  
-- (NSUInteger)retainCount \
57  
-{ \
58  
-	return NSUIntegerMax; \
59  
-} \
60  
- \
61  
-- (void)release \
62  
-{ \
63  
-} \
64  
- \
65  
-- (id)autorelease \
66  
-{ \
67  
-	return self; \
68  
-}
8  runkeepersample/runkeepersample/main.m
@@ -10,8 +10,8 @@
10 10
 
11 11
 int main(int argc, char *argv[])
12 12
 {
13  
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
14  
-    int retVal = UIApplicationMain(argc, argv, nil, nil);
15  
-    [pool release];
16  
-    return retVal;
  13
+    @autoreleasepool {
  14
+        int retVal = UIApplicationMain(argc, argv, nil, nil);
  15
+        return retVal;
  16
+    }
17 17
 }
4  runkeepersample/runkeepersample/runkeepersampleAppDelegate.h
@@ -12,8 +12,8 @@
12 12
 @interface runkeepersampleAppDelegate : NSObject <UIApplicationDelegate> {
13 13
 }
14 14
 
15  
-@property (nonatomic, retain) IBOutlet UIWindow *window;
  15
+@property (nonatomic, strong) IBOutlet UIWindow *window;
16 16
 
17  
-@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
  17
+@property (nonatomic, strong) IBOutlet UINavigationController *navigationController;
18 18
 
19 19
 @end
8  runkeepersample/runkeepersample/runkeepersampleAppDelegate.m
@@ -21,7 +21,7 @@ @implementation runkeepersampleAppDelegate
21 21
 
22 22
 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
23 23
     
24  
-    [[AppData sharedAppData].runKeeper handleOpenURL:url];
  24
+    [[AppData sharedInstance].runKeeper handleOpenURL:url];
25 25
     return TRUE;
26 26
 }
27 27
 
@@ -73,11 +73,5 @@ - (void)applicationWillTerminate:(UIApplication *)application
73 73
      */
74 74
 }
75 75
 
76  
-- (void)dealloc
77  
-{
78  
-    [_window release];
79  
-    [_navigationController release];
80  
-    [super dealloc];
81  
-}
82 76
 
83 77
 @end

0 notes on commit 49c393b

Please sign in to comment.
Something went wrong with that request. Please try again.