NativeScript / ios-jsc

NativeScript for iOS using JavaScriptCore
http://docs.nativescript.org/runtimes/ios
Apache License 2.0
298 stars 59 forks source link

Metadata for "GoogleMobileAds.kGADAdSizeBanner" found but symbol not available at runtime. #734

Open ignaciolarranaga opened 7 years ago

ignaciolarranaga commented 7 years ago

I have an issue similar to #543 but with Admob. The plugin owner already added instructions to preserve the symbols (https://github.com/EddyVerbruggen/nativescript-admob/blob/master/platforms/ios/build.xcconfig). But unfortunately it still does not have the symbols after being published.

I get this error on runtime after download the app from the store: "There was an error creating the AdMob banner: ReferenceError: Metadata for \"GoogleMobileAds.kGADAdSizeBanner\" found but symbol not available at runtime."

I (and other folks @gla5001) already tried workarounds like try to replace the constants by the actual values and things like that without success.

I have this issue https://github.com/EddyVerbruggen/nativescript-admob/issues/19 on the plugin but it is actually a problem of the runtime I believe.

Some workaround I can use ?

EddyVerbruggen commented 7 years ago

The workaround in plugin version 1.3.1 replaces the symbols by its runtime equivalents, so AdMob is working fine now. However, I'd love to learn why exposing the symbols didn't work. This is what I had done previously.

ivanbuhov commented 7 years ago

It seems that (as @jasssonpet has noticed here) even after adding the -exported_symbol flag it is still not guaranteed that the symbol will get linked. Unfortunately, I can't find an official documentation explaining the factors that may influence the behaviour of -exported_symbol flag. @EddyVerbruggen As far as I understand the kGADAdSizeBanner symbol (and its friends) was being successfully exported in the past but at some point in time the exporting stopped working. Do we know when this happened?

P.S.: @ignaciolarranaga What Xcode version do you use to build your app?

EddyVerbruggen commented 7 years ago

@ivanbuhov I have no hard evidence it ever worked in the past as I personally only used "Interstitions" which didn't have the issue. And I have only tested aTestFlight build with a banner yesterday to tackle this issue.

I know for sure the symbol export syntax was correct as that's observable for debug builds as well, but unless someone shows a released app with a banner I can't tell for sure release builds have ever worked correctly.

ignaciolarranaga commented 7 years ago

@ivanbuhov my xcode is 8.2.1 (8C1002)

ginev commented 6 years ago

@ignaciolarranaga - did the approach used here not help?: https://github.com/NativeScript/ios-runtime/issues/543#issuecomment-206575319