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.

undefined is not an object.... = AdSupport.getAdvertisingId

See original GitHub issue

I am using this npm package: https://github.com/lwansbrough/react-native-google-analytics

And when

GATracking.getClientId(....

gets called it triggers this:

AdSupportIOS.getAdvertisingId(...

But it returns "undefined is not an object (evaluating ‘AdSupport.getAdvertsingId’)

Here is the stack trace: screen shot 2015-08-26 at 13 23 07

This problem is in the React code right ?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
scottgrubhubcommented, Aug 27, 2015

Disaacs, in Xcode did you go to Libraries->React.xcodeproj->React->Base then go to File->Add Files and add a reference to RCTAdSupport.h and RCTAdSupport.m? That’s what did the trick for me

0reactions
ghostcommented, Sep 4, 2015

@ide Thanks for that explanation.

I’d got stuck on this one because it seemed so strange to have to add the .h and .m files to React.xcodeproj but I should have realised that the correct solution was to follow the linking instructions at https://facebook.github.io/react-native/docs/linking-libraries-ios.html#content

Read more comments on GitHub >

github_iconTop Results From Across the Web

not able to get advertising id in android - Stack Overflow
I am using below code in activity's oncreate method. Info adInfo = null; try { adInfo = AdvertisingIdClient.getAdvertisingIdInfo(this); } ...
Read more >
Check Link Map file to get insight when Kids Category App ...
This post describes an additional check routine that can help you to get insight with Link Map file when Kids Category App rejected...
Read more >
react-native-electrode-bridge/index.android.42.bundle at master
react-native-electrode-bridge/android/electrode-reactnative-bridge/src/androidTest/assets/index.android.42.bundle.
Read more >
How to fix "undefined is not an object" error in iPhone
Hi, I'm getting this error (refer to the attached screenshot) while trying to run the app in iPhone simulator. In kony Visualizer preview...
Read more >
advertisingIdentifier | Apple Developer Documentation
For more information on getting the advertising identifier, see AdSupport. The advertising identifier returns either a unique UUID, or all zeros.
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