Commits

niick committed 063fcf8

Applying patch from Hasani, https://bitbucket.org/hasani/jiraconnect-ios/changeset/27d91e426110, that drops the target SDK to 4.0 and moved iVars in JCO to private properties

  • Participants
  • Parent commits 9b77c18

Comments (0)

Files changed (4)

File JIRAConnect/JCOClasses/JCO.h

     JCOViewController *_jcController;
     UINavigationController *_navController;
     JCOCrashSender *_crashSender;
-    id <JCOCustomDataSource> _customDataSource;    
+    id <JCOCustomDataSource> _customDataSource;  
 }
 
 @property (nonatomic, retain) NSURL* url;

File JIRAConnect/JCOClasses/JCO.m

 #import "Core/JCONotifier.h"
 #import "JCOCrashSender.h"
 
+@interface JCO()
+
+@property (nonatomic, retain) JCOPing* _pinger;
+@property (nonatomic, retain) JCONotifier* _notifier;
+@property (nonatomic, retain) JCOViewController* _jcController;
+@property (nonatomic, retain) UINavigationController* _navController;
+@property (nonatomic, retain) JCOCrashSender *_crashSender;
+@property (nonatomic, assign) id <JCOCustomDataSource> _customDataSource;
+
+@end
+
 
 @implementation JCO
 
 @synthesize url = _url;
+@synthesize _pinger;
+@synthesize _notifier;
+@synthesize _jcController;
+@synthesize _navController;
+@synthesize _crashSender;
+@synthesize _customDataSource;
 
 + (JCO *)instance
 {
 - (id)init
 {
     if ((self = [super init])) {
-        _pinger = [[JCOPing alloc] init];
+        self._pinger = [[[JCOPing alloc] init] autorelease ];
         UIView *window = [[UIApplication sharedApplication] keyWindow]; // TODO: investigate other ways to present the replies dialog.
-        _notifier = [[JCONotifier alloc] initWithView:window];
-        _crashSender = [[JCOCrashSender alloc] init];
-        _jcController = [[JCOViewController alloc] initWithNibName:@"JCOViewController" bundle:nil];
-        _navController = [[UINavigationController alloc] initWithRootViewController:_jcController];
+        self._notifier = [[[JCONotifier alloc] initWithView:window] autorelease ];
+        self._crashSender = [[[JCOCrashSender alloc] init] autorelease ];
+        self._jcController = [[[JCOViewController alloc] initWithNibName:@"JCOViewController" bundle:nil] autorelease ];
+        self._navController = [[[UINavigationController alloc] initWithRootViewController:_jcController] autorelease ];
         _navController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
     }
     return self;
 }
 
+- (void)dealloc
+{
+    self.url = nil;
+    [_pinger release];
+    [_notifier release];
+    [_jcController release];
+    [_navController release];
+    [_crashSender release];
+    [super dealloc];
+}
+
 
 - (void)generateAndStoreUUID
 {
     return [self getAppName];
 }
 
-- (void)dealloc
-{
-    self.url = nil;
-    [_pinger release];
-    _pinger = nil;
-    [_notifier release];
-    _notifier = nil;
-    [_jcController release];
-    _jcController = nil;
-    [_navController release];
-    _navController = nil;
-    [_crashSender release];
-    _crashSender = nil;
-    [super dealloc];
-}
+
 
 @end

File JIRAConnect/JCOClasses/JCOViewController.m

             [keys addObject:@"lng"];      [objects addObject:lng];
             [keys addObject:@"location"]; [objects addObject:locationString];
         }
+
         // Merge the location into the existing customFields.
         NSDictionary *dict = [[NSDictionary alloc] initWithObjects:objects forKeys:keys];
         [customFields addEntriesFromDictionary:dict];
     }
 }
 
+-(void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
+//    NSLog(@"Location failed with error: %@", [error localizedDescription]);
+}
 
 #pragma mark -
 #pragma mark CRVActivityViewDelegate

File JIRAConnect/JIRAConnect.xcodeproj/project.pbxproj

 				GCC_VERSION = com.apple.compilers.llvmgcc42;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.0;
 				SDKROOT = iphoneos;
 			};
 			name = Debug;
 				GCC_VERSION = com.apple.compilers.llvmgcc42;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.3;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.0;
 				SDKROOT = iphoneos;
 			};
 			name = Release;