react-native-simple-biometrics icon indicating copy to clipboard operation
react-native-simple-biometrics copied to clipboard

[iOS] - RNSimpleBiometricsSpec.h file not found

Open ilteoood opened this issue 1 year ago • 11 comments

On android the library is working fine, while on iOS I have the following error: image

Even running the pod install command multiple times doesn't solve it.

I'm using react native 0.76

ilteoood avatar Jan 07 '25 09:01 ilteoood

I am also facing same issue

ateeq4112 avatar Jan 07 '25 10:01 ateeq4112

Any update to this?

alefebspp avatar Jan 21 '25 12:01 alefebspp

Facing same issue any update on this?

Kadir-flipcause avatar Jan 22 '25 13:01 Kadir-flipcause

@akul-smallcase please help us on this

Kadir-flipcause avatar Jan 22 '25 13:01 Kadir-flipcause

I have fixed the issue and created a new package. You can directly use the package. https://www.npmjs.com/package/react-native-easy-biometrics

tugayoktayokay avatar Jan 30 '25 15:01 tugayoktayokay

I have raied one PR for this issue. If the owner of this library accepts, it will work. till then a patch would work. below is the patch for the solution. go to the folder react-native-simple-biometrics in the node_modules of yours and do the changes in the lines where code is modified as per below patch file. After that you can create a patch for this library using patch package and use it.

diff --git a/node_modules/react-native-simple-biometrics/.DS_Store b/node_modules/react-native-simple-biometrics/.DS_Store
new file mode 100644
index 0000000..36d39ae
Binary files /dev/null and b/node_modules/react-native-simple-biometrics/.DS_Store differ
diff --git a/node_modules/react-native-simple-biometrics/ios/.DS_Store b/node_modules/react-native-simple-biometrics/ios/.DS_Store
new file mode 100644
index 0000000..7a1d704
Binary files /dev/null and b/node_modules/react-native-simple-biometrics/ios/.DS_Store differ
diff --git a/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.h b/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.h
new file mode 100644
index 0000000..8702f2c
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#ifdef RCT_NEW_ARCH_ENABLED
+#import "RCTTurboModule.h"
+
+namespace facebook
+{
+    namespace react
+    {
+
+        class JSI_EXPORT NativeSimpleBiometricsSpecJSI : public ObjCTurboModule
+        {
+        public:
+            explicit NativeSimpleBiometricsSpecJSI(const ObjCTurboModule::InitParams &params);
+        };
+
+    } // namespace react
+} // namespace facebook
+
+#endif /* RCT_NEW_ARCH_ENABLED */
\ No newline at end of file
diff --git a/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.mm b/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.mm
new file mode 100644
index 0000000..f43e013
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.mm
@@ -0,0 +1,34 @@
+#ifdef RCT_NEW_ARCH_ENABLED
+#import "RNSimpleBiometricsSpec.h"
+
+namespace facebook {
+namespace react {
+
+static facebook::jsi::Value __hostFunction_NativeSimpleBiometricsSpecJSI_canAuthenticate(
+    facebook::jsi::Runtime &rt,
+    TurboModule &turboModule,
+    const facebook::jsi::Value *args,
+    size_t count)
+{
+    return facebook::jsi::Value::undefined();
+}
+
+static facebook::jsi::Value __hostFunction_NativeSimpleBiometricsSpecJSI_requestBioAuth(
+    facebook::jsi::Runtime &rt,
+    TurboModule &turboModule,
+    const facebook::jsi::Value *args,
+    size_t count)
+{
+    return facebook::jsi::Value::undefined();
+}
+
+NativeSimpleBiometricsSpecJSI::NativeSimpleBiometricsSpecJSI(const ObjCTurboModule::InitParams &params)
+    : ObjCTurboModule(params) {
+
+    methodMap_["canAuthenticate"] = MethodMetadata{1, __hostFunction_NativeSimpleBiometricsSpecJSI_canAuthenticate};
+    methodMap_["requestBioAuth"] = MethodMetadata{3, __hostFunction_NativeSimpleBiometricsSpecJSI_requestBioAuth};
+}
+
+} // namespace react
+} // namespace facebook
+#endif /* RCT_NEW_ARCH_ENABLED */ 
\ No newline at end of file
diff --git a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>
diff --git a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>
diff --git a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcuserdata/mahesh.a.xcuserdatad/UserInterfaceState.xcuserstate b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcuserdata/mahesh.a.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..cafbf5e
Binary files /dev/null and b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcuserdata/mahesh.a.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/xcuserdata/mahesh.a.xcuserdatad/xcschemes/xcschememanagement.plist b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/xcuserdata/mahesh.a.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..dedc032
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/xcuserdata/mahesh.a.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>SimpleBiometrics.xcscheme_^#shared#^_</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+</dict>
+</plist>

mahesh-agrawal-616 avatar Feb 06 '25 11:02 mahesh-agrawal-616

Having the same issue, any updates on this ?

