Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modernized to iOS 6.1 SDK.

Refactored to ARC, NSJSONSerialization that is built into the system,
and modern API.
  • Loading branch information...
commit 62d4281b4578d8975e53a4a12e0b6ff4d08e2657 1 parent 92ad9fc
@xcvista xcvista authored
Showing with 479 additions and 279 deletions.
  1. +65 −50 ApplicationError.xib
  2. +1 −1  Classes/ApplicationErrorViewController.h
  3. +0 −5 Classes/ApplicationErrorViewController.m
  4. +5 −5 Classes/Commit.h
  5. +4 −11 Classes/Commit.m
  6. +0 −8 Classes/Config.m
  7. +6 −5 Classes/Connector.m
  8. +6 −6 Classes/LoginViewController.h
  9. +2 −10 Classes/LoginViewController.m
  10. +4 −4 Classes/Reachability.h
  11. +9 −12 Classes/Reachability.m
  12. +1 −1  Classes/RepoCommitsViewController.h
  13. +1 −5 Classes/RepoCommitsViewController.m
  14. +2 −2 Classes/RepositoriesViewController.h
  15. +4 −9 Classes/RepositoriesViewController.m
  16. +4 −4 Classes/Repository.h
  17. +8 −15 Classes/Repository.m
  18. +4 −7 Classes/RootViewController.m
  19. +2 −2 Classes/git_phoneAppDelegate.h
  20. +4 −8 Classes/git_phoneAppDelegate.m
  21. +3 −3 Info.plist
  22. +115 −92 Login.xib
  23. +15 −0 NSDictionary+JSON.h
  24. +21 −0 NSDictionary+JSON.m
  25. +15 −0 NSString+JSON.h
  26. +20 −0 NSString+JSON.m
  27. +29 −9 git-phone.xcodeproj/project.pbxproj
  28. +7 −0 git-phone.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  29. BIN  git-phone.xcodeproj/project.xcworkspace/xcuserdata/technix.xcuserdatad/UserInterfaceState.xcuserstate
  30. +10 −0 git-phone.xcodeproj/project.xcworkspace/xcuserdata/technix.xcuserdatad/WorkspaceSettings.xcsettings
  31. +86 −0 git-phone.xcodeproj/xcuserdata/technix.xcuserdatad/xcschemes/GitHub GitPhone.xcscheme
  32. +22 −0 git-phone.xcodeproj/xcuserdata/technix.xcuserdatad/xcschemes/xcschememanagement.plist
  33. +0 −1  git_phone_Prefix.pch
  34. +4 −4 main.m
