diff --git a/template/ios/HelloWorld/AppDelegate.mm b/template/ios/HelloWorld/AppDelegate.mm index ba746f6fa9b46b..cef8d202e81c04 100644 --- a/template/ios/HelloWorld/AppDelegate.mm +++ b/template/ios/HelloWorld/AppDelegate.mm @@ -9,10 +9,10 @@ #if RCT_NEW_ARCH_ENABLED #import #import -#import #import #import #import +#import #import @@ -44,9 +44,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"HelloWorld", nil); if (@available(iOS 13.0, *)) { - rootView.backgroundColor = [UIColor systemBackgroundColor]; + rootView.backgroundColor = [UIColor systemBackgroundColor]; } else { - rootView.backgroundColor = [UIColor whiteColor]; + rootView.backgroundColor = [UIColor whiteColor]; } self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; @@ -92,7 +92,8 @@ - (Class)getModuleClassFromName:(const char *)name } - (std::shared_ptr)getTurboModule:(const std::string &)name - initParams:(const facebook::react::ObjCTurboModule::InitParams &)params + initParams: + (const facebook::react::ObjCTurboModule::InitParams &)params { return nullptr; } diff --git a/template/ios/HelloWorld/main.m b/template/ios/HelloWorld/main.m index b1df44b953ec48..d645c7246c42e4 100644 --- a/template/ios/HelloWorld/main.m +++ b/template/ios/HelloWorld/main.m @@ -2,7 +2,8 @@ #import "AppDelegate.h" -int main(int argc, char * argv[]) { +int main(int argc, char *argv[]) +{ @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } diff --git a/template/ios/HelloWorldTests/HelloWorldTests.m b/template/ios/HelloWorldTests/HelloWorldTests.m index eabd5fd18227a5..884d405d6579c6 100644 --- a/template/ios/HelloWorldTests/HelloWorldTests.m +++ b/template/ios/HelloWorldTests/HelloWorldTests.m @@ -13,7 +13,7 @@ @interface HelloWorldTests : XCTestCase @implementation HelloWorldTests -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test { if (test(view)) { return YES; @@ -34,23 +34,25 @@ - (void)testRendersWelcomeScreen __block NSString *redboxError = nil; #ifdef DEBUG - RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); + RCTSetLogFunction( + ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); #endif while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; + foundElement = [self findSubviewInView:vc.view + matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; } #ifdef DEBUG @@ -61,5 +63,4 @@ - (void)testRendersWelcomeScreen XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); } - @end