Closed mikelgarciaurbina closed 10 months ago
This sounds like the library's native code isn't properly linked. Are you trying to run this in Expo Go? This won't work. This library contains native iOS code that isn't bundled in Expo Go. You'll therefore need to build the app natively. For development, that means you'll need to build a development client using Expo EAS. In production, you can also use Expo EAS to create app builds.
Otherwise, if it's not Expo Go, please let me know how exactly you run the app after importing the library. Because from those three steps you described, I'm unable to reproduce this (when I build a development client using EAS afterwards and use that to run the app).
I am not creating the build locally. I will check the link to see if I can make it works, thanks.
I just run npm start
and open in the iOS simulator.
Yep, if you simply run npm start
Expo will default to running Expo Go on the simulator. Expo Go doesn't include the native code required for running CloudStorage, so it won't work. Refer to the Expo documentation I linked above. You simply build the app using one command, install it on the simulator and will then be able to use CloudStorage (and any other libraries using native code not included in Expo Go).
Also make sure that react-native-cloud-storage
is included in the plugins
array in your app.json
before building the app / development client. When you install the library using npx expo install [...]
, this should be done automatically for you, but better be safe.
Otherwise, the CloudStorage documentation also contains all of this information. I'll therefore close this for now, but let me know if you need further help.
Describe the bug As soon as I start importing the
react-native-cloud-storage
the app crashedSteps to reproduce Steps to reproduce the behavior:
npx create-expo-app test-icloud
react-native-cloud-storage
withnpx expo install react-native-cloud-storage
react-native-cloud-storage
Expected behavior The import should work correctly
Screenshots
Environment: