NEED A UPDATE
For working with new React-native and expo version we need an update because now dependencys are working for old versions.
Do you hava little more information for me maybe? What exactly is needed?
The peer dependencies of the library refer to older versions of react native and expo which generates problems when working with the new versions and new architecture.
The peer dependencies currently don't refer to any specific version but actually just to "*". So it shouldn't cause any problems.
Can you maybe hint me on how to reproduce it?
after updating my app to react native 0.76.2 my android build doesnt build any more. i get this error:
` Task :react-native-blob-util:generateCodegenArtifactsFromSchema FAILED
/Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js:478 .map(({name: propertyName, typeAnnotation}) => { ^
TypeError: Cannot read properties of undefined (reading 'map')
at /Users/tristanveskilt/WebstormProjects/cara-health-app/node_modules/react-native/node_modules/@react-native/codegen/lib/generators/modules/GenerateModuleJniCpp.js:478:16
at Array.map (
any idea what could be wrong?
Are you useing expor or anything other special? Which version of the library?
nope, no expo, vanilla react-native. Library version "react-native-blob-util": "^0.19.11",
Update: Got it working, issue on my side
This library works fine on the latest versions of react-native and Expo
The other block is the @config-plugins/react-native-blob-util if it was managed by this project and not tied to expo@51 it will help, but please make sure you still allow expo 51 so people are not forced to update if they don't need to. You can use "expo": "51 || 52" much like I did on https://github.com/revtel/react-native-nfc-manager/pull/758/files
@trajano jsut so I understand it correctly. The problems technically ist in https://www.npmjs.com/package/@config-plugins/react-native-blob-util ? ANd, probably, the expo version etc there?
So what you're asking me to do, is, adding the peer depedencies for expo so we don't need the plugin right?
@RonRadtke for my issue specifically yes. Though we can lock to the current version if we need to remain in Expo 51 since it works so far. However, if you update to support Expo 52 (which includes the config plugin).
Looking at what https://github.com/expo/config-plugins/blob/main/packages/react-native-blob-util/src/withReactNativeBlobUtil.ts it seems to add some permissions specific to Android. Then again looking at your README. I don't particularly see it matching
e.g. "android:name": "android.intent.action.DOWNLOAD_COMPLETE",
$: {
"android:name": "com.facebook.react.modules.blob.BlobProvider",
"android:authorities": "@string/blob_provider_authority",
"android:exported": "false",
},
Honesrtly my understanding of all that expo stuff is not good enough to judge what is going on int the config plugin. The DOWNLOAD_COMPLETE ident is used, when using the downloadmanager. If you ahve a working version that covers expo 52 and 51 I am willing to merge it, as long as it doesn't iimpact non expo users
I'm not sure if I can make one yet the main reason for using this library is react-native-pdf which doesn't seem to work on Expo 52 at all.
react-native-pdf does work with Expo 52 unless you have the new architecture turned on. You need to use a patch if you want to use react-native-pdf with the new architecture.
@griffinshuth yep I enabled new arch to see what happens. Also new arch is default with new Expo 52 template
@trajano this lib should work fine with the new arch.
But regardless, if anyone can provide a PR and test it accordingly I would be very grateful. Then I don'T have to dig trough all the expo stuff.
@RonRadtke I just need react-native-pdf to work with new arch as well. The reason for this lib for me was primarily for that module as Expo provides similar APIs already.
react-native-pdf does work with Expo 52 unless you have the new architecture turned on. You need to use a patch if you want to use react-native-pdf with the new architecture.
Hi @griffinshuth, do you have some information about this patch ? thanks