Skip to content

fix: fix generated projects failing to build #710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Native<%- project.name -%>Spec>
#else
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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];
}

Expand Down
Loading