View
115 ApplicationError.xib
@@ -1,35 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">528</int>
- <string key="IBDocument.SystemVersion">9G55</string>
- <string key="IBDocument.InterfaceBuilderVersion">677</string>
- <string key="IBDocument.AppKitVersion">949.43</string>
- <string key="IBDocument.HIToolboxVersion">353.00</string>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <string key="IBDocument.SystemVersion">12C60</string>
+ <string key="IBDocument.InterfaceBuilderVersion">3084</string>
+ <string key="IBDocument.AppKitVersion">1187.34</string>
+ <string key="IBDocument.HIToolboxVersion">625.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">2083</string>
+ </object>
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="33"/>
+ <string>IBProxyObject</string>
+ <string>IBUIImageView</string>
+ <string>IBUILabel</string>
+ <string>IBUITextView</string>
+ <string>IBUIView</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/>
@@ -45,6 +50,7 @@
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">octocat_sad.png</string>
@@ -58,6 +64,7 @@
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Octocat is sad.</string>
<object class="NSColor" key="IBUITextColor" id="361346917">
<int key="NSColorSpace">1</int>
@@ -65,7 +72,16 @@
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
- <float key="IBUIMinimumFontSize">1.000000e+01</float>
+ <float key="IBUIMinimumFontSize">10</float>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="955444507">
+ <int key="type">1</int>
+ <double key="pointSize">17</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="57312039">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">17</double>
+ <int key="NSfFlags">16</int>
+ </object>
</object>
<object class="IBUITextView" id="667860017">
<reference key="NSNextResponder" ref="191373211"/>
@@ -79,6 +95,7 @@
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<bool key="IBUIBounces">NO</bool>
<bool key="IBUIScrollEnabled">NO</bool>
<bool key="IBUIShowsHorizontalScrollIndicator">NO</bool>
@@ -89,6 +106,11 @@
<string key="IBUIText">Error Message</string>
<reference key="IBUITextColor" ref="361346917"/>
<int key="IBUITextAlignment">1</int>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIFontDescription" ref="955444507"/>
+ <reference key="IBUIFont" ref="57312039"/>
</object>
</object>
<string key="NSFrameSize">{320, 480}</string>
@@ -99,6 +121,7 @@
</object>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -136,7 +159,7 @@
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="360949347"/>
- <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ <string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
@@ -174,21 +197,23 @@
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
+ <object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
+ <string>-1.IBPluginDependency</string>
<string>-2.CustomClassName</string>
- <string>33.IBEditorWindowLastContentRect</string>
+ <string>-2.IBPluginDependency</string>
<string>33.IBPluginDependency</string>
<string>34.IBPluginDependency</string>
<string>35.IBPluginDependency</string>
<string>42.IBPluginDependency</string>
</object>
- <object class="NSMutableArray" key="dict.values">
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>ApplicationErrorViewController</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>UIResponder</string>
- <string>{{284, 157}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -197,45 +222,35 @@
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.sortedKeys" ref="360949347"/>
+ <reference key="dict.values" ref="360949347"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.sortedKeys" ref="360949347"/>
+ <reference key="dict.values" ref="360949347"/>
</object>
<nil key="sourceID"/>
<int key="maxID">43</int>
</object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">ApplicationErrorViewController</string>
- <string key="superclassName">UIViewController</string>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">errorMessageTextView</string>
- <string key="NS.object.0">UITextView</string>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Classes/ApplicationErrorViewController.h</string>
- </object>
- </object>
- </object>
- </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.LastKnownRelativeProjectPath">git-phone.xcodeproj</string>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="528" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3000" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NS.key.0">octocat_sad.png</string>
+ <string key="NS.object.0">{264, 201}</string>
+ </object>
+ <string key="IBCocoaTouchPluginVersion">2083</string>
</data>
</archive>
View
2  Classes/ApplicationErrorViewController.h
@@ -11,7 +11,7 @@
UITextView *errorMessageTextView;
}
-@property (nonatomic, retain) IBOutlet UITextView *errorMessageTextView;
+@property (nonatomic, strong) IBOutlet UITextView *errorMessageTextView;
- (void) setErrorMessage:(NSString *)error;
View
5 Classes/ApplicationErrorViewController.m
@@ -24,10 +24,5 @@ - (void) setErrorMessage:(NSString *)error {
errorMessage = [error copy];
}
-- (void)dealloc {
- [errorMessage release];
- [errorMessageTextView release];
- [super dealloc];
-}
@end
View
10 Classes/Commit.h
@@ -40,11 +40,11 @@
NSString *authorEmail;
}
-@property (nonatomic, retain) NSString *commitID;
-@property (nonatomic, retain) NSString *message;
-@property (nonatomic, retain) NSString *url;
-@property (nonatomic, retain) NSString *authorName;
-@property (nonatomic, retain) NSString *authorEmail;
+@property (nonatomic, strong) NSString *commitID;
+@property (nonatomic, strong) NSString *message;
+@property (nonatomic, strong) NSString *url;
+@property (nonatomic, strong) NSString *authorName;
+@property (nonatomic, strong) NSString *authorEmail;
@end
View
15 Classes/Commit.m
@@ -7,6 +7,7 @@
//
#import "Commit.h"
+#import "NSString+JSON.h"
@implementation Commit
@@ -27,15 +28,15 @@ + (NSString *)indexURLwithRepository:(NSString *)repository {
//TODO: this needs to be thought out better. Maybe loaded on the repo.
+ (NSArray *)loadAllfromRepository:(NSString *)repository {
- NSMutableArray *commitsArray = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *commitsArray = [[NSMutableArray alloc] init];
NSString *resultJSON = [Connector postToURL:[self indexURLwithRepository:repository]];
- NSMutableArray *commits = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *commits = [[NSMutableArray alloc] init];
commits = [[resultJSON JSONValue] valueForKey:@"commits"];
for (NSDictionary *commit in commits) {
- Commit *tempCommit = [[[Commit alloc] init] autorelease];
+ Commit *tempCommit = [[Commit alloc] init];
[tempCommit setCommitID:[commit valueForKey:@"id"]];
[tempCommit setMessage:[commit valueForKey:@"message"]];
@@ -50,14 +51,6 @@ + (NSArray *)loadAllfromRepository:(NSString *)repository {
return commitsArray;
}
-- (void) dealloc {
- [commitID release];
- [message release];
- [url release];
- [authorName release];
- [authorEmail release];
- [super dealloc];
-}
@end
View
8 Classes/Config.m
@@ -49,13 +49,5 @@ - (void)forgetCredentials {
}
-- (void) dealloc {
- [gitHubUserName release];
- [gitHubToken release];
- [baseURL release];
- [publicRepositories release];
- [privateRepositories release];
- [super dealloc];
-}
@end
View
11 Classes/Connector.m
@@ -10,6 +10,7 @@
// on the data.
#import "Connector.h"
+#import "NSDictionary+JSON.h"
@implementation Connector
@@ -56,7 +57,7 @@ + (NSString *) getJSONFromURL:(NSString *)url {
urlData = [NSURLConnection sendSynchronousRequest:req returningResponse:&response error:&error];
- NSString *str = [[[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding] autorelease];
+ NSString *str = [[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding];
DevLog3(@"Retrieved JSON from URL: %@ \n%@", url, str);
@@ -76,7 +77,7 @@ + (NSString *) getJSONFromURL:(NSString *)url withDictionary:(NSDictionary *)dic
urlData = [NSURLConnection sendSynchronousRequest:req returningResponse:&response error:&error];
- NSString *resp = [[[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding] autorelease];
+ NSString *resp = [[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding];
DevLog3(@"Received JSON from URL: %@\n%@", url, resp);
return resp;
@@ -90,7 +91,7 @@ + (NSString *)postToURL:(NSString *)url {
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
- NSMutableURLRequest *postRequest = [[[NSMutableURLRequest alloc] init] autorelease];
+ NSMutableURLRequest *postRequest = [[NSMutableURLRequest alloc] init];
[postRequest setURL:[NSURL URLWithString:url]];
[postRequest setHTTPMethod:@"POST"];
[postRequest setValue:postLength forHTTPHeaderField:@"Content-Length"];
@@ -105,7 +106,7 @@ + (NSString *)postToURL:(NSString *)url {
urlData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error];
- NSString *resp = [[[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding] autorelease];
+ NSString *resp = [[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding];
DevLog3(@"Received JSON from URL via POST: %@\n%@", url, resp);
@@ -118,7 +119,7 @@ + (BOOL)didAuthenticateUser:(NSString *)user withToken:(NSString *)token {
NSString *post = [NSString stringWithFormat:@"login=%@&token=%@", user, token];
NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];
- NSMutableURLRequest *postRequest = [[[NSMutableURLRequest alloc] init] autorelease];
+ NSMutableURLRequest *postRequest = [[NSMutableURLRequest alloc] init];
[postRequest setURL:[NSURL URLWithString:@"http://github.com"]];
[postRequest setHTTPMethod:@"POST"];
[postRequest setValue:postLength forHTTPHeaderField:@"Content-Length"];
View
12 Classes/LoginViewController.h
@@ -13,15 +13,15 @@
IBOutlet UITextField *userName;
IBOutlet UITextField *apiToken;
IBOutlet UILabel *systemPrefs;
- IBOutlet UILabel *copyRight;
+ IBOutlet UILabel *makeRight;
IBOutlet UISwitch *rememberMe;
}
-@property(nonatomic, retain) UITextField *userName;
-@property(nonatomic, retain) UITextField *apiToken;
-@property(nonatomic, retain) UILabel *systemPrefs;
-@property(nonatomic, retain) UILabel *copyRight;
-@property(nonatomic, retain) UISwitch *rememberMe;
+@property(nonatomic, strong) UITextField *userName;
+@property(nonatomic, strong) UITextField *apiToken;
+@property(nonatomic, strong) UILabel *systemPrefs;
+@property(nonatomic, strong) UILabel *makeRight;
+@property(nonatomic, strong) UISwitch *rememberMe;
- (void)showAlert:(NSString *)message withTitle:(NSString *)title;
View
12 Classes/LoginViewController.m
@@ -13,7 +13,7 @@ @implementation LoginViewController
@synthesize userName;
@synthesize apiToken;
@synthesize systemPrefs;
-@synthesize copyRight;
+@synthesize makeRight;
@synthesize rememberMe;
- (void)viewDidLoad {
@@ -23,7 +23,7 @@ - (void)viewDidLoad {
userName.font = [UIFont systemFontOfSize:16];
apiToken.font = [UIFont systemFontOfSize:16];
systemPrefs.font = [UIFont systemFontOfSize:13];
- copyRight.font = [UIFont systemFontOfSize:11];
+ makeRight.font = [UIFont systemFontOfSize:11];
rememberMe.on = [[Config instance] gitHubUserName] && [[Config instance] gitHubToken];
}
@@ -76,16 +76,8 @@ - (void)showAlert:(NSString *)message withTitle:(NSString *)title {
delegate:nil
cancelButtonTitle:@"Try Again" otherButtonTitles:nil];
[alertView show];
- [alertView release];
}
-- (void)dealloc {
- [userName release];
- [apiToken release];
- [systemPrefs release];
- [copyRight release];
- [super dealloc];
-}
@end
View
8 Classes/Reachability.h
@@ -77,12 +77,12 @@ typedef enum {
@property BOOL networkStatusNotificationsEnabled;
// The remote host whose reachability will be queried.
// Either this or 'addressName' must be set.
-@property (nonatomic, retain) NSString *hostName;
+@property (nonatomic, strong) NSString *hostName;
// The IP address of the remote host whose reachability will be queried.
// Either this or 'hostName' must be set.
-@property (nonatomic, retain) NSString *address;
+@property (nonatomic, strong) NSString *address;
// A cache of ReachabilityQuery objects, which encapsulate a SCNetworkReachabilityRef, a host or address, and a run loop. The keys are host names or addresses.
-@property (nonatomic, assign) NSMutableDictionary *reachabilityQueries;
+@property (nonatomic, strong) NSMutableDictionary *reachabilityQueries;
// This class is intended to be used as a singleton.
+ (Reachability *)sharedReachability;
@@ -113,7 +113,7 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach
// Keep around each network reachability query object so that we can
// register for updates from those objects.
@property (nonatomic) SCNetworkReachabilityRef reachabilityRef;
-@property (nonatomic, retain) NSString *hostNameOrAddress;
+@property (nonatomic, strong) NSString *hostNameOrAddress;
@property (nonatomic) CFMutableArrayRef runLoops;
- (void)scheduleOnRunLoop:(NSRunLoop *)inRunLoop;
View
21 Classes/Reachability.m
@@ -95,9 +95,7 @@ + (Reachability *)sharedReachability
- (void) dealloc
{
[self stopListeningForReachabilityChanges];
- [_sharedReachability.reachabilityQueries release];
- [_sharedReachability release];
- [super dealloc];
+ _sharedReachability.reachabilityQueries;
}
- (BOOL)isReachableWithoutRequiringConnection:(SCNetworkReachabilityFlags)flags
@@ -162,7 +160,7 @@ - (BOOL)isAdHocWiFiNetworkAvailableFlags:(SCNetworkReachabilityFlags *)outFlags
adHocWiFiNetworkReachability = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&sin);
- query = [[[ReachabilityQuery alloc] init] autorelease];
+ query = [[ReachabilityQuery alloc] init];
query.hostNameOrAddress = kLinkLocalAddressKey;
query.reachabilityRef = adHocWiFiNetworkReachability;
@@ -197,12 +195,12 @@ - (BOOL)isAdHocWiFiNetworkAvailableFlags:(SCNetworkReachabilityFlags *)outFlags
// ReachabilityCallback is registered as the callback for network state changes in startListeningForReachabilityChanges.
static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *info)
{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
// Post a notification to notify the client that the network reachability changed.
- [[NSNotificationCenter defaultCenter] postNotificationName:@"kNetworkReachabilityChangedNotification" object:nil];
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"kNetworkReachabilityChangedNotification" object:nil];
- [pool release];
+ }
}
// Perform a reachability query for the address 0.0.0.0. If that address is reachable without
@@ -223,7 +221,7 @@ - (BOOL)isNetworkAvailableFlags:(SCNetworkReachabilityFlags *)outFlags
defaultRouteReachability = SCNetworkReachabilityCreateWithAddress(NULL, (struct sockaddr *)&zeroAddress);
- ReachabilityQuery *query = [[[ReachabilityQuery alloc] init] autorelease];
+ ReachabilityQuery *query = [[ReachabilityQuery alloc] init];
query.hostNameOrAddress = kDefaultRouteKey;
query.reachabilityRef = defaultRouteReachability;
@@ -302,7 +300,7 @@ - (SCNetworkReachabilityRef)reachabilityRefForHostName:(NSString *)hostName
NSAssert1(reachabilityRefForHostName != NULL, @"Failed to create SCNetworkReachabilityRef for host: %@", hostName);
- ReachabilityQuery *query = [[[ReachabilityQuery alloc] init] autorelease];
+ ReachabilityQuery *query = [[ReachabilityQuery alloc] init];
query.hostNameOrAddress = hostName;
query.reachabilityRef = reachabilityRefForHostName;
@@ -352,7 +350,7 @@ - (SCNetworkReachabilityRef)reachabilityRefForAddress:(NSString *)addressString
NSAssert1(reachabilityRefForAddress != NULL, @"Failed to create SCNetworkReachabilityRef for address: %@", addressString);
- ReachabilityQuery *query = [[[ReachabilityQuery alloc] init] autorelease];
+ ReachabilityQuery *query = [[ReachabilityQuery alloc] init];
query.hostNameOrAddress = addressString;
query.reachabilityRef = reachabilityRefForAddress;
@@ -515,7 +513,6 @@ - (id)init
- (void)dealloc
{
CFRelease(self.runLoops);
- [super dealloc];
}
- (BOOL)isScheduledOnRunLoop:(CFRunLoopRef)runLoop
@@ -573,7 +570,7 @@ - (CFRunLoopRef)startListeningForReachabilityChanges:(SCNetworkReachabilityRef)r
return NULL;
}
- SCNetworkReachabilityContext context = {0, self, NULL, NULL, NULL};
+ SCNetworkReachabilityContext context = {0, (__bridge void *)(self), NULL, NULL, NULL};
SCNetworkReachabilitySetCallback(reachability, ReachabilityCallback, &context);
SCNetworkReachabilityScheduleWithRunLoop(reachability, runLoop, kCFRunLoopDefaultMode);
View
2  Classes/RepoCommitsViewController.h
@@ -13,6 +13,6 @@
NSArray *repoCommits;
}
-@property (nonatomic, retain) NSArray *repoCommits;
+@property (nonatomic, strong) NSArray *repoCommits;
@end
View
6 Classes/RepoCommitsViewController.m
@@ -60,7 +60,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
+ cell = [[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier];
}
// Set up the cell...
@@ -78,10 +78,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
-- (void)dealloc {
- [repoCommits release];
- [super dealloc];
-}
@end
View
4 Classes/RepositoriesViewController.h
@@ -15,7 +15,7 @@
NSArray *repositories;
}
-@property (nonatomic, retain) RootViewController *rootViewController;
-@property (nonatomic, retain) NSArray *repositories;
+@property (nonatomic, strong) RootViewController *rootViewController;
+@property (nonatomic, strong) NSArray *repositories;
@end
View
13 Classes/RepositoriesViewController.m
@@ -50,7 +50,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
+ cell = [[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
@@ -61,11 +61,11 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- RepoCommitsViewController *repoCommitsViewController = [[[RepoCommitsViewController alloc] initWithNibName:@"RepoCommitsView" bundle:nil] autorelease];
+ RepoCommitsViewController *repoCommitsViewController = [[RepoCommitsViewController alloc] initWithNibName:@"RepoCommitsView" bundle:nil];
Repository *repository = [repositories objectAtIndex:[indexPath row]];
- [repoCommitsViewController.repoCommits release];
- [repository.commits release];
+ repoCommitsViewController.repoCommits;
+ repository.commits;
[repository loadCommits];
repoCommitsViewController.repoCommits = repository.commits;
@@ -74,11 +74,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
-- (void)dealloc {
- [repositories release];
- [rootViewController release];
- [super dealloc];
-}
@end
View
8 Classes/Repository.h
@@ -14,10 +14,10 @@
NSMutableArray *commits;
}
-@property (nonatomic, retain) NSString *name;
-@property (nonatomic, retain) NSString *owner;
-@property (nonatomic, retain) NSNumber *privateRepo;
-@property (nonatomic, retain) NSMutableArray *commits;
+@property (nonatomic, strong) NSString *name;
+@property (nonatomic, strong) NSString *owner;
+@property (nonatomic, strong) NSNumber *privateRepo;
+@property (nonatomic, strong) NSMutableArray *commits;
+ (NSString *)indexURL;
+ (void)loadAll;
View
23 Classes/Repository.m
@@ -9,7 +9,7 @@
#import "Repository.h"
#import "Connector.h"
#import "Commit.h"
-
+#import "NSString+JSON.h"
@implementation Repository
@@ -36,15 +36,15 @@ - (NSString *)commitsURL {
+ (void)loadAll {
NSString *resultJSON = [Connector postToURL:[self indexURL]];
- NSMutableArray *publicRepoArray = [[[NSMutableArray alloc] init] autorelease];
- NSMutableArray *privateRepoArray = [[[NSMutableArray alloc] init] autorelease];
- NSMutableArray *repositories = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *publicRepoArray = [[NSMutableArray alloc] init];
+ NSMutableArray *privateRepoArray = [[NSMutableArray alloc] init];
+ NSMutableArray *repositories = [[NSMutableArray alloc] init];
// GitHub JSON: {"user": {"repositories": [{repo1},{repo1}] }}
repositories = [[[resultJSON JSONValue] valueForKey:@"user"] valueForKey:@"repositories"];
for (NSDictionary *repository in repositories) {
- Repository *tempRepo = [[[Repository alloc] init] autorelease];
+ Repository *tempRepo = [[Repository alloc] init];
[tempRepo setName:[repository valueForKey:@"name"]];
[tempRepo setOwner:[repository valueForKey:@"owner"]];
[tempRepo setPrivateRepo:[DataParser readInt:[repository valueForKey:@"private"]]];
@@ -65,13 +65,13 @@ + (void)loadAll {
- (void)loadCommits {
NSString *resultJSON = [Connector postToURL:[self commitsURL]];
- NSMutableArray *commitsArray = [[[NSMutableArray alloc] init] autorelease];
- NSMutableArray *repoCommits = [[[NSMutableArray alloc] init] autorelease];
+ NSMutableArray *commitsArray = [[NSMutableArray alloc] init];
+ NSMutableArray *repoCommits = [[NSMutableArray alloc] init];
repoCommits = [[resultJSON JSONValue] valueForKey:@"commits"];
for (NSDictionary *commit in repoCommits) {
- Commit *tempCommit = [[[Commit alloc] init] autorelease];
+ Commit *tempCommit = [[Commit alloc] init];
[tempCommit setCommitID:[commit valueForKey:@"id"]];
[tempCommit setMessage:[commit valueForKey:@"message"]];
[tempCommit setUrl:[commit valueForKey:@"url"]];
@@ -86,13 +86,6 @@ - (void)loadCommits {
[self setCommits:commitsArray];
}
-- (void) dealloc {
- [name release];
- [owner release];
- [privateRepo release];
- [commits release];
- [super dealloc];
-}
@end
View
11 Classes/RootViewController.m
@@ -64,7 +64,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GitHub"];
if(cell == nil) {
- cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero] autorelease];
+ cell = [[UITableViewCell alloc] initWithFrame:CGRectZero];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
}
@@ -121,18 +121,18 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- RepositoriesViewController *repositoriesViewController = [[[RepositoriesViewController alloc] initWithNibName:@"RepositoriesView" bundle:nil] autorelease];
+ RepositoriesViewController *repositoriesViewController = [[RepositoriesViewController alloc] initWithNibName:@"RepositoriesView" bundle:nil];
switch(indexPath.section) {
case 0: {
switch(indexPath.row) {
case 0: {
- [repositoriesViewController.repositories release];
+ repositoriesViewController.repositories;
repositoriesViewController.repositories = [[Config instance] publicRepositories];
break;
}
case 1: {
- [repositoriesViewController.repositories release];
+ repositoriesViewController.repositories;
repositoriesViewController.repositories = [[Config instance] privateRepositories];
break;
}
@@ -151,9 +151,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
-- (void)dealloc {
- [super dealloc];
-}
@end
View
4 Classes/git_phoneAppDelegate.h
@@ -14,8 +14,8 @@
UINavigationController *navigationController;
}
-@property (nonatomic, retain) IBOutlet UIWindow *window;
-@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
+@property (nonatomic, strong) IBOutlet UIWindow *window;
+@property (nonatomic, strong) IBOutlet UINavigationController *navigationController;
- (void)authenticate;
- (void)showAlert:(NSString *)message withTitle:(NSString *)title;
View
12 Classes/git_phoneAppDelegate.m
@@ -55,9 +55,11 @@ - (void) showError:(NSString *)errorMessage {
}
- (void) loadLoginView {
- LoginViewController *loginViewController = [[[LoginViewController alloc] initWithNibName:@"Login" bundle:nil] autorelease];
+ LoginViewController *loginViewController = [[LoginViewController alloc] initWithNibName:@"Login" bundle:nil];
[window addSubview:[loginViewController view]];
- [navigationController presentModalViewController:loginViewController animated:YES];
+ [navigationController presentViewController:loginViewController
+ animated:YES
+ completion:nil];
}
- (void) authenticate {
@@ -87,13 +89,7 @@ - (void)showAlert:(NSString *)message withTitle:(NSString *)title {
delegate:nil
cancelButtonTitle:@"Try Again" otherButtonTitles:nil];
[alertView show];
- [alertView release];
}
-- (void)dealloc {
- [navigationController release];
- [window release];
- [super dealloc];
-}
@end
View
6 Info.plist
@@ -8,8 +8,10 @@
<string>GitHub</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>octocat.png</string>
<key>CFBundleIdentifier</key>
- <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
+ <string>tk.maxius.git-iphone</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@@ -20,8 +22,6 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
- <key>CFBundleIconFile</key>
- <string>octocat.png</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
View
207 Login.xib
@@ -1,35 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">528</int>
- <string key="IBDocument.SystemVersion">9G55</string>
- <string key="IBDocument.InterfaceBuilderVersion">677</string>
- <string key="IBDocument.AppKitVersion">949.43</string>
- <string key="IBDocument.HIToolboxVersion">353.00</string>
- <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <string key="IBDocument.SystemVersion">12C60</string>
+ <string key="IBDocument.InterfaceBuilderVersion">3084</string>
+ <string key="IBDocument.AppKitVersion">1187.34</string>
+ <string key="IBDocument.HIToolboxVersion">625.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">2083</string>
+ </object>
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="1"/>
+ <string>IBProxyObject</string>
+ <string>IBUIImageView</string>
+ <string>IBUILabel</string>
+ <string>IBUISwitch</string>
+ <string>IBUITextField</string>
+ <string>IBUIView</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBProxyObject" id="372490531">
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBProxyObject" id="975951072">
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUIView" id="191373211">
<reference key="NSNextResponder"/>
@@ -43,6 +49,7 @@
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentVerticalAlignment">0</int>
<string key="IBUIText"/>
<int key="IBUIBorderStyle">3</int>
@@ -56,10 +63,20 @@
</object>
<bool key="IBUIClearsOnBeginEditing">YES</bool>
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
- <float key="IBUIMinimumFontSize">1.700000e+01</float>
+ <float key="IBUIMinimumFontSize">17</float>
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
<int key="IBUIAutocorrectionType">1</int>
<int key="IBUIReturnKeyType">4</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="217468720">
+ <int key="type">1</int>
+ <double key="pointSize">12</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="414076491">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">12</double>
+ <int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIImageView" id="880546554">
@@ -71,6 +88,7 @@
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentMode">4</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSCustomResource" key="IBUIImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">octocat_large.png</string>
@@ -84,6 +102,7 @@
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Say Hi to Octocat.</string>
<object class="NSColor" key="IBUITextColor" id="983173934">
<int key="NSColorSpace">1</int>
@@ -91,10 +110,20 @@
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
- <float key="IBUIMinimumFontSize">1.000000e+01</float>
+ <float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">3</int>
<int key="IBUITextAlignment">1</int>
<int key="IBUILineBreakMode">0</int>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="382289660">
+ <int key="type">1</int>
+ <double key="pointSize">17</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="672113721">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">17</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <double key="preferredMaxLayoutWidth">142</double>
</object>
<object class="IBUILabel" id="556151773">
<reference key="NSNextResponder" ref="191373211"/>
@@ -104,12 +133,15 @@
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
- <string type="base64-UTF8" key="IBUIText">wqkgMjAwOSBTYW0gU2Nocm9lZGVyA</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText">© 2009 Sam Schroeder</string>
<reference key="IBUITextColor" ref="983173934"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
- <float key="IBUIMinimumFontSize">1.000000e+01</float>
+ <float key="IBUIMinimumFontSize">10</float>
<int key="IBUITextAlignment">2</int>
+ <reference key="IBUIFontDescription" ref="382289660"/>
+ <reference key="IBUIFont" ref="672113721"/>
</object>
<object class="IBUITextField" id="37565244">
<reference key="NSNextResponder" ref="191373211"/>
@@ -118,6 +150,7 @@
<reference key="NSSuperview" ref="191373211"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentVerticalAlignment">0</int>
<string key="IBUIText"/>
<int key="IBUIBorderStyle">3</int>
@@ -129,12 +162,15 @@
</object>
<bool key="IBUIClearsOnBeginEditing">YES</bool>
<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
- <float key="IBUIMinimumFontSize">1.700000e+01</float>
+ <float key="IBUIMinimumFontSize">17</float>
<object class="IBUITextInputTraits" key="IBUITextInputTraits">
<int key="IBUIAutocorrectionType">1</int>
<int key="IBUIReturnKeyType">9</int>
<bool key="IBUISecureTextEntry">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
+ <reference key="IBUIFontDescription" ref="217468720"/>
+ <reference key="IBUIFont" ref="414076491"/>
</object>
<object class="IBUISwitch" id="124102036">
<reference key="NSNextResponder" ref="191373211"/>
@@ -144,6 +180,7 @@
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
</object>
@@ -155,18 +192,26 @@
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Remember Me</string>
- <object class="NSFont" key="IBUIFont">
- <string key="NSName">Helvetica</string>
- <double key="NSSize">1.400000e+01</double>
- <int key="NSfFlags">16</int>
- </object>
<reference key="IBUITextColor" ref="983173934"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
- <float key="IBUIMinimumFontSize">1.000000e+01</float>
+ <float key="IBUIMinimumFontSize">10</float>
<int key="IBUINumberOfLines">2</int>
<int key="IBUITextAlignment">1</int>
+ <object class="IBUIFontDescription" key="IBUIFontDescription">
+ <string key="name">Helvetica</string>
+ <string key="family">Helvetica</string>
+ <int key="traits">0</int>
+ <double key="pointSize">14</double>
+ </object>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">14</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ <double key="preferredMaxLayoutWidth">94</double>
</object>
</object>
<string key="NSFrameSize">{320, 480}</string>
@@ -175,6 +220,7 @@
<int key="NSColorSpace">2</int>
<bytes key="NSRGB">MC45MjU0OTAyNiAwLjkwNTg4MjQyIDAuODAzOTIxNjQAA</bytes>
</object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@@ -198,43 +244,43 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="125215618"/>
- <reference key="destination" ref="372490531"/>
+ <string key="label">apiToken</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="37565244"/>
</object>
- <int key="connectionID">10</int>
+ <int key="connectionID">15</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">copyRight</string>
+ <string key="label">rememberMe</string>
<reference key="source" ref="372490531"/>
- <reference key="destination" ref="556151773"/>
+ <reference key="destination" ref="124102036"/>
</object>
- <int key="connectionID">13</int>
+ <int key="connectionID">19</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">apiToken</string>
+ <string key="label">makeRight</string>
<reference key="source" ref="372490531"/>
- <reference key="destination" ref="37565244"/>
+ <reference key="destination" ref="556151773"/>
</object>
- <int key="connectionID">15</int>
+ <int key="connectionID">20</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
- <reference key="source" ref="37565244"/>
+ <reference key="source" ref="125215618"/>
<reference key="destination" ref="372490531"/>
</object>
- <int key="connectionID">16</int>
+ <int key="connectionID">10</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">rememberMe</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="124102036"/>
+ <string key="label">delegate</string>
+ <reference key="source" ref="37565244"/>
+ <reference key="destination" ref="372490531"/>
</object>
- <int key="connectionID">19</int>
+ <int key="connectionID">16</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -267,7 +313,7 @@
<int key="objectID">-1</int>
<reference key="object" ref="372490531"/>
<reference key="parent" ref="360949347"/>
- <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ <string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
@@ -313,11 +359,12 @@
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
+ <object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
+ <string>-1.IBPluginDependency</string>
<string>-2.CustomClassName</string>
- <string>1.IBEditorWindowLastContentRect</string>
+ <string>-2.IBPluginDependency</string>
<string>1.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>14.IBPluginDependency</string>
@@ -327,11 +374,12 @@
<string>6.IBPluginDependency</string>
<string>7.IBPluginDependency</string>
</object>
- <object class="NSMutableArray" key="dict.values">
+ <object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>LoginViewController</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>UIResponder</string>
- <string>{{694, 267}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -344,60 +392,35 @@
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.sortedKeys" ref="360949347"/>
+ <reference key="dict.values" ref="360949347"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- </object>
+ <reference key="dict.sortedKeys" ref="360949347"/>
+ <reference key="dict.values" ref="360949347"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">19</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <object class="NSMutableArray" key="referencedPartialClassDescriptions">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">LoginViewController</string>
- <string key="superclassName">UIViewController</string>
- <object class="NSMutableDictionary" key="outlets">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>apiToken</string>
- <string>copyRight</string>
- <string>rememberMe</string>
- <string>systemPrefs</string>
- <string>userName</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>UITextField</string>
- <string>UILabel</string>
- <string>UISwitch</string>
- <string>UILabel</string>
- <string>UITextField</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">Classes/LoginViewController.h</string>
- </object>
- </object>
- </object>
+ <int key="maxID">20</int>
</object>
+ <object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.LastKnownRelativeProjectPath">git-phone.xcodeproj</string>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="528" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3000" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NS.key.0">octocat_large.png</string>
+ <string key="NS.object.0">{264, 264}</string>
+ </object>
+ <string key="IBCocoaTouchPluginVersion">2083</string>
</data>
</archive>
View
15 NSDictionary+JSON.h
@@ -0,0 +1,15 @@
+//
+// NSDictionary+JSON.h
+// git-phone
+//
+// Created by Maxthon Chan on 13-3-7.
+//
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSDictionary (JSON)
+
+- (NSString *)JSONRepresentation;
+
+@end
View
21 NSDictionary+JSON.m
@@ -0,0 +1,21 @@
+//
+// NSDictionary+JSON.m
+// git-phone
+//
+// Created by Maxthon Chan on 13-3-7.
+//
+//
+
+#import "NSDictionary+JSON.h"
+
+@implementation NSDictionary (JSON)
+
+- (NSString *)JSONRepresentation
+{
+ return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:self
+ options:0
+ error:NULL]
+ encoding:NSUTF8StringEncoding];
+}
+
+@end
View
15 NSString+JSON.h
@@ -0,0 +1,15 @@
+//
+// NSString+JSON.h
+// git-phone
+//
+// Created by Maxthon Chan on 13-3-7.
+//
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSString (JSON)
+
+- (id)JSONValue;
+
+@end
View
20 NSString+JSON.m
@@ -0,0 +1,20 @@
+//
+// NSString+JSON.m
+// git-phone
+//
+// Created by Maxthon Chan on 13-3-7.
+//
+//
+
+#import "NSString+JSON.h"
+
+@implementation NSString (JSON)
+
+- (id)JSONValue
+{
+ return [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
+ options:0
+ error:NULL];
+}
+
+@end
View
38 git-phone.xcodeproj/project.pbxproj
@@ -10,6 +10,8 @@
1D3623260D0F684500981E51 /* git_phoneAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* git_phoneAppDelegate.m */; };
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+ 1DA1DF5116E8D9DC0074ABCB /* NSString+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DA1DF5016E8D9DC0074ABCB /* NSString+JSON.m */; };
+ 1DA1DF5416E8DAB50074ABCB /* NSDictionary+JSON.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DA1DF5316E8DAB50074ABCB /* NSDictionary+JSON.m */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
2218F1170F2FE3A00080FB02 /* RepositoriesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2218F1160F2FE3A00080FB02 /* RepositoriesView.xib */; };
2218F1350F2FE4110080FB02 /* RepositoriesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2218F1340F2FE4110080FB02 /* RepositoriesViewController.m */; };
@@ -47,6 +49,10 @@
1D3623240D0F684500981E51 /* git_phoneAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = git_phoneAppDelegate.h; sourceTree = "<group>"; };
1D3623250D0F684500981E51 /* git_phoneAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = git_phoneAppDelegate.m; sourceTree = "<group>"; };
1D6058910D05DD3D006BFB54 /* git-phone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "git-phone.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1DA1DF4F16E8D9DC0074ABCB /* NSString+JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+JSON.h"; sourceTree = "<group>"; };
+ 1DA1DF5016E8D9DC0074ABCB /* NSString+JSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+JSON.m"; sourceTree = "<group>"; };
+ 1DA1DF5216E8DAB50074ABCB /* NSDictionary+JSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+JSON.h"; sourceTree = "<group>"; };
+ 1DA1DF5316E8DAB50074ABCB /* NSDictionary+JSON.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+JSON.m"; sourceTree = "<group>"; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
2218F1160F2FE3A00080FB02 /* RepositoriesView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RepositoriesView.xib; sourceTree = "<group>"; };
2218F1330F2FE4110080FB02 /* RepositoriesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RepositoriesViewController.h; sourceTree = "<group>"; };
@@ -129,6 +135,17 @@
name = Products;
sourceTree = "<group>";
};
+ 1DA1DF4E16E8D9C00074ABCB /* JSON Remapped */ = {
+ isa = PBXGroup;
+ children = (
+ 1DA1DF4F16E8D9DC0074ABCB /* NSString+JSON.h */,
+ 1DA1DF5016E8D9DC0074ABCB /* NSString+JSON.m */,
+ 1DA1DF5216E8DAB50074ABCB /* NSDictionary+JSON.h */,
+ 1DA1DF5316E8DAB50074ABCB /* NSDictionary+JSON.m */,
+ );
+ name = "JSON Remapped";
+ sourceTree = "<group>";
+ };
22E17B8D0F22357F00D2853B /* Controllers */ = {
isa = PBXGroup;
children = (
@@ -201,6 +218,7 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
+ 1DA1DF4E16E8D9C00074ABCB /* JSON Remapped */,
22FA50C70F2144F800709123 /* Networking */,
22FA50C60F2144DF00709123 /* Classes */,
22E17B990F223A3400D2853B /* ViewControllers */,
@@ -276,6 +294,7 @@
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "git-phone" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
@@ -337,6 +356,8 @@
22EFCE410F325A3F009F3C3E /* Repository.m in Sources */,
229F5CCA0F3DBB3900767944 /* RepoCommitsViewController.m in Sources */,
229F5D000F3DBE9B00767944 /* Commit.m in Sources */,
+ 1DA1DF5116E8D9DC0074ABCB /* NSString+JSON.m in Sources */,
+ 1DA1DF5416E8DAB50074ABCB /* NSDictionary+JSON.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -347,6 +368,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -354,6 +376,7 @@
GCC_PREFIX_HEADER = git_phone_Prefix.pch;
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "git-phone";
+ SDKROOT = iphoneos;
};
name = Debug;
};
@@ -361,21 +384,22 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = git_phone_Prefix.pch;
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "git-phone";
+ SDKROOT = iphoneos;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ADDITIONAL_SDKS = "$HOME/Library/SDKs/JSON/$(PLATFORM_NAME).sdk";
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -383,12 +407,8 @@
"-D",
__DEBUG__,
);
- OTHER_LDFLAGS = (
- "-ObjC",
- "-ljson",
- );
PREBINDING = NO;
- SDKROOT = iphonesimulator2.2;
+ SDKROOT = iphoneos6.1;
};
name = Debug;
};
@@ -397,11 +417,11 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = iphoneos2.2;
+ SDKROOT = iphoneos6.1;
};
name = Release;
};
View
7 git-phone.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:git-phone.xcodeproj">
+ </FileRef>
+</Workspace>
View
BIN  ...odeproj/project.xcworkspace/xcuserdata/technix.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
View
10 ...xcodeproj/project.xcworkspace/xcuserdata/technix.xcuserdatad/WorkspaceSettings.xcsettings
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
+ <true/>
+ <key>SnapshotAutomaticallyBeforeSignificantChanges</key>
+ <true/>
+</dict>
+</plist>
View
86 git-phone.xcodeproj/xcuserdata/technix.xcuserdatad/xcschemes/GitHub GitPhone.xcscheme
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0460"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
+ BuildableName = "git-phone.app"
+ BlueprintName = "GitHub GitPhone"
+ ReferencedContainer = "container:git-phone.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
+ BuildableName = "git-phone.app"
+ BlueprintName = "GitHub GitPhone"
+ ReferencedContainer = "container:git-phone.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
+ BuildableName = "git-phone.app"
+ BlueprintName = "GitHub GitPhone"
+ ReferencedContainer = "container:git-phone.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
+ BuildableName = "git-phone.app"
+ BlueprintName = "GitHub GitPhone"
+ ReferencedContainer = "container:git-phone.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
View
22 git-phone.xcodeproj/xcuserdata/technix.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>GitHub GitPhone.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>1D6058900D05DD3D006BFB54</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
View
1  git_phone_Prefix.pch
@@ -7,7 +7,6 @@
#import <UIKit/UIKit.h>
#endif
-#import <JSON/JSON.h>
#import "Connector.h"
#import "Models.h"
View
8 main.m
@@ -10,8 +10,8 @@
int main(int argc, char *argv[]) {
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- int retVal = UIApplicationMain(argc, argv, nil, nil);
- [pool release];
- return retVal;
+ @autoreleasepool {
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
+ return retVal;
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.