I spent my day trying to fix my problem, I tried every solution I found in other SO posts but unfortunately I can't figure out how to solve my problem.
I try to integrate TouchID inside my react-native project. I downloaded a npm package called "react-native-touch-id" (sounds perfects !). I followed installation guide and I manually linked library to my project.
But when I try to run application I get the following error :
I tried to clean my project :
In xCode I even clean the build folder.
About my versions :
Here's my Podfile :
def available_pods
pod 'TouchID', :path => "../node_modules/react-native-touch-id"
end
target 'App' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
available_pods
end
I added the .xcodeproj of react-native-touch-id package inside my project's libraries directory and in Build Phases I linked it.
But I still getting the same error again and again ... I don't understand why ... If someone have an idea some help would be really appreciated :)
Open the package. json file and under name — change react-native-native-toast-library to react-native-native-toast-library-XXXX, where XXXX is your unique part. If you don't have an npm account create it [here]. Open the terminal in the project directory, and type npm adduser and then your username details.
React Native is an open-source UI software framework created by Meta Platforms, Inc. It is used to develop applications for Android, Android TV, iOS, macOS, tvOS, Web, Windows and UWP by enabling developers to use the React framework along with native platform capabilities.
It appeared the problem was the Podfile. It seems that Podfile use its own Podspec which caused troubles. So I simply delete the TouchId pod declaration from my Podfile, clean and re-install my pods.
Then, I manually linked the library to my xcode workspace. To do that, under your project name, Right Click on Libraries directory => Add files to "your project name" => Add the xcodeproj of the npm's package located inside your node_modules directory.
After that, in your project Build Phases under the Link Binary with Libraries you have to add the npm's package static library (example libTouchID.a in my case).
To be sure you can clean your project and try to rebuild, it should work now.
For information, I kept all of my softwares version I mentionned above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With