-
Notifications
You must be signed in to change notification settings - Fork 459
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
SkData.h not found when using use_frameworks! #652
Comments
Hi, @dpyeates! I'm not able to find any mention of |
@chrfalch agreed, I was using it temporarily as a work around waiting for a package update. However, even just having use_frameworks! I still get the same error?
|
Has anyone been able to get RN Skia working in conjunction with Firebase and use_frameworks? Here is my current pod file:
|
@chrfalch could you try building using use_frameworks! and see if you get the same error please? |
Well, I got it to work with the workaround below since we also use React Native Firebase and just got started with React Native Skia: Found this ruby package called So, in our case, we have:
|
@laudebugs Thanks for the suggestion! @dpyeates Could you test out if this works for you? |
I'm trying :-) Having a few problems getting that gem to work. @laudebugs which version of CocoaPods are you using? I'm using 1.11.3 on an M1 Mac and I'm getting
The gem installs OK after adding it to my Gemfile and doing a bundle install, but the pod install doesn't seem to be finding it. Still investigating - will update ASAP. |
try running
|
Hmmm, no idea why that made a difference but it did. gem seems to work OK now.
However, I don't get to tell if Skia builds as Firebase modules fail to build before hand. |
This happens even after cleaning your ios build folder and reinstalling pods? |
Yes. It seems there is an issue with @react-native-firebase/storage which means this isn't working quite right. If I remove @react-native-firebase/storage from my build I got one other Skia related error related to react-native bridging paths which I resolved with another workaround in the post_install before I got a successful build. Worth noting that I also got it working without using the cocoapods-user-defined-build-types gem, by setting RNFirebaseAsStaticFramework to true and setting modular_headers => true on each Firebase library that I required.
To summarise: RNSkia doesn't build with use_frameworks! at the moment. So any dependent library you use that does require frameworks (such as Firebase) you will need to at to your pod file and set modular_headers => true. Here is my pod file - I have FirebaseStorage excluded until I get a fix here
|
Unfortunately, these workarounds do not work for us because we need to use |
Hi @reichhartd - could you look into how this can be done and what we'd need to support? A PR would be very welcome. |
Unfortunately, I have only rudimentary knowledge of cocoapods myself. I am currently reading up on the exact difference: Cocoa Touch Static Library vs. Cocoa Touch Framework When I look at a similar issue with I also have a lot to do at the moment, so I can't promise to take over the issue. Edit: This article explain the difference better: Basic overview of static and dynamic frameworks on iOS |
It works in combination with |
I'm seeing the same as @dpyeates and @reichhartd |
I'm also seeing this. Forced to run with |
How can we move this forward? What changes need to be made to support use_frameworks? |
As a very temporary workaround you can roll back to |
Would it be possible to create a small repo showing this issue (preferably as a Github repo) so that we can investigate? |
The easiest way is to add the line Otherwise, I created a repository here, for which I added the React Native TypeScript template. Only The error appears when you try to launch the iOS app. |
Same here! |
Any updates on this issue? |
I tried adding I found some information about Firebase now supporting static frameworks here: https://firebase.google.com/docs/ios/link-firebase-static-dynamic |
Flipper does not work with |
Correct - and I think the problem lies with Firebase, could you all try to follow the link and see if there are other options linking Firebase in later versions that doesn't affect linking of all other libraries in the App? |
any update on this issue? |
This won't work for us, as we also have I don't have a strong opinion which one I prefer, I think it should be up to the user which link type to use, because otherwise there will always be conflicting libraries. |
for Expo/EAS user who want migrate to firebase analytics, install @react-native-firebase/app 14.12.0 works without this error packages "@react-native-firebase/app": "14.12.0", app.config
(no need expo-build-properties, so not conflict with react-native-skia) |
Thanks to @gasolin for providing this info! Appreciate it :) |
For Expo/EAS users, following @hieucoi96's workaround you can build a plugin to (dangerously) modify Podfile following the template provided by Expo (Podfile):
"expo": "^47.0.0", |
@chrfalch @wcandillon Any chance of an official fix for this sometime soon? The |
When using the Firebase library we are required to add `use_frameworks! :linkage => :static` to the Pod file of the consuming app. This has until now caused some issues with building Skia on iOS (a workaround exists, but it shouldn't be necessary). The reason for the problem is that RN Skia uses subspecs with header mappings (we are trying to preserve some of the file structure to make our external Skia includes build correctly) which isn't used when use_frameworks are set. This causes XCode to not find the include files. This commit fixes this by removing the subspec and adding header search paths for the Skia pod. Only the pod file is changed, so this will not affect Android build. fixes #652
When using the Firebase library we are required to add `use_frameworks! :linkage => :static` to the Pod file of the consuming app. This has until now caused some issues with building Skia on iOS (a workaround exists, but it shouldn't be necessary). The reason for the problem is that RN Skia uses subspecs with header mappings (we are trying to preserve some of the file structure to make our external Skia includes build correctly) which isn't used when use_frameworks are set. This causes XCode to not find the include files. This commit fixes this by removing the subspec and adding header search paths for the Skia pod. Only the pod file is changed, so this will not affect Android build. fixes #652 Co-authored-by: William Candillon <[email protected]>
Hey, My team doesn't use Started getting the same error mentioned in the original post on build: Any idea why that might be? For now we've downgraded back to 175 but would like to be able to stay up to date. Thanks! |
Did you remember to do |
not a stupid question... but yes, we tried a couple times and even did a fresh install after clearing the pod cache completely. Still end up with that file not found error on iOS build. |
@arihirsch: I'm able to install in a new, blank React Native project that does not have |
Hi I tried @hieucoi96 solution my build is successful but it is closing unexpectedly!This is how my podfile looks now
|
@chrfalch this is how my Podlock looks like: I had to downgrade my skia version to 175, but it fails with 178 with this error message: With this podlock works, but upgrading skia to the latest version fails
|
We have the same error on our application without use_framework, no workaround described in this issue seems to fix it. |
I have the same problem. i tried the solutions restated above and now I have a new error: |
That's probl. not related to Skia unfortunately. |
Tried downgrading to After a change in version I remove all Running this in a monorepo, so I thought maybe #1477 would fix it, but I tried those changes and no luck. I've got
Not sure where to look now. Any ideas as to what I could try next? Update: Doing what hieucoi96 suggests above still works though. Changing podfile like so makes it so that SkData.h is found. This isn't sustainable though ...
|
Did you test with the changes from the PR in #1484? Did you run pod install after applying the changes? Just curious since those changes should be key to fix monorepo and use_frameworks-issues without any additional hacks. |
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?)
Can confirm that updating to version 0.1.183 fixes this in my repo 🎊 Thanks for all the help! |
Awesome, @trymbill - appreciate the feedback and test!!!! :) :) |
Adding use_frameworks! :linkage => :static to my podlike (required for RN Firebase) and I get a failed build on skia due to missing headers?
.../node_modules/@shopify/react-native-skia/cpp/skia/include/core/SkStream.h:11:10: 'include/core/SkData.h' file not found
The text was updated successfully, but these errors were encountered: