Skip to content
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

fix: error messages ios #5

Merged
merged 10 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions NATIVE_IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## Introduction

- [Let's go talk about colors](#lets-go-talk-about-colors-🧑‍🎨)
- [Enabling Camera](#enabling-camera-ios-only)
- [Contributing](#contributing)
- [License](#license)

Expand All @@ -22,6 +23,19 @@ Our SDK has support for some format of the hexadecimal colors and some colors na

<hr />

## Enabling Camera (iOS only)

If you want to enable the camera, you need to add the following instructions in your `Info.plist` file:

```plist
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) need access to your camera to take picture.</string>
```

> That's will be necessary to what iOS **works** correctly!

<hr />

## Contributing

See the [contributing guide](./CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,9 @@ export default function App() {

<hr/>

## Limitations and Features
## Limitations, Features or Camera Problems

See the [native implementation](./NATIVE_IMPLEMENTATION.md) to learn more about the limitations and features that will need improving in the CapfaceSdk.
See the [native implementation](./NATIVE_IMPLEMENTATION.md) to learn more about the limitations and features that will need improving in the `react-native-capface-sdk`.

<hr/>

Expand Down
12 changes: 4 additions & 8 deletions capitual-react-native-capface-sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,21 @@ Pod::Spec.new do |s|
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => "11.0" }
s.source = { :git => "https://github.com/capitual/react-native-capface.git", :tag => "#{s.version}" }

s.vendored_frameworks = "ios/Frameworks/FaceTecSDK.framework"
s.source_files = "ios/**/*.{h,m,mm,swift}"
s.requires_arc = true

# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)
else
s.dependency "React-Core"

s.ios.resource_bundles = {
'ReactNativeCapfaceSdk' => ['ios/SupportingFiles/*.xcassets']
}


# Don't install the dependencies when we run `pod install` in the old architecture.
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- boost (1.76.0)
- capitual-react-native-capface-sdk (0.1.0):
- capitual-react-native-capface-sdk (1.0.2):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- CocoaAsyncSocket (7.6.5)
Expand Down Expand Up @@ -666,7 +666,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: 57d2868c099736d80fcd648bf211b4431e51a558
capitual-react-native-capface-sdk: ec9abd145119d27edd2035b05f9dcd28b4d4f64d
capitual-react-native-capface-sdk: 3079ff981a8d2ad019ff68a0e443de285c48ae8e
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: 5d4a3b7f411219a45a6d952f77d2c0a6c9989da5
Expand Down
112 changes: 56 additions & 56 deletions example/ios/ReactNativeCapfaceSdkExample.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "FaceTec_your_app_logo.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions example/ios/ReactNativeCapfaceSdkExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,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>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) need access to your camera to take picture.</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
Expand Down
94 changes: 47 additions & 47 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
ScrollView,
NativeEventEmitter,
} from 'react-native';
import ReactNativeCapfaceSdk, {
import {
ReactNativeCapfaceSdk,
authenticate,
enroll,
initialize,
Expand Down
Loading