From 0e4250b4afa6828655d9b6c649b1b489d619499d Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Mon, 17 Feb 2020 10:46:43 -0800 Subject: [PATCH] Run CLANGFORMAT on sample Summary: This diff runs CLANGFORMAT lint on sample. I have added CLANGFORMAT as the lint engined for objc files in xplat/sonar. Right now the iOS folder is not formatted according to CLANGFORMAT. Reviewed By: passy Differential Revision: D19942174 fbshipit-source-id: bef3e67bf31f13bb52417c81c4c330d6c258872d --- iOS/Sample/AppDelegate.h | 2 +- iOS/Sample/AppDelegate.m | 46 ++++--- iOS/Sample/CommunicationDemoViewController.h | 3 +- iOS/Sample/CommunicationDemoViewController.mm | 71 +++++----- iOS/Sample/MainViewController.mm | 60 +++++---- iOS/Sample/NetworkViewController.m | 122 +++++++++++------- iOS/Sample/RootViewController.mm | 89 ++++++------- iOS/Sample/UserDefaultsViewController.m | 19 +-- iOS/Sample/main.m | 5 +- 9 files changed, 236 insertions(+), 181 deletions(-) diff --git a/iOS/Sample/AppDelegate.h b/iOS/Sample/AppDelegate.h index 09bdd9ced..4c5a2edd5 100644 --- a/iOS/Sample/AppDelegate.h +++ b/iOS/Sample/AppDelegate.h @@ -7,5 +7,5 @@ #import -@interface AppDelegate : UIResponder +@interface AppDelegate : UIResponder @end diff --git a/iOS/Sample/AppDelegate.m b/iOS/Sample/AppDelegate.m index f6f7d305e..7c2a09539 100644 --- a/iOS/Sample/AppDelegate.m +++ b/iOS/Sample/AppDelegate.m @@ -7,51 +7,61 @@ #import "AppDelegate.h" #import +#import +#import #import #import -#import -#import -#import -#import #import #import +#import #import "MainViewController.h" #import "RootViewController.h" #if !FB_SONARKIT_ENABLED -#error "Sample need to be run with SonarKit enabled in order to properly interact with Sonar. SonarKit is enabled by default if its a debug build." +#error \ + "Sample need to be run with SonarKit enabled in order to properly interact with Sonar. SonarKit is enabled by default if its a debug build." #endif @implementation AppDelegate { - UIWindow *_window; + UIWindow* _window; } -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ +- (BOOL)application:(UIApplication*)application + didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - FlipperClient *client = [FlipperClient sharedClient]; + FlipperClient* client = [FlipperClient sharedClient]; - SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; - [FlipperKitLayoutComponentKitSupport setUpWithDescriptorMapper: layoutDescriptorMapper]; - [client addPlugin: [[FlipperKitLayoutPlugin alloc] initWithRootNode: application - withDescriptorMapper: layoutDescriptorMapper]]; + SKDescriptorMapper* layoutDescriptorMapper = + [[SKDescriptorMapper alloc] initWithDefaults]; + [FlipperKitLayoutComponentKitSupport + setUpWithDescriptorMapper:layoutDescriptorMapper]; + [client addPlugin:[[FlipperKitLayoutPlugin alloc] + initWithRootNode:application + withDescriptorMapper:layoutDescriptorMapper]]; [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; - [[FlipperClient sharedClient] addPlugin: [[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; + [[FlipperClient sharedClient] + addPlugin:[[FlipperKitNetworkPlugin alloc] + initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; [client addPlugin:[FlipperKitExamplePlugin sharedInstance]]; [client addPlugin:[FlipperKitReactPlugin new]]; [client start]; - UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" bundle:nil]; - MainViewController *mainViewController = [storyboard instantiateViewControllerWithIdentifier:@"MainViewController"]; + UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" + bundle:nil]; + MainViewController* mainViewController = [storyboard + instantiateViewControllerWithIdentifier:@"MainViewController"]; - UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController: mainViewController]; + UINavigationController* navigationController = [[UINavigationController alloc] + initWithRootViewController:mainViewController]; navigationController.navigationBar.topItem.title = @"Sample"; navigationController.navigationBar.translucent = NO; - [_window setRootViewController: [[UINavigationController alloc] initWithRootViewController: mainViewController]]; + [_window + setRootViewController:[[UINavigationController alloc] + initWithRootViewController:mainViewController]]; [_window makeKeyAndVisible]; NSLog(@"Hello from Flipper in an Objc app!"); diff --git a/iOS/Sample/CommunicationDemoViewController.h b/iOS/Sample/CommunicationDemoViewController.h index 4ebb40884..9847d9fc1 100644 --- a/iOS/Sample/CommunicationDemoViewController.h +++ b/iOS/Sample/CommunicationDemoViewController.h @@ -7,6 +7,7 @@ #import -@interface CommunicationDemoViewController : UIViewController +@interface CommunicationDemoViewController + : UIViewController @end diff --git a/iOS/Sample/CommunicationDemoViewController.mm b/iOS/Sample/CommunicationDemoViewController.mm index c2b60e51d..e6b2a218f 100644 --- a/iOS/Sample/CommunicationDemoViewController.mm +++ b/iOS/Sample/CommunicationDemoViewController.mm @@ -8,49 +8,54 @@ #import "CommunicationDemoViewController.h" #import -@interface CommunicationDemoViewController() -@property (strong, nonatomic) NSMutableArray *messagesToDisplay; -@property (weak, nonatomic) IBOutlet UITextField *messageTextField; -@property (weak, nonatomic) IBOutlet UITableView *tableView; +@interface CommunicationDemoViewController ()< + FlipperKitExampleCommunicationResponderDelegate> +@property(strong, nonatomic) NSMutableArray* messagesToDisplay; +@property(weak, nonatomic) IBOutlet UITextField* messageTextField; +@property(weak, nonatomic) IBOutlet UITableView* tableView; @end @implementation CommunicationDemoViewController - (void)viewDidLoad { - [super viewDidLoad]; - [FlipperKitExamplePlugin sharedInstance].delegate = self; + [super viewDidLoad]; + [FlipperKitExamplePlugin sharedInstance].delegate = self; } -- (IBAction)tappedTriggerNotification:(UIButton *)sender { - [[FlipperKitExamplePlugin sharedInstance] triggerNotification]; +- (IBAction)tappedTriggerNotification:(UIButton*)sender { + [[FlipperKitExamplePlugin sharedInstance] triggerNotification]; } -- (IBAction)tappedSendMessage:(UIButton *)sender { - if (self.messageTextField.text.length > 0) { - [[FlipperKitExamplePlugin sharedInstance] sendMessage:self.messageTextField.text]; - } -} - -- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"reusableCell"]; - cell.textLabel.text = self.messagesToDisplay[indexPath.row]; - return cell; -} - -- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return self.messagesToDisplay.count; -} - -- (void)messageReceived:(NSString *)msg { - if (msg) { - if (!self.messagesToDisplay) { - self.messagesToDisplay = @[].mutableCopy; - } - [self.messagesToDisplay addObject:msg]; - dispatch_async(dispatch_get_main_queue(), ^{ - [self.tableView reloadData]; - }); +- (IBAction)tappedSendMessage:(UIButton*)sender { + if (self.messageTextField.text.length > 0) { + [[FlipperKitExamplePlugin sharedInstance] + sendMessage:self.messageTextField.text]; + } +} + +- (nonnull UITableViewCell*)tableView:(nonnull UITableView*)tableView + cellForRowAtIndexPath:(nonnull NSIndexPath*)indexPath { + UITableViewCell* cell = + [tableView dequeueReusableCellWithIdentifier:@"reusableCell"]; + cell.textLabel.text = self.messagesToDisplay[indexPath.row]; + return cell; +} + +- (NSInteger)tableView:(nonnull UITableView*)tableView + numberOfRowsInSection:(NSInteger)section { + return self.messagesToDisplay.count; +} + +- (void)messageReceived:(NSString*)msg { + if (msg) { + if (!self.messagesToDisplay) { + self.messagesToDisplay = @[].mutableCopy; } + [self.messagesToDisplay addObject:msg]; + dispatch_async(dispatch_get_main_queue(), ^{ + [self.tableView reloadData]; + }); + } } @end diff --git a/iOS/Sample/MainViewController.mm b/iOS/Sample/MainViewController.mm index c226ec052..2c35138c2 100644 --- a/iOS/Sample/MainViewController.mm +++ b/iOS/Sample/MainViewController.mm @@ -7,11 +7,11 @@ #import "MainViewController.h" +#import +#import "CommunicationDemoViewController.h" #import "NetworkViewController.h" #import "RootViewController.h" #import "UserDefaultsViewController.h" -#import "CommunicationDemoViewController.h" -#import @interface MainViewController () @@ -20,42 +20,54 @@ @implementation MainViewController - (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. + [super viewDidLoad]; + // Do any additional setup after loading the view. } -- (IBAction)tappedDiagnosticScreen:(UIButton *)sender { - FlipperDiagnosticsViewController *controller = [[FlipperDiagnosticsViewController alloc] init]; - [self.navigationController pushViewController:controller animated:true]; +- (IBAction)tappedDiagnosticScreen:(UIButton*)sender { + FlipperDiagnosticsViewController* controller = + [[FlipperDiagnosticsViewController alloc] init]; + [self.navigationController pushViewController:controller animated:true]; } -- (IBAction)tappedComponentKitLayout:(UIButton *)sender { - RootViewController *rootViewController = [RootViewController new]; +- (IBAction)tappedComponentKitLayout:(UIButton*)sender { + RootViewController* rootViewController = [RootViewController new]; - [self.navigationController pushViewController:rootViewController animated:true]; + [self.navigationController pushViewController:rootViewController + animated:true]; } -- (IBAction)tappedNetworkInspector:(UIButton *)sender { - UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" bundle:nil]; - NetworkViewController *networkViewController = [storyboard instantiateViewControllerWithIdentifier:@"NetworkViewController"]; +- (IBAction)tappedNetworkInspector:(UIButton*)sender { + UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" + bundle:nil]; + NetworkViewController* networkViewController = [storyboard + instantiateViewControllerWithIdentifier:@"NetworkViewController"]; - [self.navigationController pushViewController:networkViewController animated:true]; + [self.navigationController pushViewController:networkViewController + animated:true]; } - (IBAction)tappedUserDefaults:(id)sender { - UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" bundle:nil]; - UserDefaultsViewController *userDefaultsViewController = [storyboard instantiateViewControllerWithIdentifier:@"UserDefaultsViewController"]; - - [self.navigationController pushViewController:userDefaultsViewController animated:true]; + UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" + bundle:nil]; + UserDefaultsViewController* userDefaultsViewController = [storyboard + instantiateViewControllerWithIdentifier:@"UserDefaultsViewController"]; + + [self.navigationController pushViewController:userDefaultsViewController + animated:true]; } -- (IBAction)tappedCommunicationDemo:(UIButton *)sender { - UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" bundle:nil]; - CommunicationDemoViewController *communicationDemoViewController = [storyboard instantiateViewControllerWithIdentifier:@"CommunicationDemoViewController"]; - [self.navigationController pushViewController:communicationDemoViewController animated:true]; +- (IBAction)tappedCommunicationDemo:(UIButton*)sender { + UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"MainStoryBoard" + bundle:nil]; + CommunicationDemoViewController* communicationDemoViewController = + [storyboard instantiateViewControllerWithIdentifier: + @"CommunicationDemoViewController"]; + [self.navigationController pushViewController:communicationDemoViewController + animated:true]; } -- (IBAction)tappedCauseCrash:(UIButton *)sender { - NSArray *arr = @[]; +- (IBAction)tappedCauseCrash:(UIButton*)sender { + NSArray* arr = @[]; [arr objectAtIndex:10]; } diff --git a/iOS/Sample/NetworkViewController.m b/iOS/Sample/NetworkViewController.m index 263f079e3..106473426 100644 --- a/iOS/Sample/NetworkViewController.m +++ b/iOS/Sample/NetworkViewController.m @@ -18,66 +18,100 @@ self.navigationItem.title = @"Network"; } -- (IBAction)tappedGithubLitho:(UIButton *)sender { - [[[NSURLSession sharedSession] dataTaskWithURL:[NSURL URLWithString:@"https://raw.githubusercontent.com/facebook/litho/master/docs/static/logo.png"] completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable error) { - if (error && !data) { - return; - } - NSLog(@"Got Image"); - }] resume]; +- (IBAction)tappedGithubLitho:(UIButton*)sender { + [[[NSURLSession sharedSession] + dataTaskWithURL: + [NSURL + URLWithString: + @"https://raw.githubusercontent.com/facebook/litho/master/docs/static/logo.png"] + completionHandler:^( + NSData* _Nullable data, + NSURLResponse* _Nullable response, + NSError* _Nullable error) { + if (error && !data) { + return; + } + NSLog(@"Got Image"); + }] resume]; } -- (IBAction)tappedPOSTAPI:(UIButton *)sender { - NSString *post = @"https://demo9512366.mockable.io/FlipperPost"; - NSURL *url = [NSURL URLWithString:post]; - NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL: url]; +- (IBAction)tappedPOSTAPI:(UIButton*)sender { + NSString* post = @"https://demo9512366.mockable.io/FlipperPost"; + NSURL* url = [NSURL URLWithString:post]; + NSMutableURLRequest* urlRequest = [NSMutableURLRequest requestWithURL:url]; [urlRequest addValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [urlRequest addValue:@"application/json" forHTTPHeaderField:@"Accept"]; - NSDictionary *mapData = [[NSDictionary alloc] initWithObjectsAndKeys: @"Flipper", @"app", - @"Its awesome", @"remarks", - nil]; - NSError *error = nil; - NSData *postData = [NSJSONSerialization dataWithJSONObject:mapData options:0 error:&error]; + NSDictionary* mapData = + [[NSDictionary alloc] initWithObjectsAndKeys:@"Flipper", + @"app", + @"Its awesome", + @"remarks", + nil]; + NSError* error = nil; + NSData* postData = [NSJSONSerialization dataWithJSONObject:mapData + options:0 + error:&error]; [urlRequest setHTTPBody:postData]; [urlRequest setHTTPMethod:@"POST"]; - __weak NetworkViewController *weakSelf = self; - [[[NSURLSession sharedSession] dataTaskWithRequest:urlRequest completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable dataTaskError) { + __weak NetworkViewController* weakSelf = self; + [[[NSURLSession sharedSession] + dataTaskWithRequest:urlRequest + completionHandler:^( + NSData* _Nullable data, + NSURLResponse* _Nullable response, + NSError* _Nullable dataTaskError) { + if (dataTaskError || !data) { + [weakSelf + showAlertWithMessage:@"Received error in POST API response"]; + return; + } + NSDictionary* dict = + [NSJSONSerialization JSONObjectWithData:data + options:0 + error:&dataTaskError]; + NSLog(@"MSG-POST: %@", dict[@"msg"]); - if (dataTaskError || !data) { - [weakSelf showAlertWithMessage:@"Received error in POST API response"]; - return; - } - NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:0 error:&dataTaskError]; - NSLog(@"MSG-POST: %@", dict[@"msg"]); - - [weakSelf showAlertWithMessage:@"Received response from POST API"]; - - }] resume]; + [weakSelf showAlertWithMessage:@"Received response from POST API"]; + }] resume]; } -- (IBAction)tappedGetAPI:(UIButton *)sender { - __weak NetworkViewController *weakSelf = self; - [[[NSURLSession sharedSession] dataTaskWithURL:[NSURL URLWithString:@"https://demo9512366.mockable.io/FlipperGet"] completionHandler:^(NSData *_Nullable data, NSURLResponse *_Nullable response, NSError *_Nullable error) { - if (error || !data) { - [weakSelf showAlertWithMessage:@"Received error in GET API response"]; - return; - } - NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; - NSLog(@"MSG-GET: %@", dict[@"msg"]); - [weakSelf showAlertWithMessage:@"Received response from GET API"]; - }] resume]; +- (IBAction)tappedGetAPI:(UIButton*)sender { + __weak NetworkViewController* weakSelf = self; + [[[NSURLSession sharedSession] + dataTaskWithURL: + [NSURL URLWithString:@"https://demo9512366.mockable.io/FlipperGet"] + completionHandler:^( + NSData* _Nullable data, + NSURLResponse* _Nullable response, + NSError* _Nullable error) { + if (error || !data) { + [weakSelf showAlertWithMessage:@"Received error in GET API response"]; + return; + } + NSDictionary* dict = [NSJSONSerialization JSONObjectWithData:data + options:0 + error:&error]; + NSLog(@"MSG-GET: %@", dict[@"msg"]); + [weakSelf showAlertWithMessage:@"Received response from GET API"]; + }] resume]; } -- (void)showAlertWithMessage:(nonnull NSString *)msg { +- (void)showAlertWithMessage:(nonnull NSString*)msg { dispatch_async(dispatch_get_main_queue(), ^{ - UIAlertController *alertController = [self alertControllerForMessage:msg]; + UIAlertController* alertController = [self alertControllerForMessage:msg]; [self presentViewController:alertController animated:true completion:nil]; }); } -- (UIAlertController *)alertControllerForMessage:(nonnull NSString *)msg { - UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Flipper" message:msg preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction *action = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]; +- (UIAlertController*)alertControllerForMessage:(nonnull NSString*)msg { + UIAlertController* controller = + [UIAlertController alertControllerWithTitle:@"Flipper" + message:msg + preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction* action = + [UIAlertAction actionWithTitle:@"Ok" + style:UIAlertActionStyleDefault + handler:nil]; [controller addAction:action]; return controller; } diff --git a/iOS/Sample/RootViewController.mm b/iOS/Sample/RootViewController.mm index e453ff78d..1582c8224 100644 --- a/iOS/Sample/RootViewController.mm +++ b/iOS/Sample/RootViewController.mm @@ -20,19 +20,19 @@ @interface RootViewController () -@property (strong, nonatomic) CKComponentHostingView *rootCKHostingView; +@property(strong, nonatomic) CKComponentHostingView* rootCKHostingView; @end @implementation RootViewController -- (instancetype)init -{ +- (instancetype)init { if (self = [super init]) { _rootCKHostingView = [[CKComponentHostingView alloc] - initWithComponentProvider:[self class] - sizeRangeProvider: - [CKComponentFlexibleSizeRangeProvider providerWithFlexibility:CKComponentSizeRangeFlexibleHeight]]; + initWithComponentProvider:[self class] + sizeRangeProvider:[CKComponentFlexibleSizeRangeProvider + providerWithFlexibility: + CKComponentSizeRangeFlexibleHeight]]; [self.view addSubview:_rootCKHostingView]; [self loadViewIfNeeded]; @@ -46,54 +46,45 @@ self.edgesForExtendedLayout = UIRectEdgeNone; } -- (void)viewDidLayoutSubviews -{ +- (void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; _rootCKHostingView.frame = self.view.bounds; } -+ (CKComponent *)componentForModel:(id)model context:(id)context { ++ (CKComponent*)componentForModel:(id)model + context:(id)context { return [CKBackgroundLayoutComponent - newWithComponent: - [CKFlexboxComponent - newWithView:{ - } - size:{} - style:{} - children: { - { - [CKButtonComponent - newWithAction:nil - options:{ - .titles = @"Purple", - .titleColors = UIColor.purpleColor, - } - ] - }, - { - [CKButtonComponent - newWithAction:nil - options:{ - .titles = @"Brown", - .titleColors = UIColor.brownColor, - } - ] - }, - { - [CKButtonComponent - newWithAction:nil - options:{ - .titles = @"Cyan", - .titleColors = UIColor.cyanColor, - } - ] - }, - }] - background: - [CKImageComponent - newWithImage:[UIImage imageNamed:@"sonarpattern"] - attributes:{} - size:{}]]; + newWithComponent: + [CKFlexboxComponent newWithView:{} + size:{} + style:{} + children:{ + {[CKButtonComponent + newWithAction:nil + options:{ + .titles = @"Purple", + .titleColors = + UIColor.purpleColor, + }]}, + {[CKButtonComponent + newWithAction:nil + options:{ + .titles = @"Brown", + .titleColors = + UIColor.brownColor, + }]}, + {[CKButtonComponent + newWithAction:nil + options:{ + .titles = @"Cyan", + .titleColors = + UIColor.cyanColor, + }]}, + }] + background:[CKImageComponent + newWithImage:[UIImage imageNamed:@"sonarpattern"] + attributes:{} + size:{}]]; } @end diff --git a/iOS/Sample/UserDefaultsViewController.m b/iOS/Sample/UserDefaultsViewController.m index c60ac8820..2f469fa9c 100644 --- a/iOS/Sample/UserDefaultsViewController.m +++ b/iOS/Sample/UserDefaultsViewController.m @@ -8,22 +8,23 @@ #import "UserDefaultsViewController.h" @interface UserDefaultsViewController () -@property (weak, nonatomic) IBOutlet UITextField *valueTextField; -@property (weak, nonatomic) IBOutlet UITextField *keyTextField; -@property (nonatomic, strong) NSUserDefaults *userDefaults; +@property(weak, nonatomic) IBOutlet UITextField* valueTextField; +@property(weak, nonatomic) IBOutlet UITextField* keyTextField; +@property(nonatomic, strong) NSUserDefaults* userDefaults; @end @implementation UserDefaultsViewController -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if (self = [super initWithCoder:aDecoder]) { - _userDefaults = [[NSUserDefaults alloc] initWithSuiteName:nil]; - } - return self; +- (instancetype)initWithCoder:(NSCoder*)aDecoder { + if (self = [super initWithCoder:aDecoder]) { + _userDefaults = [[NSUserDefaults alloc] initWithSuiteName:nil]; + } + return self; } - (IBAction)tappedSave:(id)sender { - [self.userDefaults setObject:self.valueTextField.text forKey:self.keyTextField.text]; + [self.userDefaults setObject:self.valueTextField.text + forKey:self.keyTextField.text]; } @end diff --git a/iOS/Sample/main.m b/iOS/Sample/main.m index 4fdf34edb..b4c2c2c3f 100644 --- a/iOS/Sample/main.m +++ b/iOS/Sample/main.m @@ -9,8 +9,9 @@ #import "AppDelegate.h" -int main(int argc, char * argv[]) { +int main(int argc, char* argv[]) { @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + return UIApplicationMain( + argc, argv, nil, NSStringFromClass([AppDelegate class])); } }