NativeScript/nativescript-cli

Support for Exported Symbols File setting

tdermendjiev opened this issue · 5 comments

Is your feature request related to a problem? Please describe.
In order to provide inline (C) functions support we need exported symbols .txt file so the functions are accessible.

Describe the solution you'd like
The path to the .txt file with the exported symbols should be added to the "Exported Symbols File" setting in the .xcodeproj.

The idea is to have exportedSymbols.txt file in <path to App_Resources>/iOS and CLI to pick it up when building the project.
The same should be applied for plugins as well. Merging the exportedSymbols.txt files is just a concatenation of the files' contents.
The logic should be similar to the one used for Podfiles merge - we need to produce a merged file in platforms/ios and refer it in xcodeproj (or in plugins-<config>.xcconfig file) from there.
The properties that need to be set are:

EXPORTED_SYMBOLS_FILE = <path-to-txt>
STRIPFLAGS=`$(inherited) -s <path-to-txt>`

How do we fix the found but symbol not available at runtime error in the meantime?

  • I need access to kGADAdLoaderAdTypeUnifiedNative from the GoogleMobileAds SDK.

Hi @mudlabs,

I was able to access the kGADAdLoaderAdTypeUnifiedNative value without any additional symbols file. I just installed the nativescript-admob and added console.log(kGADAdLoaderAdTypeUnifiedNative); which successfully returned 6.

However, if you really need a symbols file this feature gets implemented, just follow this comment. You could also take a look at this issue for more details about the symbols file syntax.

I believe I'm hitting the issue this feature is intended to address. Namely, after including the Nativescript-google-maps-utils plugin, when I try to access the iOS methods such as GMSGeometryDistance I get there exception,

ReferenceError: Metadata for "GoogleMaps.GMSGeometryDistance" found but symbol not available at runtime.

(See associated SO post.)

I gather I need to list the symbols I need in a file and then specify that file in the "Exported Symbols File" build option in Xcode. But, how do I determine what the the specific contents of that file should be?

I was able to resolve my above-mentioned issue by creating my own exportedSymbols.txt file and adding it to the Xcode project. It would be great if this feature request was implemented. See my SO post for details on the fix.