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.

Getting 'undefined' when running on iOS

See original GitHub issue

Returns undefined when trying to print out version number on iOS device:

console.log('versionNumber ', VersionNumber) {appVersion: undefined, buildVersion: undefined, bundleIdentifier: undefined}

Tested on iOS 11.4 iPhone 8 (simulator and device)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:12

github_iconTop GitHub Comments

11reactions
jniaccommented, Jul 10, 2018

@karaoak +1

undefined appears when the pod is not installed

via CLI :

$ yarn add react-native-version-number
...
$ react-native link
... # some logs eg: rnpm-install info Linking react-native-version-number ios dependency

then install pods

$ cd ios
$ pod install
... # some logs eg: Installing react-native-version-number (0.3.4)

then re-build the app from XCode

4reactions
karaoakcommented, Jul 9, 2018

Please follow step 1 and 2 https://facebook.github.io/react-native/docs/linking-libraries-ios.html#manual-linking to link the iOS react-native-version-number native iOS lib by hand.

At step 1 drag the ./node_modules/react-native-version-number/ios/RNVersionNumber.xcodeproj to your iOS project in XCode as per manual.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Undefined Symbols erros while trying build and run in ...
Getting Undefined Symbols erros while trying build and run in iOS Device · Go to '…' · Click on '…' · Scroll down...
Read more >
Undefined symbols for architecture arm64 - ios - Stack Overflow
I fixed this by deleting arm64 from the Valid Architectures list and then setting Build Active Architecture Only to NO. It seems to...
Read more >
XCTestCase - Undefined symbol | Apple Developer Forums
Hello, I began writing tests for a SwiftUI project I've been working on, but was getting some "Undefined symbol" error when attempting to...
Read more >
undefined - JavaScript - MDN Web Docs - Mozilla
The global undefined property represents the primitive value undefined. It is one of JavaScript's primitive types.
Read more >
TypeError: Cannot read property 'devicetypes' of undefined #268
I'm getting the following message when running "ios-sim showdevicetypes": TypeError: Cannot read property 'devicetypes' of undefined at ...
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