Skip to content

Commit

Permalink
fix: Make /views/ private header
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Jan 15, 2025
1 parent 116bc71 commit 1c28ac9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ SPEC CHECKSUMS:
fmt: 10c6e61f4be25dc963c36bd73fc7b1705fe975be
glog: 08b301085f15bcbb6ff8632a8ebaf239aae04e6a
hermes-engine: 1949ca944b195a8bde7cbf6316b9068e19cf53c6
NitroImage: ff97c5986ea4619abd3d6399b886eac84f5a4b65
NitroImage: ccc116b3881f723f1d3f77743acf8028681160f1
NitroModules: 9d5bc0172f6d9b098eb29e8cd9891e16881cd4b6
RCT-Folly: bf5c0376ffe4dd2cf438dcf86db385df9fdce648
RCTDeprecation: 063fc281b30b7dc944c98fe53a7e266dab1a8706
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def add_nitrogen_files(spec)
spec.private_header_files = current_private_header_files + [
# iOS specific specs
"nitrogen/generated/ios/c++/**/*.{h,hpp}",
# Views are framework-specific and should be private
"nitrogen/generated/shared/**/views/**/*"
]
current_pod_target_xcconfig = spec.attributes_hash['pod_target_xcconfig'] || {}
Expand Down
4 changes: 2 additions & 2 deletions packages/nitrogen/src/views/ViewComponentShadowNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ ${createFileMetadataString(`${component}.cpp`)}
namespace ${namespace} {
${propsClassName}::${propsClassName}(const react::PropsParserContext& context,
${ctorIndent} const ${propsClassName}& sourceProps,
${ctorIndent} const react::RawProps& rawProps): react::ViewProps(context, sourceProps, rawProps) {
${ctorIndent} const ${propsClassName}& sourceProps,
${ctorIndent} const react::RawProps& rawProps): react::ViewProps(context, sourceProps, rawProps) {
if (rawProps.isEmpty()) {
// TODO: idk? Hanno?
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def add_nitrogen_files(spec)
spec.private_header_files = current_private_header_files + [
# iOS specific specs
"nitrogen/generated/ios/c++/**/*.{h,hpp}",
# Views are framework-specific and should be private
"nitrogen/generated/shared/**/views/**/*"
]

current_pod_target_xcconfig = spec.attributes_hash['pod_target_xcconfig'] || {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace margelo::nitro::image::views {

HybridTestViewProps::HybridTestViewProps(const react::PropsParserContext& context,
const HybridTestViewProps& sourceProps,
const react::RawProps& rawProps): react::ViewProps(context, sourceProps, rawProps) {
const HybridTestViewProps& sourceProps,
const react::RawProps& rawProps): react::ViewProps(context, sourceProps, rawProps) {
if (rawProps.isEmpty()) {
// TODO: idk? Hanno?
return;
Expand Down

0 comments on commit 1c28ac9

Please sign in to comment.