Integrate react-native-skia into managed workflow
complete
George Khromchenko
William Candillon presented a very cool react native Skia integration.
This is amazing drawing library, and it would be nice if it will be in expo managed workflow.
Brent Vatne
complete
https://blog.expo.dev/expo-sdk-46-c2a1655f63f7
E
Enrico Pozzi
this would be very nice
Wodin
Enrico Pozzi: It's in Expo SDK 46.
The beta is out already:
The final version is expected any day now.
Kim Brandwijk
in progress
react-native-skia
will be included in Expo Go in the next SDK release!Zhome Derzart
I concur, this should be included in the managed workflow as this provides many 2d graphics capabilities like masks, backdrop filters, shadows, etc. that no other library could coherently do.
Wodin
Zhome Derzart: According to the comments below, it is. As long as you build with EAS Build. It won't work in Expo Go, but you can build a dev client to replace Expo Go.
Robert Kirk
Wodin: When I build with eas build it says "ReferenceError: Can't find variable: SkiaApi" Not sure if I am doing something wrong or if it is just broken now.
Wodin
Robert Kirk: What platform was that? I just built successfully for Android. Also do you mean you get that error during the build, or when you try to run the app?
Robert Kirk
Wodin: It was on ios. The build completes successfully but the app throws the error as soon as it loads. Thanks for your help
Wodin
Robert Kirk: hmmm... I built a dev client for the iOS Simulator and it works for me.
s
sadaif
Wodin: can you please provide a github repo. bcause i am trying it on expo and it is not working. i am searching from many days. I am also using dev - client
s
sadaif
Wodin
s
sadaif
Wodin: Thanks for your response but unfortunately i am facing the same error :( i have used this repo .
s
sadaif
Wodin:
Wodin
sadaif: Not sure what to tell you, except this will not work in Expo Go and will not work if you build with
expo build
. You'll have to build with eas build
. If you want something like Expo Go, you'll have to build a custom dev client and use that instead.The error you're getting implies that the native code is missing from the app. This would happen if you're trying to use Expo Go, or if you built with
expo build
or if you forgot to rebuild the dev client after installing @shopify/react-native-skia
Gowtham
Skia now works fine on android in Expo v45
Brent Vatne
you can use it with expo-dev-client. i sent a pr clarifying what is needed for that: https://github.com/Shopify/react-native-skia/pull/39
it does not yet work for android though because react-native-skia only supports react-native@>=0.66