From b458f3e6a52b9811a1e47c5a649cfc29a158933a Mon Sep 17 00:00:00 2001 From: Tony Lu Date: Fri, 19 Jul 2019 16:33:40 -0700 Subject: [PATCH] Fixed clang_code_format --- .../tvOS-sample/tvOS-sample/AppDelegate.h | 6 ++-- .../tvOS-sample/tvOS-sample/AppDelegate.m | 32 ++++++++++--------- .../tvOS-sample/tvOS-sample/ViewController.h | 2 -- .../tvOS-sample/tvOS-sample/ViewController.m | 9 +++--- .../examples/tvOS-sample/tvOS-sample/main.m | 4 +-- .../watchOS-sample/AppDelegate.h | 6 ++-- .../watchOS-sample/AppDelegate.m | 32 ++++++++++--------- .../watchOS-sample/ViewController.h | 2 -- .../watchOS-sample/ViewController.m | 1 - .../watchOS-sample/watchOS-sample/main.m | 4 +-- templates/gRPC-Core.podspec.template | 3 +- templates/gRPC-RxLibrary.podspec.template | 1 + templates/gRPC.podspec.template | 1 + 13 files changed, 50 insertions(+), 53 deletions(-) diff --git a/src/objective-c/examples/tvOS-sample/tvOS-sample/AppDelegate.h b/src/objective-c/examples/tvOS-sample/tvOS-sample/AppDelegate.h index a1de90167cd..183abcf4ec8 100644 --- a/src/objective-c/examples/tvOS-sample/tvOS-sample/AppDelegate.h +++ b/src/objective-c/examples/tvOS-sample/tvOS-sample/AppDelegate.h @@ -18,10 +18,8 @@ #import -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; +@interface AppDelegate : UIResponder +@property(strong, nonatomic) UIWindow* window; @end - diff --git a/src/objective-c/examples/tvOS-sample/tvOS-sample/AppDelegate.m b/src/objective-c/examples/tvOS-sample/tvOS-sample/AppDelegate.m index 25b429523a3..11b6c418aee 100644 --- a/src/objective-c/examples/tvOS-sample/tvOS-sample/AppDelegate.m +++ b/src/objective-c/examples/tvOS-sample/tvOS-sample/AppDelegate.m @@ -24,38 +24,40 @@ @implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. return YES; } - - (void)applicationWillResignActive:(UIApplication *)application { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + // Sent when the application is about to move from active to inactive state. This can occur for + // certain types of temporary interruptions (such as an incoming phone call or SMS message) or + // when the user quits the application and it begins the transition to the background state. Use + // this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. + // Games should use this method to pause the game. } - - (void)applicationDidEnterBackground:(UIApplication *)application { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + // Use this method to release shared resources, save user data, invalidate timers, and store + // enough application state information to restore your application to its current state in case + // it is terminated later. If your application supports background execution, this method is + // called instead of applicationWillTerminate: when the user quits. } - - (void)applicationWillEnterForeground:(UIApplication *)application { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + // Called as part of the transition from the background to the active state; here you can undo + // many of the changes made on entering the background. } - - (void)applicationDidBecomeActive:(UIApplication *)application { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + // Restart any tasks that were paused (or not yet started) while the application was inactive. If + // the application was previously in the background, optionally refresh the user interface. } - - (void)applicationWillTerminate:(UIApplication *)application { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + // Called when the application is about to terminate. Save data if appropriate. See also + // applicationDidEnterBackground:. } - @end diff --git a/src/objective-c/examples/tvOS-sample/tvOS-sample/ViewController.h b/src/objective-c/examples/tvOS-sample/tvOS-sample/ViewController.h index 79de577af81..0aa0b2a73a7 100644 --- a/src/objective-c/examples/tvOS-sample/tvOS-sample/ViewController.h +++ b/src/objective-c/examples/tvOS-sample/tvOS-sample/ViewController.h @@ -20,6 +20,4 @@ @interface ViewController : UIViewController - @end - diff --git a/src/objective-c/examples/tvOS-sample/tvOS-sample/ViewController.m b/src/objective-c/examples/tvOS-sample/tvOS-sample/ViewController.m index 289de19f5de..0d291e44842 100644 --- a/src/objective-c/examples/tvOS-sample/tvOS-sample/ViewController.m +++ b/src/objective-c/examples/tvOS-sample/tvOS-sample/ViewController.m @@ -32,10 +32,10 @@ - (void)viewDidLoad { [super viewDidLoad]; - + GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; _options = options; - + _service = [[RMTTestService alloc] initWithHost:@"grpc-test.sandbox.googleapis.com" callOptions:_options]; } @@ -43,9 +43,8 @@ - (IBAction)makeCall:(id)sender { RMTSimpleRequest *request = [RMTSimpleRequest message]; request.responseSize = 100; - GRPCUnaryProtoCall *call = [_service unaryCallWithMessage:request - responseHandler:self - callOptions:nil]; + GRPCUnaryProtoCall *call = + [_service unaryCallWithMessage:request responseHandler:self callOptions:nil]; [call start]; } diff --git a/src/objective-c/examples/tvOS-sample/tvOS-sample/main.m b/src/objective-c/examples/tvOS-sample/tvOS-sample/main.m index 62a9f8e6efb..2797c6f17f2 100644 --- a/src/objective-c/examples/tvOS-sample/tvOS-sample/main.m +++ b/src/objective-c/examples/tvOS-sample/tvOS-sample/main.m @@ -19,8 +19,8 @@ #import #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])); } } diff --git a/src/objective-c/examples/watchOS-sample/watchOS-sample/AppDelegate.h b/src/objective-c/examples/watchOS-sample/watchOS-sample/AppDelegate.h index a1de90167cd..183abcf4ec8 100644 --- a/src/objective-c/examples/watchOS-sample/watchOS-sample/AppDelegate.h +++ b/src/objective-c/examples/watchOS-sample/watchOS-sample/AppDelegate.h @@ -18,10 +18,8 @@ #import -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; +@interface AppDelegate : UIResponder +@property(strong, nonatomic) UIWindow* window; @end - diff --git a/src/objective-c/examples/watchOS-sample/watchOS-sample/AppDelegate.m b/src/objective-c/examples/watchOS-sample/watchOS-sample/AppDelegate.m index 571139a3d64..d78f5f2175c 100644 --- a/src/objective-c/examples/watchOS-sample/watchOS-sample/AppDelegate.m +++ b/src/objective-c/examples/watchOS-sample/watchOS-sample/AppDelegate.m @@ -24,38 +24,40 @@ @implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. return YES; } - - (void)applicationWillResignActive:(UIApplication *)application { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + // Sent when the application is about to move from active to inactive state. This can occur for + // certain types of temporary interruptions (such as an incoming phone call or SMS message) or + // when the user quits the application and it begins the transition to the background state. Use + // this method to pause ongoing tasks, disable timers, and invalidate graphics rendering + // callbacks. Games should use this method to pause the game. } - - (void)applicationDidEnterBackground:(UIApplication *)application { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + // Use this method to release shared resources, save user data, invalidate timers, and store + // enough application state information to restore your application to its current state in case + // it is terminated later. If your application supports background execution, this method is + // called instead of applicationWillTerminate: when the user quits. } - - (void)applicationWillEnterForeground:(UIApplication *)application { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + // Called as part of the transition from the background to the active state; here you can undo + // many of the changes made on entering the background. } - - (void)applicationDidBecomeActive:(UIApplication *)application { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + // Restart any tasks that were paused (or not yet started) while the application was inactive. If + // the application was previously in the background, optionally refresh the user interface. } - - (void)applicationWillTerminate:(UIApplication *)application { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + // Called when the application is about to terminate. Save data if appropriate. See also + // applicationDidEnterBackground:. } - @end diff --git a/src/objective-c/examples/watchOS-sample/watchOS-sample/ViewController.h b/src/objective-c/examples/watchOS-sample/watchOS-sample/ViewController.h index 79de577af81..0aa0b2a73a7 100644 --- a/src/objective-c/examples/watchOS-sample/watchOS-sample/ViewController.h +++ b/src/objective-c/examples/watchOS-sample/watchOS-sample/ViewController.h @@ -20,6 +20,4 @@ @interface ViewController : UIViewController - @end - diff --git a/src/objective-c/examples/watchOS-sample/watchOS-sample/ViewController.m b/src/objective-c/examples/watchOS-sample/watchOS-sample/ViewController.m index c5cea11f5bc..cd06242f80b 100644 --- a/src/objective-c/examples/watchOS-sample/watchOS-sample/ViewController.m +++ b/src/objective-c/examples/watchOS-sample/watchOS-sample/ViewController.m @@ -31,5 +31,4 @@ // Do any additional setup after loading the view, typically from a nib. } - @end diff --git a/src/objective-c/examples/watchOS-sample/watchOS-sample/main.m b/src/objective-c/examples/watchOS-sample/watchOS-sample/main.m index 62a9f8e6efb..2797c6f17f2 100644 --- a/src/objective-c/examples/watchOS-sample/watchOS-sample/main.m +++ b/src/objective-c/examples/watchOS-sample/watchOS-sample/main.m @@ -19,8 +19,8 @@ #import #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])); } } diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index d367ce4f45f..43645edf2e4 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -94,7 +94,8 @@ s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' s.tvos.deployment_target = '10.0' - + s.watchos.deployment_target = '4.0' + s.requires_arc = false name = 'grpc' diff --git a/templates/gRPC-RxLibrary.podspec.template b/templates/gRPC-RxLibrary.podspec.template index 0973b6551db..9389c5ecd8d 100644 --- a/templates/gRPC-RxLibrary.podspec.template +++ b/templates/gRPC-RxLibrary.podspec.template @@ -38,6 +38,7 @@ s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' s.tvos.deployment_target = '10.0' + s.watchos.deployment_target = '4.0' name = 'RxLibrary' s.module_name = name diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index c9723933fcd..8cb380ede03 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -37,6 +37,7 @@ s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' s.tvos.deployment_target = '10.0' + s.watchos.deployment_target = '4.0' name = 'GRPCClient' s.module_name = name