Skip to content

Commit

Permalink
Develop to master (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
kober32 authored Nov 26, 2020
1 parent ce0581f commit 871715c
Show file tree
Hide file tree
Showing 13 changed files with 4,608 additions and 1,743 deletions.
1 change: 0 additions & 1 deletion .deploy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"android/src/main/AndroidManifest.xml",
"android/src/main/java/com/wultra/android/powerauth/reactnative/PowerAuthRNModule.java",
"android/src/main/java/com/wultra/android/powerauth/reactnative/PowerAuthRNPackage.java",
"android/src/main/java/com/wultra/android/powerauth/reactnative/PowerAuthRNConfiguration.java",
"android/build.gradle",
"PowerAuth.js",
"PowerAuth.d.ts",
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ In order to connect to the [PowerAuth](https://www.wultra.com/mobile-security-su

|React Native SDK| Mobile SDK | Protocol | PowerAuth Server | Support Status |
|----------------|------------|----------|---------------------|-----------------------------------|
|`1.4.x` | `1.4.x` | `V3.1` | `0.24+` | Fully supported |
|`1.5.x` | `1.5.x` | `V3.1` | `0.24+` | Fully supported |
|`1.4.x` | `1.4.x` | `V3.1` | `0.24+` | Security & Functionality bugfixes |

## How to install

Expand All @@ -30,6 +31,12 @@ For iOS, don't dorget to install the pods:
cd ios
pod install
```

or

```sh
npx pod-install
```
### 3. Configure the instance

Before you call any PowerAuth method, you need to configure it first. The `configure` method will need the following parameters:
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ repositories {

dependencies {
implementation 'com.facebook.react:react-native:+'
api "io.getlime.security.powerauth:powerauth-android-sdk:1.4.3"
api "io.getlime.security.powerauth:powerauth-android-sdk:1.5.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
import java.util.HashMap;
import java.util.Map;

import io.getlime.security.powerauth.biometry.BiometricKeyData;
import io.getlime.security.powerauth.biometry.IAddBiometryFactorListener;
import io.getlime.security.powerauth.biometry.IBiometricAuthenticationCallback;
import io.getlime.security.powerauth.biometry.ICommitActivationWithBiometryListener;
import io.getlime.security.powerauth.sdk.*;
Expand All @@ -57,6 +59,7 @@ public PowerAuthRNModule(ReactApplicationContext context) {
this.context = context;
}

@NonNull
@Override
public String getName() {
return "PowerAuth";
Expand Down Expand Up @@ -373,8 +376,8 @@ public void onAddBiometryFactorSucceed() {
}

@Override
public void onAddBiometryFactorFailed(Throwable t) {
promise.reject(PowerAuthRNModule.getErrorCodeFromThrowable(t), t);
public void onAddBiometryFactorFailed(@NonNull PowerAuthErrorException error) {
promise.reject(PowerAuthRNModule.getErrorCodeFromThrowable(error), error);
}
});
} catch (Exception e) {
Expand Down Expand Up @@ -506,8 +509,8 @@ public void onBiometricDialogCancelled(boolean userCancel) {
}

@Override
public void onBiometricDialogSuccess(@NonNull byte[] biometricKeyEncrypted) {
String base64 = new String(Base64.encode(biometricKeyEncrypted, Base64.DEFAULT));
public void onBiometricDialogSuccess(@NonNull BiometricKeyData biometricKeyData) {
String base64 = new String(Base64.encode(biometricKeyData.getDerivedData(), Base64.DEFAULT));
promise.resolve(base64);
}

Expand Down
57 changes: 14 additions & 43 deletions demoapp/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,51 +1,22 @@
platform :ios, '10.0'

require_relative '../node_modules/react-native-unimodules/cocoapods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'

target 'PowerAuthDemo' do
use_frameworks!
rnPrefix = "../node_modules/react-native"

# React Native and its dependencies
pod 'FBLazyVector', :path => "#{rnPrefix}/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "#{rnPrefix}/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "#{rnPrefix}/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "#{rnPrefix}/Libraries/TypeSafety"
pod 'React', :path => "#{rnPrefix}/"
pod 'React-Core', :path => "#{rnPrefix}/"
pod 'React-CoreModules', :path => "#{rnPrefix}/React/CoreModules"
pod 'React-RCTActionSheet', :path => "#{rnPrefix}/Libraries/ActionSheetIOS"
pod 'React-RCTAnimation', :path => "#{rnPrefix}/Libraries/NativeAnimation"
pod 'React-RCTBlob', :path => "#{rnPrefix}/Libraries/Blob"
pod 'React-RCTImage', :path => "#{rnPrefix}/Libraries/Image"
pod 'React-RCTLinking', :path => "#{rnPrefix}/Libraries/LinkingIOS"
pod 'React-RCTNetwork', :path => "#{rnPrefix}/Libraries/Network"
pod 'React-RCTSettings', :path => "#{rnPrefix}/Libraries/Settings"
pod 'React-RCTText', :path => "#{rnPrefix}/Libraries/Text"
pod 'React-RCTVibration', :path => "#{rnPrefix}/Libraries/Vibration"
pod 'React-Core/RCTWebSocket', :path => "#{rnPrefix}/"
pod 'React-Core/DevSupport', :path => "#{rnPrefix}/"
pod 'React-cxxreact', :path => "#{rnPrefix}/ReactCommon/cxxreact"
pod 'React-jsi', :path => "#{rnPrefix}/ReactCommon/jsi"
pod 'React-jsiexecutor', :path => "#{rnPrefix}/ReactCommon/jsiexecutor"
pod 'React-jsinspector', :path => "#{rnPrefix}/ReactCommon/jsinspector"
pod 'ReactCommon/jscallinvoker', :path => "#{rnPrefix}/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "#{rnPrefix}/ReactCommon"
pod 'Yoga', :path => "#{rnPrefix}/ReactCommon/yoga"
pod 'DoubleConversion', :podspec => "#{rnPrefix}/third-party-podspecs/DoubleConversion.podspec"
pod 'glog', :podspec => "#{rnPrefix}/third-party-podspecs/glog.podspec"
pod 'Folly', :podspec => "#{rnPrefix}/third-party-podspecs/Folly.podspec"

# Other native modules
platform :ios, '10.0'

# Automatically detect installed unimodules
target 'PowerAuthDemo' do
config = use_native_modules!
use_unimodules!

# react-native-cli autolinking
use_native_modules!

use_react_native!(:path => config["reactNativePath"])

pod 'react-native-powerauth-mobile-sdk', :path => '../node_modules/react-native-powerauth-mobile-sdk'

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
Loading

0 comments on commit 871715c

Please sign in to comment.