I am trying to open viber app from my react-native app but its not working. I am getting below error.
Error: Unable to open URL: viber://contact?number=%2Bxxxxxxxxxxxx.
Add viber to LSApplicationQueriesSchemes in your Info.plist.
I have listed viber in my Info.plist
<key>LSApplicationQueriesSchemes</key>
<string>viber://</string>
This is my code trying to open viber.
Linking
.canOpenURL('viber://contact?number=%2Bxxxxxxxx')
.then(res => {
console.log("Viber response->",res)
if(res) {
Linking.openURL('viber://contact?number=%2Bxxxxxxxxx')
}
})
.catch(err => {
console.log("Viber Error:", err)
})