Open gaithoben opened 3 years ago
Hi, I wonder you didn't create the module_map file for swift. Please check this: https://github.com/up9cloud/ios-libtdjson#use-it-as-module-ios-swift
Thank you so much for your reply.
Actually i did, and it works well when i use it directly in my react-native application.
But when i try to extract it on an npm module that i can easily install, Im stuck. I really dont know what am doing wrong.
/Users/bernardgaitho/tests/cJamboTest2/node_modules/react-native-tdx/ios/TdJsonClient.swift:10:8: error: no such module 'libtdjson' import libtdjson
Well, I guess it's the same thing. after you installed the pod, you need to create the module file and configure it for swift. I don't think "create-react-native-module" will do it for you.
Did you check the pod folder which create-react-native-module
installed for your project?
I meant the create-react-native-module
is actually doing installing pod and wrapping. You have to check the pod folder they installed for you.
In my example project, https://github.com/gaithoben/react-native-tdx.git, i have adjusted the .podpecs file so that the library is installed in the projects 'ios/Pods/libtdjson' folder.
I guess configuring at the module is whats giving me a headache.
Your help will be highly appreciated.
In my example project, https://github.com/gaithoben/react-native-tdx.git, i have adjusted the .podpecs file so that the library is installed in the projects 'ios/Pods/libtdjson' folder.
I guess configuring at the module is whats giving me a headache.
I think there are 2 ways to solve this:
-l"tdjson"
-fmodule-map-file="${PODS_ROOT}/Headers/Public/libtdjson/libtdjson.modulemap"
didn't work as expectation. (have to check the .xcconfig)Thank you for your reply. Let me test your suggestion and i will keep trying and researching...
I have never built a native project in native swift or objective c, i guess thats the reason why i find it difficult. It was not difficult to make it work in android. But to be honest this is not easy for me in iOS, if you can spare sometime and make a working example package for react-native, i will be ready to facilitate that. My email is gaithoben \at \gmail .com.
Thanks in advance.
Thank you so much for the good job of compiling the library making it very easy to use in a project.
I have struggling with an issue the last three days.
I am building react-native module to consume in a react-native project using https://github.com/brodybits/create-react-native-module
Am not sure if am placing the "include" directory in the right place.
am getting the error when i import lbtdjson in a .swift file.
: error: no such module 'libtdjson'
Your help will be highly appreciated.