rick427 avatar Feb 11 '25 10:02 rick427

I have raied one PR for this issue. If the owner of this library accepts, it will work. till then a patch would work. below is the patch for the solution. create a file in your patches folder named react-native-simple-biometrics+1.5.3.patch and paste below.

diff --git a/node_modules/react-native-simple-biometrics/.DS_Store b/node_modules/react-native-simple-biometrics/.DS_Store
new file mode 100644
index 0000000..36d39ae
Binary files /dev/null and b/node_modules/react-native-simple-biometrics/.DS_Store differ
diff --git a/node_modules/react-native-simple-biometrics/ios/.DS_Store b/node_modules/react-native-simple-biometrics/ios/.DS_Store
new file mode 100644
index 0000000..7a1d704
Binary files /dev/null and b/node_modules/react-native-simple-biometrics/ios/.DS_Store differ
diff --git a/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.h b/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.h
new file mode 100644
index 0000000..8702f2c
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#ifdef RCT_NEW_ARCH_ENABLED
+#import "RCTTurboModule.h"
+
+namespace facebook
+{
+    namespace react
+    {
+
+        class JSI_EXPORT NativeSimpleBiometricsSpecJSI : public ObjCTurboModule
+        {
+        public:
+            explicit NativeSimpleBiometricsSpecJSI(const ObjCTurboModule::InitParams &params);
+        };
+
+    } // namespace react
+} // namespace facebook
+
+#endif /* RCT_NEW_ARCH_ENABLED */
\ No newline at end of file
diff --git a/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.mm b/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.mm
new file mode 100644
index 0000000..f43e013
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/RNSimpleBiometricsSpec.mm
@@ -0,0 +1,34 @@
+#ifdef RCT_NEW_ARCH_ENABLED
+#import "RNSimpleBiometricsSpec.h"
+
+namespace facebook {
+namespace react {
+
+static facebook::jsi::Value __hostFunction_NativeSimpleBiometricsSpecJSI_canAuthenticate(
+    facebook::jsi::Runtime &rt,
+    TurboModule &turboModule,
+    const facebook::jsi::Value *args,
+    size_t count)
+{
+    return facebook::jsi::Value::undefined();
+}
+
+static facebook::jsi::Value __hostFunction_NativeSimpleBiometricsSpecJSI_requestBioAuth(
+    facebook::jsi::Runtime &rt,
+    TurboModule &turboModule,
+    const facebook::jsi::Value *args,
+    size_t count)
+{
+    return facebook::jsi::Value::undefined();
+}
+
+NativeSimpleBiometricsSpecJSI::NativeSimpleBiometricsSpecJSI(const ObjCTurboModule::InitParams &params)
+    : ObjCTurboModule(params) {
+
+    methodMap_["canAuthenticate"] = MethodMetadata{1, __hostFunction_NativeSimpleBiometricsSpecJSI_canAuthenticate};
+    methodMap_["requestBioAuth"] = MethodMetadata{3, __hostFunction_NativeSimpleBiometricsSpecJSI_requestBioAuth};
+}
+
+} // namespace react
+} // namespace facebook
+#endif /* RCT_NEW_ARCH_ENABLED */ 
\ No newline at end of file
diff --git a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>
diff --git a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>
diff --git a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcuserdata/mahesh.a.xcuserdatad/UserInterfaceState.xcuserstate b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcuserdata/mahesh.a.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..cafbf5e
Binary files /dev/null and b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/project.xcworkspace/xcuserdata/mahesh.a.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/xcuserdata/mahesh.a.xcuserdatad/xcschemes/xcschememanagement.plist b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/xcuserdata/mahesh.a.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..dedc032
--- /dev/null
+++ b/node_modules/react-native-simple-biometrics/ios/SimpleBiometrics.xcodeproj/xcuserdata/mahesh.a.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>SimpleBiometrics.xcscheme_^#shared#^_</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+</dict>
+</plist>

This patch contains local data which it seems shouldn't be there. BTW, @mahesh-agrawal-616 your PR doesn't work for me either

berdyshev avatar Feb 13 '25 10:02 berdyshev

I have fixed the issue and created a new package. You can directly use the package. https://www.npmjs.com/package/react-native-easy-biometrics

Thanks. This package works.

BTW, @tugayoktayokay can you create a PR for that package instead of creating a new package?

berdyshev avatar Feb 13 '25 11:02 berdyshev

@berdyshev there might be local data because i copied it directly from my patch file but if you have used patch package before, you will be able to understand what changes have been done. If you can do that, you can make use of it. Its working for me though. just FYI.

mahesh-agrawal-616 avatar Feb 28 '25 06:02 mahesh-agrawal-616

I can confirm this works.

francois-pasquier avatar May 21 '25 08:05 francois-pasquier

@LonelyCpp please pay attention to this issue. It is still relevant if the new arch is enabled.

mizinin avatar Oct 03 '25 16:10 mizinin