diff --git a/packages/create-react-native-library/templates/objc-library/ios/{%- project.name %}.h b/packages/create-react-native-library/templates/objc-library/ios/{%- project.name %}.h index 32ed3c4b5..ec63832a9 100644 --- a/packages/create-react-native-library/templates/objc-library/ios/{%- project.name %}.h +++ b/packages/create-react-native-library/templates/objc-library/ios/{%- project.name %}.h @@ -5,7 +5,7 @@ <% } -%> #ifdef RCT_NEW_ARCH_ENABLED -#import "RN<%- project.name -%>Spec.h" +#import "generated/RN<%- project.name -%>Spec/RN<%- project.name -%>Spec.h" @interface <%- project.name -%> : NSObject Spec> #else diff --git a/packages/create-react-native-library/templates/objc-view-mixed/ios/{%- project.name %}View.mm b/packages/create-react-native-library/templates/objc-view-mixed/ios/{%- project.name %}View.mm index 24aff36c2..a94cf4efb 100644 --- a/packages/create-react-native-library/templates/objc-view-mixed/ios/{%- project.name %}View.mm +++ b/packages/create-react-native-library/templates/objc-view-mixed/ios/{%- project.name %}View.mm @@ -1,10 +1,10 @@ #ifdef RCT_NEW_ARCH_ENABLED #import "<%- project.name -%>View.h" -#import "ComponentDescriptors.h" -#import "EventEmitters.h" -#import "Props.h" -#import "RCTComponentViewHelpers.h" +#import "generated/<%- project.name -%>ViewSpec/ComponentDescriptors.h" +#import "generated/<%- project.name -%>ViewSpec/EventEmitters.h" +#import "generated/<%- project.name -%>ViewSpec/Props.h" +#import "generated/<%- project.name -%>ViewSpec/RCTComponentViewHelpers.h" #import "RCTFabricComponentsPlugins.h" #import "Utils.h" diff --git a/packages/create-react-native-library/templates/objc-view-new/ios/{%- project.name %}View.mm b/packages/create-react-native-library/templates/objc-view-new/ios/{%- project.name %}View.mm index e2aca3f20..d9361da85 100644 --- a/packages/create-react-native-library/templates/objc-view-new/ios/{%- project.name %}View.mm +++ b/packages/create-react-native-library/templates/objc-view-new/ios/{%- project.name %}View.mm @@ -1,9 +1,9 @@ #import "<%- project.name -%>View.h" -#import "ComponentDescriptors.h" -#import "EventEmitters.h" -#import "Props.h" -#import "RCTComponentViewHelpers.h" +#import "generated/<%- project.name -%>ViewSpec/ComponentDescriptors.h" +#import "generated/<%- project.name -%>ViewSpec/EventEmitters.h" +#import "generated/<%- project.name -%>ViewSpec/Props.h" +#import "generated/<%- project.name -%>ViewSpec/RCTComponentViewHelpers.h" #import "RCTFabricComponentsPlugins.h" @@ -58,13 +58,13 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const & { NSString *noHashString = [stringToConvert stringByReplacingOccurrencesOfString:@"#" withString:@""]; NSScanner *stringScanner = [NSScanner scannerWithString:noHashString]; - + unsigned hex; if (![stringScanner scanHexInt:&hex]) return nil; int r = (hex >> 16) & 0xFF; int g = (hex >> 8) & 0xFF; int b = (hex) & 0xFF; - + return [UIColor colorWithRed:r / 255.0f green:g / 255.0f blue:b / 255.0f alpha:1.0f]; }