Index: PasswordGenerator.h ================================================================== --- PasswordGenerator.h +++ PasswordGenerator.h @@ -22,11 +22,11 @@ #import @protocol PasswordGenerator @property size_t length; -@property (copy) OFString *site; +@property (nonatomic, copy) OFString *site; @property const char *passphrase; @property (readonly) unsigned char *output; + (instancetype)generator; - (void)derivePassword; Index: iOS/AboutController.h ================================================================== --- iOS/AboutController.h +++ iOS/AboutController.h @@ -21,7 +21,7 @@ */ @import UIKit; @interface AboutController: UIViewController -@property (retain, nonatomic) IBOutlet UIWebView *webView; +@property (nonatomic, retain) IBOutlet UIWebView *webView; @end Index: iOS/AboutController.m ================================================================== --- iOS/AboutController.m +++ iOS/AboutController.m @@ -78,12 +78,12 @@ [_webView release]; [super dealloc]; } -- (BOOL)webView: (UIWebView*)webView - shouldStartLoadWithRequest: (NSURLRequest*)request +- (BOOL)webView: (UIWebView *)webView + shouldStartLoadWithRequest: (NSURLRequest *)request navigationType: (UIWebViewNavigationType)navigationType { if (navigationType == UIWebViewNavigationTypeLinkClicked) { [[UIApplication sharedApplication] openURL: request.URL options: @{} Index: iOS/AddSiteController.h ================================================================== --- iOS/AddSiteController.h +++ iOS/AddSiteController.h @@ -23,13 +23,13 @@ @import UIKit; #import "MainViewController.h" @interface AddSiteController: UITableViewController -@property (retain, nonatomic) IBOutlet UITextField *nameField; -@property (retain, nonatomic) IBOutlet UITextField *lengthField; -@property (retain, nonatomic) IBOutlet UISwitch *legacySwitch; +@property (nonatomic, retain) IBOutlet UITextField *nameField; +@property (nonatomic, retain) IBOutlet UITextField *lengthField; +@property (nonatomic, retain) IBOutlet UISwitch *legacySwitch; @property (retain) MainViewController *mainViewController; - (IBAction)done: (id)sender; - (IBAction)cancel: (id)sender; @end Index: iOS/AppDelegate.h ================================================================== --- iOS/AppDelegate.h +++ iOS/AppDelegate.h @@ -21,7 +21,7 @@ */ @import UIKit; @interface AppDelegate: UIResponder -@property (strong, nonatomic) UIWindow *window; +@property (nonatomic, strong) UIWindow *window; @end Index: iOS/MainViewController.h ================================================================== --- iOS/MainViewController.h +++ iOS/MainViewController.h @@ -25,7 +25,7 @@ #import "SiteStorage.h" @interface MainViewController: UIViewController @property (retain) SiteStorage *siteStorage; -@property (retain, nonatomic) IBOutlet UITableView *tableView; +@property (nonatomic, retain) IBOutlet UITableView *tableView; @end Index: iOS/MainViewController.m ================================================================== --- iOS/MainViewController.m +++ iOS/MainViewController.m @@ -39,18 +39,18 @@ [_tableView release]; [super dealloc]; } -- (NSInteger)tableView: (UITableView*)tableView +- (NSInteger)tableView: (UITableView *)tableView numberOfRowsInSection: (NSInteger)section { return [self.siteStorage sitesCount]; } -- (UITableViewCell*)tableView: (UITableView*)tableView - cellForRowAtIndexPath: (NSIndexPath*)indexPath +- (UITableViewCell *)tableView: (UITableView *)tableView + cellForRowAtIndexPath: (NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: @"site"]; if (cell == nil) @@ -61,20 +61,20 @@ cell.textLabel.text = [self.siteStorage.sites[indexPath.row] NSObject]; return cell; } -- (void)tableView: (UITableView*)tableView - didSelectRowAtIndexPath: (NSIndexPath*)indexPath +- (void)tableView: (UITableView *)tableView + didSelectRowAtIndexPath: (NSIndexPath *)indexPath { [self performSegueWithIdentifier: @"showDetails" sender: self]; } -- (void)prepareForSegue: (UIStoryboardSegue*)segue +- (void)prepareForSegue: (UIStoryboardSegue *)segue sender: (id)sender { if ([segue.identifier isEqual: @"addSite"] || [segue.identifier isEqual: @"showDetails"]) [segue.destinationViewController setMainViewController: self]; } @end Index: iOS/ShowDetailsController.m ================================================================== --- iOS/ShowDetailsController.m +++ iOS/ShowDetailsController.m @@ -29,11 +29,11 @@ #import "PasswordGenerator.h" #import "NewPasswordGenerator.h" #import "LegacyPasswordGenerator.h" @interface ShowDetailsController () -- (void)_generateWithCallback: (void(^)(NSMutableString*))block; +- (void)_generateWithCallback: (void (^)(NSMutableString *))block; - (void)_generateAndCopy; - (void)_generateAndShow; @end static void @@ -84,18 +84,18 @@ - (void)viewDidAppear: (BOOL)animated { [self.passphraseField becomeFirstResponder]; } -- (BOOL)textFieldShouldReturn: (UITextField*)textField +- (BOOL)textFieldShouldReturn: (UITextField *)textField { [textField resignFirstResponder]; return NO; } -- (void)tableView: (UITableView*)tableView - didSelectRowAtIndexPath: (NSIndexPath*)indexPath +- (void)tableView: (UITableView *)tableView + didSelectRowAtIndexPath: (NSIndexPath *)indexPath { [self.passphraseField resignFirstResponder]; [tableView deselectRowAtIndexPath: indexPath animated: YES]; @@ -159,11 +159,11 @@ clearNSMutableString(password); }]; }]; } -- (void)_generateWithCallback: (void(^)(NSMutableString*))block +- (void)_generateWithCallback: (void (^)(NSMutableString *))block { UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName: @"Main" bundle: nil]; UIViewController *activityController = [mainStoryboard @@ -193,13 +193,13 @@ of_explicit_memset(passphrase, 0, strlen(passphrase)); free(passphrase); } NSMutableString *password = [NSMutableString - stringWithUTF8String: (char*)generator.output]; + stringWithUTF8String: (char *)generator.output]; of_explicit_memset(generator.output, 0, - strlen((char*)generator.output)); + strlen((char *)generator.output)); activityController.view.hidden = YES; block(password); }); } Index: iOS/SiteStorage.h ================================================================== --- iOS/SiteStorage.h +++ iOS/SiteStorage.h @@ -23,20 +23,21 @@ @import ObjFW; @interface SiteStorage: OFObject { OFString *_path; - OFMutableDictionary *> + OFMutableDictionary *> *_storage; OFArray *_sites; } -- (OFArray*)sites; +@property (readonly, nonatomic) OFArray *sites; + - (size_t)sitesCount; -- (bool)hasSite: (OFString*)name; -- (size_t)lengthForSite: (OFString*)name; -- (bool)isSiteLegacy: (OFString*)name; -- (void)setSite: (OFString*)site +- (bool)hasSite: (OFString *)name; +- (size_t)lengthForSite: (OFString *)name; +- (bool)isSiteLegacy: (OFString *)name; +- (void)setSite: (OFString *)site length: (size_t)length legacy: (bool)legacy; -- (void)removeSite: (OFString*)name; +- (void)removeSite: (OFString *)name; @end Index: iOS/SiteStorage.m ================================================================== --- iOS/SiteStorage.m +++ iOS/SiteStorage.m @@ -82,11 +82,11 @@ [_sites release]; [super dealloc]; } -- (OFArray*)sites +- (OFArray *)sites { void *pool = objc_autoreleasePoolPush(); OFArray *sites = [[_storage allKeys] sortedArray]; [sites retain]; @@ -97,36 +97,36 @@ - (size_t)sitesCount { return [_storage count]; } -- (bool)hasSite: (OFString*)name +- (bool)hasSite: (OFString *)name { return (_storage[name] != nil); } -- (size_t)lengthForSite: (OFString*)name +- (size_t)lengthForSite: (OFString *)name { OFDictionary *site = _storage[name]; if (site == nil) @throw [OFInvalidArgumentException exception]; return [site[lengthField] sizeValue]; } -- (bool)isSiteLegacy: (OFString*)name +- (bool)isSiteLegacy: (OFString *)name { OFDictionary *site = _storage[name]; if (site == nil) @throw [OFInvalidArgumentException exception]; return [site[legacyField] boolValue]; } -- (void)setSite: (OFString*)site +- (void)setSite: (OFString *)site length: (size_t)length legacy: (bool)legacy { void *pool = objc_autoreleasePoolPush(); @@ -137,11 +137,11 @@ [self _update]; objc_autoreleasePoolPop(pool); } -- (void)removeSite: (OFString*)name +- (void)removeSite: (OFString *)name { [_storage removeObjectForKey: name]; [self _update]; } Index: iOS/scrypt-pwgen.xcodeproj/project.pbxproj ================================================================== --- iOS/scrypt-pwgen.xcodeproj/project.pbxproj +++ iOS/scrypt-pwgen.xcodeproj/project.pbxproj @@ -360,11 +360,11 @@ "$(inherited)", "$(PROJECT_DIR)", ); INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "zone.heap.scrypt-pwgen"; + PRODUCT_BUNDLE_IDENTIFIER = "zone.heap.scrypt-pwgen.ios"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; 4B2E52F51DA942840040D091 /* Release */ = { @@ -378,11 +378,11 @@ "$(inherited)", "$(PROJECT_DIR)", ); INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "zone.heap.scrypt-pwgen"; + PRODUCT_BUNDLE_IDENTIFIER = "zone.heap.scrypt-pwgen.ios"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; /* End XCBuildConfiguration section */