New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata found but symbol not available at runtime #1061
Comments
The reason that these functions are missing at runtime is that the linker by default strips any unused C++ symbols. Since you call the functions from JS, the compiler and linker cannot detect that they are actually needed and remove them from the final executable. We've planned to add support for specifying an exported symbols file in NativeScript plugins, but currently, there isn't such out of the box. You may try to add an ** UPDATE ** You will most probably need to specify |
Thanks for response. I tried to follow your instructions like this:
then included that files inside
Now I am getting long erros:
Am I missing anything? |
The exported symbols file should comprise of just a symbol name on each line. If you want to create it automatically from all symbols, you'll have to extract only the symbol names (3-rd column). E.g. |
Thanks for quick response. I just tried your solution but I am getting long errors again. Please check the |
It seems that more filtering will be needed. From
I suggest that you try to only get the public symbols from the TEXT section of the binary: |
Thanks but still getting errors:
|
Well, it seems that this isn't going to lead us anywhere... I would suggest that initially you find and add only the functions that you know you will call from JavaScript. You can find their mangled names in the list and include only them in the file with exported symbols. The linker will automatically leave any other symbols that may be needed by them. |
Thanks @mbektchiev . I am doing so now. This is solving my problem temporary :) because I don't need all functions. |
If you really want to keep everything you may continue with the other approach by manually removing all symbols which are reported as unavailable or hidden by the linker. It might work out in the end. |
@mbektchiev This methods are working after removing error methods. Have |
@jibon57 I'm glad you managed to make it work! Closing this issue as after the implementation of NativeScript/nativescript-cli#4157, plugins will be able to define their own lists of exported symbols and the workaround to manually specify the options and lists in applications will no longer be required. |
Hey guys, my plugin nativescript-bottom-navigation stop working in NS6. I'm getting this error any ideas? |
Hey @henrychavez, thank you for the heads up. We'll investigate what is causing the issue and update you when we have more information. |
Thanks @mbektchiev |
I have a clue now, but still looking for a solution. It turns out that the issue is caused by both tns-core-modules and nativescript-bottom-navigation using the Even Xcode complains about this, but I initially ignored these warnings:
|
@henrychavez We will release a new version of tns-core-modules (probably early next week, today we intend to release v6.0.2 which won't contain the fix). It will ship with a Podfile instead of the pre-built .framework bundles. The reason that we had included the binaries in the first place was to optimize build times, but it turns out that we've missed the fact that this approach can lead to incompatibilities similar to the one with nativescript-bottom-navigation. I'm sorry for the inconvenience this has caused so far. |
Thanks @mbektchiev, My plugin will be part of the official Nativescript-material-components and I was a little worried that the implementation for iOS was broken 😅 Thanks again for your help, |
Hi @henrychavez, I'm getting the error too so question is should we still use the official Nativescript-material-components of which nativescript-bottom-navigation is a part? |
Hi @sidthesloth, the plugin isn't merged yet, I'm waiting the issue to be fixed before releasing the plugin inside the |
@mbektchiev I have the same problem related to nativescript-bottom-navigation. We need a fix for this. |
Can you please state exactly what is your problem? The causes for |
Upgrading tns-core-modules from 6.1.1 to 6.1.2 solved the problem. |
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
I am trying to implement a custom plugin for NativeScript using
libsodium
(https://github.com/jedisct1/libsodium). I have downloaded source files & complied to generatelibsodium.a
& header files. After that I put in my plugin following "https://docs.nativescript.org/plugins/plugin-reference". It's generating typescript definition correctly but when I am trying to use in demo app like this:console.dir(crypto_aead_aes256gcm_abytes())
But getting errors like this:
Architectures:
In where I am doing mistake? Please give me suggestions.
To Reproduce
Download latest release from here: https://github.com/jedisct1/libsodium/releases or clone the git repo. It has supplied a building script under
dist-build
namedios.sh
to build static library for iOS.The text was updated successfully, but these errors were encountered: