Please provide the following:
SDK Version: 33.0.0
Platforms(Android/iOS/web/all): iOS
I am getting an error mentioning that “undefined is not an object (evaluating ‘Expo.Constants.appOwnership’)”. This error is coming when I am running an expo and test app on my device. I have attached the picture of the error I am getting. I appreciate for the help. Thank you!
wodin
October 2, 2019, 4:43am
#2
Hi. It looks like you probably upgraded from an SDK version lower than 33 to SDK 33. In SDK 33 a lot of the imports need to change.
Please see the following:
Several of Expo’s libraries need to be imported differently in SDK 33 and later compared to how it was done in SDK 32.
e.g. for SVG, instead of this:
import { Svg } from 'expo';
...
<Svg ...>
<Svg.Circle ... />
</Svg>
do:
import Svg, { Circle } from 'react-native-svg';
...
<Svg ...>
<Circle ... />
</Svg>
Check the documentation for the other things you’re importing to see if they have changed too.
EDIT:
One way to help with this is to run:
npx expo-codemod sdk33-imports
You may also…
You can check the documentation for each one if you still have trouble after trying the codemod.
For Constants the documentation says:
import Constants from 'expo-constants';
@wodin Yes I have updated SDK from 32 to 33. I will try the mentioned solution. Thank you for the help.
system
closed
November 1, 2019, 3:55pm
#4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.