如何通过反应本机资产文件路径到本机模块ios/android
我在我的React Antive Assets文件夹中有一些静态文件,我想将这些文件传递给本机模块Android/ios,是否有任何方法可以将文件路径传递给本机模块
实际上是我使用React> React-native-- FS
记录目录及其给出的绝对文件路径如下
/users/jos/library/developer/coreSimulator/devices/b186bc56-78dc-496b-83d2-3095bcb8be08/data/co ntainers/data/application/162A2FFD-2B19-4946-8E92-AFE167633AEB/Library/Files/Files/Music/prompter.wav
我将这条路径传递到本机模块,而我的本地模块正常工作。但是我的资产文件夹中有一些静态文件,我正在发送这些路径,例如../../资产/demo_songs/music.wav
,然后我的本机模块不起作用。请帮助我如何将静态资产文件路径发送到本机模块
i have some static files in my react native assets folder, i want to pass those files to native modules Android/iOS, is there any way to pass file paths to native modules
Actually i downloading files from s3 using react-native-fs
to document directory and its giving absolute file path like below
/Users/jos/Library/Developer/CoreSimulator/Devices/B186BC56-78DC-496B-83D2-3095BCB8BE08/data/Containers/Data/Application/162A2FFD-2B19-4946-8E92-AFE167633AEB/Library/files/Music/prompter.wav
i'm passing this path to Native Modules and my native modules working fine. But i have some static files in my assets folder i'm sending those paths like ../../assets/demo_songs/music.wav
then my native modules not working. Please help me how to send static assets file paths to native modules
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论