Cannot read property appVersion of undefined - iOSSee original GitHub issue
It works perfect in Android version, but in iOS version, I’m receiving this error.
I tried to use version 0.3.0 (Currently using 0.2.0) but I got some errors trying to install via yarn, it throws an error about access in some git files.
I already try
react-native link but nothing happens.
- Created 5 years ago
Top GitHub Comments
I installed version 0.3.3 and got this error. Works fine on Android.
console.log(VersionNumber.appVersion); console.log(VersionNumber.buildVersion); console.log(VersionNumber.bundleIdentifier);
all above returns undefined on iOS, but correct values on Android. Do I have to manually link the library or just go with the pod file installation? I have only tried this in the emulator and not on a real device.
I had the same. Fixed now: Did you make sure
- you used
--saveso it’s in your package.json
- when you run
react-native linkyou see in the output it is linked
- after you’ve run react native link made sure you build the app again (i.e. react-native run-ios) instead of just (hot)reloading? -> and to be sure clean the project in xcode before building again