Skip to content

How to install versión 0.6.0 #450

Closed Answered by Valentin-Rault
dax99993 asked this question in Q&A
Discussion options

You must be logged in to vote

Did you add the react-native-audio-api plugin in your app.json?
The error is most likely because you have something like this
plugins: ["react-native-audio-api]

If you look at the withAudioAPi.ts file you will see that this is calling the function with the second argument being undefined
Then trying to destructure the object here will throw this error

const withAudioAPI = (config, {
  iosBackgroundMode = true,
  androidForegroundService = true,
  androidFSPermissions = [],
  androidFSTypes = []
}) => {

The fix:
do something like this in your app.json

plugins: [
["react-native-audio-api", 
{"iosBackgroundMode": true}
]

You can specify the other values as well if you need to. Hope this helps

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@dax99993
Comment options

@Valentin-Rault
Comment options

Answer selected by maciejmakowski2003
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants