question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not working on IOS: Cannot read property 'IsAndroid' of undefined

See original GitHub issue

The error is regarding the following line of code in sound.js :

var RNSound = require('react-native').NativeModules.RNSound;
var IsAndroid = RNSound.IsAndroid;

I have followed the instructions exactly as outlined for IOS, so I have no idea why I am getting this error. This module works perfectly on Android.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:17
  • Comments:50 (4 by maintainers)

github_iconTop GitHub Comments

30reactions
DeanKamalicommented, Mar 6, 2017

none of the suggested solutions worked for me, running react-native link works, however it doesn’t seems to do anything, I had this error as well, and I was able to resolve it by manually adding RNSound.xcodeproj to Libraries folder and drag and drop libRNSound.a to Link Binary with Libraries of my project.

19reactions
Rocondacommented, Jun 2, 2016

I had this error as well when adding the dependencies but forgetting to recompile. After a new build it worked like a charm! cc @Frosty92

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'IsAndroid' of undefined #215 - GitHub
I have this problem running test cases from Jest. Works fine in emulators and hardware for both Android and iOS. 17
Read more >
react native sound Not working on Windows - Stack Overflow
javascript - react native sound Not working on Windows: Cannot read property 'IsAndroid' of undefined - Stack Overflow. Stack Overflow for Teams –...
Read more >
Developers - Cannot read property 'IsAndroid' of undefined -
On iOS, in fresh project generated by latest version of create-react-native-app : RNSound is not defined in NativeModules of react-native .
Read more >
[SSL Pinning Plugin] Error - Cannot read property 'apply' for ...
SSL Pinning Plugin Error - Cannot read property 'apply' for undefined on Android. ... It working fine on iOS device which shows configuration...
Read more >
[Solved]-React Native Sound Not Working (Remote URL)
Coding example for the question React Native Sound Not Working (Remote ... sound Not working on Windows: Cannot read property 'IsAndroid' of undefined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found