You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After turning on new archtitecture I am not able to render anything with Skia on iOS simulator
Old architecture and physical device:
New architecture:
Version
1.3.13
Steps to reproduce
Install latest version of React Native 0.75.3
Turn on new arch and build it on simulator and physical device
Simulator version does not render anything while physical device works
Snack, code example, screenshot, or link to a repository
import{colors}from'@kreddy-frontend/shared-ui';import{Canvas,Path,Skia,Text,useFont}from'@shopify/react-native-skia';import{useEffect}from'react';import{cancelAnimation,useSharedValue,withTiming,}from'react-native-reanimated';interfaceProps{data: number;radius?: number;strokeWidth?: number;strokeColor?: string;background?: string;duration?: number;}exportconstCircularGraphSkia=({
data =90,
radius =24,
strokeWidth =3.5,
strokeColor =colors.black_10,
background =colors.black_60,
duration =1000,}: Props)=>{// it's ok to use require here because the font is a static asset// eslint-disable-next-line @typescript-eslint/no-var-requiresconstfont=useFont(require('../assets/fonts/ReadexPro-Regular.ttf'),12);constend=useSharedValue(0);useEffect(()=>{end.value=withTiming(data/100,{ duration });return()=>{cancelAnimation(end);};// eslint-disable-next-line react-hooks/exhaustive-deps},[data]);constinnerRadius=radius-strokeWidth/2;constpath=Skia.Path.Make();path.addCircle(radius,radius,innerRadius);if(!font){returnnull;}consttext=`${Math.trunc(data)}%`;constfontSize=font?.measureText(text);consttextX=radius-fontSize.width/2;return(<Canvasstyle={{width: radius*2,height: radius*2}}><Pathpath={path}style={'stroke'}color={background}start={0}end={1}strokeWidth={strokeWidth}strokeJoin="round"strokeCap="round"/><Pathpath={path}style={'stroke'}color={strokeColor}start={0}end={end}strokeWidth={strokeWidth}strokeJoin="round"strokeCap="round"origin={{x: radius,y: radius}}// Rotate the circle so that the progress starts from the PI/2 positiontransform={[{rotate: -Math.PI/2}]}/><Textx={textX}y={radius+fontSize.height/2}color={colors.black_10}text={text}font={font}origin={{x: radius,y: radius}}/></Canvas>);};
The text was updated successfully, but these errors were encountered:
Description
After turning on new archtitecture I am not able to render anything with Skia on iOS simulator
Old architecture and physical device:
New architecture:
Version
1.3.13
Steps to reproduce
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: