[iOS] - RNSimpleBiometricsSpec.h file not found
On android the library is working fine, while on iOS I have the following error:
Even running the pod install command multiple times doesn't solve it.
I'm using react native 0.76
I am also facing same issue
Any update to this?
Facing same issue any update on this?
@akul-smallcase please help us on this
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
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 ¶ms);
+ };
+
+ } // 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 ¶ms)
+ : 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>
Having the same issue, any updates on this ?
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 ¶ms); + }; + + } // 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 ¶ms) + : 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
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 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.
I can confirm this works.
@LonelyCpp please pay attention to this issue. It is still relevant if the new arch is enabled.