Skip to content

Commit

Permalink
This fixes issue with header search paths for monorepo (#1484)
Browse files Browse the repository at this point in the history
Instead of hardcoding a relative path we now use the $PODS_TARGET_SRCROOT constant which should fix the issue with node_modules being located a level above in mono repos.

I've also tested this with `use_frameworks! linkage: :static` now and it seems to be working as well.

fixes #1477
fixes #652 (again?)
  • Loading branch information
chrfalch authored Apr 13, 2023
1 parent 9465d36 commit 2da94c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ SPEC CHECKSUMS:
React-jsinspector: 9f7c9137605e72ca0343db4cea88006cb94856dd
React-logger: 957e5dc96d9dbffc6e0f15e0ee4d2b42829ff207
react-native-safe-area-context: dfe5aa13bee37a0c7e8059d14f72ffc076d120e9
react-native-skia: 295bce84f094f49690b98aad3dff9789b5c9a91d
react-native-skia: 914835a9d66b979d915352b428d723e3f4f8dbd9
React-perflogger: af8a3d31546077f42d729b949925cc4549f14def
React-RCTActionSheet: 57cc5adfefbaaf0aae2cf7e10bccd746f2903673
React-RCTAnimation: 11c61e94da700c4dc915cf134513764d87fc5e2b
Expand Down
4 changes: 2 additions & 2 deletions example/ios/RNSkia.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
};
};
};
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNSkia" */;
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "rnskia" */;
compatibilityVersion = "Xcode 12.0";
developmentRegion = en;
hasScannedForEncodings = 0;
Expand Down Expand Up @@ -689,7 +689,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNSkia" */ = {
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "rnskia" */ = {
isa = XCConfigurationList;
buildConfigurations = (
83CBBA201A601CBA00E9B192 /* Debug */,
Expand Down
8 changes: 2 additions & 6 deletions package/react-native-skia.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ Pod::Spec.new do |s|
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) SK_GL=1 SK_METAL=1',
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
'DEFINES_MODULE' => 'YES',
"HEADER_SEARCH_PATHS" => '"$(PODS_ROOT)/../../node_modules/@shopify/react-native-skia/cpp/" ' +
'"$(PODS_ROOT)/../../node_modules/@shopify/react-native-skia/cpp/api/" ' +
'"$(PODS_ROOT)/../../node_modules/@shopify/react-native-skia/cpp/rnskia/" ' +
'"$(PODS_ROOT)/../../node_modules/@shopify/react-native-skia/cpp/rnskia/dom/" ' +
'"$(PODS_ROOT)/../../node_modules/@shopify/react-native-skia/cpp/skia/"'
"HEADER_SEARCH_PATHS" => '"$(PODS_TARGET_SRCROOT)/cpp/"/**'
}

s.frameworks = 'GLKit', 'MetalKit'
Expand All @@ -45,7 +41,7 @@ Pod::Spec.new do |s|
# All iOS cpp/h files
s.source_files = [
"ios/**/*.{h,c,cc,cpp,m,mm,swift}",
"cpp/**/*.{h,cpp}"
"cpp/**/*.{h,cpp}"
]

s.dependency "React"
Expand Down

0 comments on commit 2da94c5

Please sign in to comment.