Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MYID Public Code
MyID Flutter SDK
Commits
a972166d
Commit
a972166d
authored
Nov 03, 2023
by
Javokhir
Browse files
1.1.4
parent
a95205bf
Changes
10
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
a972166d
## 1.1.4
*
Added new
`minAge: Int`
method for the minimum age to use the MyID service.
*
🔨 Fixed PINFL bug on versions below Android 8.1.
*
Added error texts in inputs.
*
Upgrade Android SDK to 1.0.4.
*
Upgrade iOS SDK to 2.2.5.
## 1.1.3
*
Upgrade Android SDK to 1.0.3.
...
...
README.md
View file @
a972166d
...
...
@@ -9,9 +9,9 @@ MyID SDK flutter plugin.
-
[
SDK error codes
](
#sdk-error-codes
)
-
[
Theme
](
#theme
)
Android SDK:
`1.0.
3
`
Android SDK:
`1.0.
4
`
iOS SDK:
`2.2.
4
`
iOS SDK:
`2.2.
5
`
## Project adjustments
...
...
@@ -59,17 +59,17 @@ Add descriptions for camera permission to `ios/YourProjectName/Info.plist`:
Method | Notes | Default
--- | --- | ---
`clientHash`
| Client Hash | Provided by MyID sales team. Mandatory, if using entryType = AUTH
`clientHashId`
| Client Hash I
d
| Provided by MyID sales team. Mandatory, if using entryType = AUTH
`clientHash`
| Client Hash | Provided by MyID sales team. Mandatory, if using entryType =
MyIdEntryType.
AUTH
`clientHashId`
| Client Hash I
D
| Provided by MyID sales team. Mandatory, if using entryType =
MyIdEntryType.
AUTH
`passportData`
| Passport serial number or PINFL data | Optional
`dateOfBirth`
| Date of birth in. Format:
`dd.MM.yyyy`
| Optional
`sdkHash`
| 32 characters long string | Optional
`externalId`
| 36 characters long. Should match with UUID4 regex | Optional
`sdkHash`
| 32 characters long string
(Note 1.2)
| Optional
`externalId`
| 36 characters long. Should match with UUID4 regex
(Note 1.3)
| Optional
`threshold`
| The value can be in the range of
`0.50`
-
`0.99`
| 0.60
`buildMode`
| Build mode | MyIdBuildMode.PRODUCTION
`entryType`
| Customizing the SDK Entry types | MyIdEntryType.AUTH
`buildMode`
| Build mode
(Note 1.4)
| MyIdBuildMode.PRODUCTION
`entryType`
| Customizing the SDK Entry types
(Note 1.5)
| MyIdEntryType.AUTH
`residency`
| To set a specific resident type | MyIdResidentType.RESIDENT
`locale`
| To set a specific locale | Locale
("uz")
`locale`
| To set a specific locale |
MyId
Locale
.UZBEK
`cameraShape`
| To set a specific camera shape | MyIdCameraShape.CIRCLE
`resolution`
| To set a specific camera resolution | MyIdResolution.RESOLUTION_480
`imageFormat`
| To set a specific image format | MyIdImageFormat.PNG
...
...
@@ -108,8 +108,6 @@ For **iOS** theme config use `MyIdIOSAppearance` class and its properties.
*
`primaryColor`
: Defines the color of SDK which guides the user through the flow
*
`secondaryColor`
: Defines the color of the frames
*
`errorColor`
: Defines the color of the error buttons, icons and states
*
`primaryButtonColor`
: Defines the background color of the primary action buttons
...
...
android/build.gradle
View file @
a972166d
...
...
@@ -49,5 +49,5 @@ android {
}
dependencies
{
implementation
(
"uz.myid.sdk.capture:myid-flutter-capture-sdk:1.0.
3
"
)
implementation
(
"uz.myid.sdk.capture:myid-flutter-capture-sdk:1.0.
4
"
)
}
\ No newline at end of file
android/src/main/kotlin/uz/aigroup/myid/MyIdSdk.kt
View file @
a972166d
...
...
@@ -55,6 +55,7 @@ class MyIdSdk(
val
clientHashId
:
String
val
passportData
:
String
val
dateOfBirth
:
String
val
minAge
:
Int
val
sdkHash
:
String
val
externalId
:
String
val
threshold
:
Float
...
...
@@ -74,6 +75,7 @@ class MyIdSdk(
clientHashId
=
config
.
fetch
(
"clientHashId"
)
passportData
=
config
.
fetch
(
"passportData"
)
dateOfBirth
=
config
.
fetch
(
"dateOfBirth"
)
minAge
=
config
.
fetch
(
"minAge"
).
toIntOrNull
()
?:
16
sdkHash
=
config
.
fetch
(
"sdkHash"
)
externalId
=
config
.
fetch
(
"externalId"
)
threshold
=
config
.
fetch
(
"threshold"
).
toFloatOrNull
()
?:
0.6f
...
...
@@ -140,6 +142,7 @@ class MyIdSdk(
.
withClientHash
(
clientHash
,
clientHashId
)
.
withPassportData
(
passportData
)
.
withBirthDate
(
dateOfBirth
)
.
withMinAge
(
minAge
)
.
withSdkHash
(
sdkHash
)
.
withExternalId
(
externalId
)
.
withThreshold
(
threshold
)
...
...
android/src/main/kotlin/uz/aigroup/myid/MyIdSdkActivityListener.kt
View file @
a972166d
...
...
@@ -64,7 +64,7 @@ class MyIdSdkActivityListener(
override
fun
onUserExited
()
{
if
(
flutterResult
!=
null
)
{
flutterResult
?.
error
(
"
error
"
,
"
cancel
"
,
"User canceled flow"
,
null
)
...
...
example/pubspec.lock
View file @
a972166d
...
...
@@ -121,7 +121,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.
2
"
version: "1.1.
4
"
path:
dependency: transitive
description:
...
...
ios/Classes/MyIdSdk.swift
View file @
a972166d
...
...
@@ -4,7 +4,6 @@ import MyIdSDK
public
class
AppearancePublic
:
NSObject
{
public
let
primaryColor
:
UIColor
?
public
let
secondaryColor
:
UIColor
?
public
let
errorColor
:
UIColor
?
public
let
primaryButtonColor
:
UIColor
?
public
let
primaryButtonColorDisabled
:
UIColor
?
...
...
@@ -14,7 +13,6 @@ public class AppearancePublic: NSObject {
public
init
(
primaryColor
:
UIColor
?,
secondaryColor
:
UIColor
?,
errorColor
:
UIColor
?,
primaryButtonColor
:
UIColor
?,
primaryButtonColorDisabled
:
UIColor
?,
...
...
@@ -23,7 +21,6 @@ public class AppearancePublic: NSObject {
buttonCornerRadius
:
Int
?
)
{
self
.
primaryColor
=
primaryColor
self
.
secondaryColor
=
secondaryColor
self
.
errorColor
=
errorColor
self
.
primaryButtonColor
=
primaryButtonColor
self
.
primaryButtonColorDisabled
=
primaryButtonColorDisabled
...
...
@@ -38,9 +35,6 @@ public func loadAppearance(config: NSDictionary) throws -> AppearancePublic? {
let
primaryColor
=
(
jsonResult
[
"primaryColor"
]
==
nil
)
?
nil
:
UIColor
.
from
(
hex
:
jsonResult
[
"primaryColor"
]
as!
String
)
let
secondaryColor
=
(
jsonResult
[
"secondaryColor"
]
==
nil
)
?
nil
:
UIColor
.
from
(
hex
:
jsonResult
[
"secondaryColor"
]
as!
String
)
let
errorColor
=
(
jsonResult
[
"errorColor"
]
==
nil
)
?
nil
:
UIColor
.
from
(
hex
:
jsonResult
[
"errorColor"
]
as!
String
)
...
...
@@ -60,7 +54,6 @@ public func loadAppearance(config: NSDictionary) throws -> AppearancePublic? {
let
appearancePublic
=
AppearancePublic
(
primaryColor
:
primaryColor
,
secondaryColor
:
secondaryColor
,
errorColor
:
errorColor
,
primaryButtonColor
:
primaryButtonColor
,
primaryButtonColorDisabled
:
primaryButtonColorDisabled
,
...
...
@@ -80,7 +73,6 @@ public func loadAppearanceFromConfig(config: NSDictionary) throws -> MyIdAppeara
if
let
appearancePublic
=
appearancePublic
{
let
appearance
=
MyIdAppearance
()
appearance
.
primaryColor
=
appearancePublic
.
primaryColor
appearance
.
secondaryColor
=
appearancePublic
.
secondaryColor
appearance
.
errorColor
=
appearancePublic
.
errorColor
appearance
.
primaryButtonColor
=
appearancePublic
.
primaryButtonColor
appearance
.
primaryButtonColorDisabled
=
appearancePublic
.
primaryButtonColorDisabled
...
...
@@ -106,6 +98,7 @@ public func buildMyIdConfig(
let
clientHashId
=
config
[
"clientHashId"
]
as?
String
??
""
let
passportData
=
config
[
"passportData"
]
as?
String
??
""
let
dateOfBirth
=
config
[
"dateOfBirth"
]
as?
String
??
""
let
minAge
=
config
[
"minAge"
]
as?
Int
??
16
let
sdkHash
=
config
[
"sdkHash"
]
as?
String
??
""
let
externalId
=
config
[
"externalId"
]
as?
String
??
""
...
...
@@ -163,6 +156,7 @@ public func buildMyIdConfig(
config
.
clientHashId
=
clientHashId
config
.
passportData
=
passportData
config
.
dateOfBirth
=
dateOfBirth
config
.
minAge
=
minAge
config
.
sdkHash
=
sdkHash
config
.
externalId
=
externalId
config
.
threshold
=
threshold
...
...
@@ -198,7 +192,7 @@ class MyIdSdk: NSObject, MyIdClientDelegate {
func
onUserExited
()
{
if
let
fResult
=
flutterResult
{
fResult
(
FlutterError
(
code
:
"
error
"
,
message
:
"User canceled flow"
,
details
:
nil
))
fResult
(
FlutterError
(
code
:
"
cancel
"
,
message
:
"User canceled flow"
,
details
:
nil
))
}
}
...
...
lib/myid_config.dart
View file @
a972166d
import
'dart:ffi'
;
import
'enums.dart'
;
part
'myid_config.g.dart'
;
...
...
@@ -8,6 +10,7 @@ class MyIdConfig {
final
String
?
clientHashId
;
final
String
?
passportData
;
final
String
?
dateOfBirth
;
final
Int
?
minAge
;
final
String
?
sdkHash
;
final
String
?
externalId
;
final
double
?
threshold
;
...
...
@@ -27,6 +30,7 @@ class MyIdConfig {
this
.
clientHashId
,
this
.
passportData
,
this
.
dateOfBirth
,
this
.
minAge
,
this
.
sdkHash
,
this
.
externalId
,
this
.
threshold
,
...
...
@@ -77,7 +81,6 @@ class MyIdOrganizationDetails {
class
MyIdIOSAppearance
{
final
String
?
primaryColor
;
final
String
?
secondaryColor
;
final
String
?
errorColor
;
final
String
?
primaryButtonColor
;
final
String
?
primaryButtonColorDisabled
;
...
...
@@ -87,7 +90,6 @@ class MyIdIOSAppearance {
const
MyIdIOSAppearance
({
this
.
primaryColor
,
this
.
secondaryColor
,
this
.
errorColor
,
this
.
primaryButtonColor
,
this
.
primaryButtonColorDisabled
,
...
...
lib/myid_config.g.dart
View file @
a972166d
...
...
@@ -13,6 +13,7 @@ MyIdConfig _$MyIdConfigFromJson(Map<String, dynamic> json) {
clientHashId:
json
[
'clientHashId'
]
as
String
,
passportData:
json
[
'passportData'
]
as
String
,
dateOfBirth:
json
[
'dateOfBirth'
]
as
String
,
minAge:
json
[
'minAge'
]
as
Int
,
sdkHash:
json
[
'sdkHash'
]
as
String
,
externalId:
json
[
'externalId'
]
as
String
,
threshold:
json
[
'threshold'
]
as
double
,
...
...
@@ -42,6 +43,7 @@ Map<String, dynamic> _$MyIdConfigToJson(MyIdConfig instance) {
writeNotNull
(
'clientHashId'
,
instance
.
clientHashId
);
writeNotNull
(
'passportData'
,
instance
.
passportData
);
writeNotNull
(
'dateOfBirth'
,
instance
.
dateOfBirth
);
writeNotNull
(
'minAge'
,
instance
.
minAge
);
writeNotNull
(
'sdkHash'
,
instance
.
sdkHash
);
writeNotNull
(
'externalId'
,
instance
.
externalId
);
writeNotNull
(
'threshold'
,
instance
.
threshold
);
...
...
@@ -94,7 +96,6 @@ Map<String, dynamic> _$MyIdIOSAppearanceToJson(MyIdIOSAppearance instance) {
}
writeNotNull
(
'primaryColor'
,
instance
.
primaryColor
);
writeNotNull
(
'secondaryColor'
,
instance
.
secondaryColor
);
writeNotNull
(
'errorColor'
,
instance
.
errorColor
);
writeNotNull
(
'primaryButtonColor'
,
instance
.
primaryButtonColor
);
writeNotNull
(
'primaryButtonColorDisabled'
,
instance
.
primaryButtonColorDisabled
);
...
...
@@ -106,7 +107,6 @@ Map<String, dynamic> _$MyIdIOSAppearanceToJson(MyIdIOSAppearance instance) {
MyIdIOSAppearance
_$MyIdIOSAppearanceFromJson
(
Map
<
String
,
dynamic
>
json
)
{
return
MyIdIOSAppearance
(
primaryColor:
json
[
'primaryColor'
]
as
String
?,
secondaryColor:
json
[
'secondaryColor'
]
as
String
?,
errorColor:
json
[
'errorColor'
]
as
String
?,
primaryButtonColor:
json
[
'primaryButtonColor'
]
as
String
?,
primaryButtonColorDisabled:
json
[
'primaryButtonColorDisabled'
]
as
String
?,
...
...
pubspec.yaml
View file @
a972166d
name
:
myid
description
:
MyID SDK plugin for Flutter. Package supports iOS and Android to verify users identity.
version
:
1.1.
3
version
:
1.1.
4
homepage
:
https://pub.dev/packages/myid
repository
:
https://pub.dev/packages/myid
issue_tracker
:
https://gitlab.aigroup.uz/myid-public-code/myid-sample-flutter/-/issues
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment