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
## 1.1.3
*
Upgrade Android SDK to 1.0.3.
*
Upgrade Android SDK to 1.0.3.
...
...
README.md
View file @
a972166d
...
@@ -9,9 +9,9 @@ MyID SDK flutter plugin.
...
@@ -9,9 +9,9 @@ MyID SDK flutter plugin.
-
[
SDK error codes
](
#sdk-error-codes
)
-
[
SDK error codes
](
#sdk-error-codes
)
-
[
Theme
](
#theme
)
-
[
Theme
](
#theme
)
Android SDK:
`1.0.
3
`
Android SDK:
`1.0.
4
`
iOS SDK:
`2.2.
4
`
iOS SDK:
`2.2.
5
`
## Project adjustments
## Project adjustments
...
@@ -59,17 +59,17 @@ Add descriptions for camera permission to `ios/YourProjectName/Info.plist`:
...
@@ -59,17 +59,17 @@ Add descriptions for camera permission to `ios/YourProjectName/Info.plist`:
Method | Notes | Default
Method | Notes | Default
--- | --- | ---
--- | --- | ---
`clientHash`
| Client Hash | 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 = 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
`passportData`
| Passport serial number or PINFL data | Optional
`dateOfBirth`
| Date of birth in. Format:
`dd.MM.yyyy`
| Optional
`dateOfBirth`
| Date of birth in. Format:
`dd.MM.yyyy`
| Optional
`sdkHash`
| 32 characters long string | Optional
`sdkHash`
| 32 characters long string
(Note 1.2)
| Optional
`externalId`
| 36 characters long. Should match with UUID4 regex | 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
`threshold`
| The value can be in the range of
`0.50`
-
`0.99`
| 0.60
`buildMode`
| Build mode | MyIdBuildMode.PRODUCTION
`buildMode`
| Build mode
(Note 1.4)
| MyIdBuildMode.PRODUCTION
`entryType`
| Customizing the SDK Entry types | MyIdEntryType.AUTH
`entryType`
| Customizing the SDK Entry types
(Note 1.5)
| MyIdEntryType.AUTH
`residency`
| To set a specific resident type | MyIdResidentType.RESIDENT
`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
`cameraShape`
| To set a specific camera shape | MyIdCameraShape.CIRCLE
`resolution`
| To set a specific camera resolution | MyIdResolution.RESOLUTION_480
`resolution`
| To set a specific camera resolution | MyIdResolution.RESOLUTION_480
`imageFormat`
| To set a specific image format | MyIdImageFormat.PNG
`imageFormat`
| To set a specific image format | MyIdImageFormat.PNG
...
@@ -108,8 +108,6 @@ For **iOS** theme config use `MyIdIOSAppearance` class and its properties.
...
@@ -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
*
`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
*
`errorColor`
: Defines the color of the error buttons, icons and states
*
`primaryButtonColor`
: Defines the background color of the primary action buttons
*
`primaryButtonColor`
: Defines the background color of the primary action buttons
...
...
android/build.gradle
View file @
a972166d
...
@@ -49,5 +49,5 @@ android {
...
@@ -49,5 +49,5 @@ android {
}
}
dependencies
{
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(
...
@@ -55,6 +55,7 @@ class MyIdSdk(
val
clientHashId
:
String
val
clientHashId
:
String
val
passportData
:
String
val
passportData
:
String
val
dateOfBirth
:
String
val
dateOfBirth
:
String
val
minAge
:
Int
val
sdkHash
:
String
val
sdkHash
:
String
val
externalId
:
String
val
externalId
:
String
val
threshold
:
Float
val
threshold
:
Float
...
@@ -74,6 +75,7 @@ class MyIdSdk(
...
@@ -74,6 +75,7 @@ class MyIdSdk(
clientHashId
=
config
.
fetch
(
"clientHashId"
)
clientHashId
=
config
.
fetch
(
"clientHashId"
)
passportData
=
config
.
fetch
(
"passportData"
)
passportData
=
config
.
fetch
(
"passportData"
)
dateOfBirth
=
config
.
fetch
(
"dateOfBirth"
)
dateOfBirth
=
config
.
fetch
(
"dateOfBirth"
)
minAge
=
config
.
fetch
(
"minAge"
).
toIntOrNull
()
?:
16
sdkHash
=
config
.
fetch
(
"sdkHash"
)
sdkHash
=
config
.
fetch
(
"sdkHash"
)
externalId
=
config
.
fetch
(
"externalId"
)
externalId
=
config
.
fetch
(
"externalId"
)
threshold
=
config
.
fetch
(
"threshold"
).
toFloatOrNull
()
?:
0.6f
threshold
=
config
.
fetch
(
"threshold"
).
toFloatOrNull
()
?:
0.6f
...
@@ -140,6 +142,7 @@ class MyIdSdk(
...
@@ -140,6 +142,7 @@ class MyIdSdk(
.
withClientHash
(
clientHash
,
clientHashId
)
.
withClientHash
(
clientHash
,
clientHashId
)
.
withPassportData
(
passportData
)
.
withPassportData
(
passportData
)
.
withBirthDate
(
dateOfBirth
)
.
withBirthDate
(
dateOfBirth
)
.
withMinAge
(
minAge
)
.
withSdkHash
(
sdkHash
)
.
withSdkHash
(
sdkHash
)
.
withExternalId
(
externalId
)
.
withExternalId
(
externalId
)
.
withThreshold
(
threshold
)
.
withThreshold
(
threshold
)
...
...
android/src/main/kotlin/uz/aigroup/myid/MyIdSdkActivityListener.kt
View file @
a972166d
...
@@ -64,7 +64,7 @@ class MyIdSdkActivityListener(
...
@@ -64,7 +64,7 @@ class MyIdSdkActivityListener(
override
fun
onUserExited
()
{
override
fun
onUserExited
()
{
if
(
flutterResult
!=
null
)
{
if
(
flutterResult
!=
null
)
{
flutterResult
?.
error
(
flutterResult
?.
error
(
"
error
"
,
"
cancel
"
,
"User canceled flow"
,
"User canceled flow"
,
null
null
)
)
...
...
example/pubspec.lock
View file @
a972166d
...
@@ -121,7 +121,7 @@ packages:
...
@@ -121,7 +121,7 @@ packages:
path: ".."
path: ".."
relative: true
relative: true
source: path
source: path
version: "1.1.
2
"
version: "1.1.
4
"
path:
path:
dependency: transitive
dependency: transitive
description:
description:
...
...
ios/Classes/MyIdSdk.swift
View file @
a972166d
...
@@ -4,7 +4,6 @@ import MyIdSDK
...
@@ -4,7 +4,6 @@ import MyIdSDK
public
class
AppearancePublic
:
NSObject
{
public
class
AppearancePublic
:
NSObject
{
public
let
primaryColor
:
UIColor
?
public
let
primaryColor
:
UIColor
?
public
let
secondaryColor
:
UIColor
?
public
let
errorColor
:
UIColor
?
public
let
errorColor
:
UIColor
?
public
let
primaryButtonColor
:
UIColor
?
public
let
primaryButtonColor
:
UIColor
?
public
let
primaryButtonColorDisabled
:
UIColor
?
public
let
primaryButtonColorDisabled
:
UIColor
?
...
@@ -14,7 +13,6 @@ public class AppearancePublic: NSObject {
...
@@ -14,7 +13,6 @@ public class AppearancePublic: NSObject {
public
init
(
public
init
(
primaryColor
:
UIColor
?,
primaryColor
:
UIColor
?,
secondaryColor
:
UIColor
?,
errorColor
:
UIColor
?,
errorColor
:
UIColor
?,
primaryButtonColor
:
UIColor
?,
primaryButtonColor
:
UIColor
?,
primaryButtonColorDisabled
:
UIColor
?,
primaryButtonColorDisabled
:
UIColor
?,
...
@@ -23,7 +21,6 @@ public class AppearancePublic: NSObject {
...
@@ -23,7 +21,6 @@ public class AppearancePublic: NSObject {
buttonCornerRadius
:
Int
?
buttonCornerRadius
:
Int
?
)
{
)
{
self
.
primaryColor
=
primaryColor
self
.
primaryColor
=
primaryColor
self
.
secondaryColor
=
secondaryColor
self
.
errorColor
=
errorColor
self
.
errorColor
=
errorColor
self
.
primaryButtonColor
=
primaryButtonColor
self
.
primaryButtonColor
=
primaryButtonColor
self
.
primaryButtonColorDisabled
=
primaryButtonColorDisabled
self
.
primaryButtonColorDisabled
=
primaryButtonColorDisabled
...
@@ -38,9 +35,6 @@ public func loadAppearance(config: NSDictionary) throws -> AppearancePublic? {
...
@@ -38,9 +35,6 @@ public func loadAppearance(config: NSDictionary) throws -> AppearancePublic? {
let
primaryColor
=
(
jsonResult
[
"primaryColor"
]
==
nil
)
let
primaryColor
=
(
jsonResult
[
"primaryColor"
]
==
nil
)
?
nil
:
UIColor
.
from
(
hex
:
jsonResult
[
"primaryColor"
]
as!
String
)
?
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
)
let
errorColor
=
(
jsonResult
[
"errorColor"
]
==
nil
)
?
nil
:
UIColor
.
from
(
hex
:
jsonResult
[
"errorColor"
]
as!
String
)
?
nil
:
UIColor
.
from
(
hex
:
jsonResult
[
"errorColor"
]
as!
String
)
...
@@ -60,7 +54,6 @@ public func loadAppearance(config: NSDictionary) throws -> AppearancePublic? {
...
@@ -60,7 +54,6 @@ public func loadAppearance(config: NSDictionary) throws -> AppearancePublic? {
let
appearancePublic
=
AppearancePublic
(
let
appearancePublic
=
AppearancePublic
(
primaryColor
:
primaryColor
,
primaryColor
:
primaryColor
,
secondaryColor
:
secondaryColor
,
errorColor
:
errorColor
,
errorColor
:
errorColor
,
primaryButtonColor
:
primaryButtonColor
,
primaryButtonColor
:
primaryButtonColor
,
primaryButtonColorDisabled
:
primaryButtonColorDisabled
,
primaryButtonColorDisabled
:
primaryButtonColorDisabled
,
...
@@ -80,7 +73,6 @@ public func loadAppearanceFromConfig(config: NSDictionary) throws -> MyIdAppeara
...
@@ -80,7 +73,6 @@ public func loadAppearanceFromConfig(config: NSDictionary) throws -> MyIdAppeara
if
let
appearancePublic
=
appearancePublic
{
if
let
appearancePublic
=
appearancePublic
{
let
appearance
=
MyIdAppearance
()
let
appearance
=
MyIdAppearance
()
appearance
.
primaryColor
=
appearancePublic
.
primaryColor
appearance
.
primaryColor
=
appearancePublic
.
primaryColor
appearance
.
secondaryColor
=
appearancePublic
.
secondaryColor
appearance
.
errorColor
=
appearancePublic
.
errorColor
appearance
.
errorColor
=
appearancePublic
.
errorColor
appearance
.
primaryButtonColor
=
appearancePublic
.
primaryButtonColor
appearance
.
primaryButtonColor
=
appearancePublic
.
primaryButtonColor
appearance
.
primaryButtonColorDisabled
=
appearancePublic
.
primaryButtonColorDisabled
appearance
.
primaryButtonColorDisabled
=
appearancePublic
.
primaryButtonColorDisabled
...
@@ -106,6 +98,7 @@ public func buildMyIdConfig(
...
@@ -106,6 +98,7 @@ public func buildMyIdConfig(
let
clientHashId
=
config
[
"clientHashId"
]
as?
String
??
""
let
clientHashId
=
config
[
"clientHashId"
]
as?
String
??
""
let
passportData
=
config
[
"passportData"
]
as?
String
??
""
let
passportData
=
config
[
"passportData"
]
as?
String
??
""
let
dateOfBirth
=
config
[
"dateOfBirth"
]
as?
String
??
""
let
dateOfBirth
=
config
[
"dateOfBirth"
]
as?
String
??
""
let
minAge
=
config
[
"minAge"
]
as?
Int
??
16
let
sdkHash
=
config
[
"sdkHash"
]
as?
String
??
""
let
sdkHash
=
config
[
"sdkHash"
]
as?
String
??
""
let
externalId
=
config
[
"externalId"
]
as?
String
??
""
let
externalId
=
config
[
"externalId"
]
as?
String
??
""
...
@@ -163,6 +156,7 @@ public func buildMyIdConfig(
...
@@ -163,6 +156,7 @@ public func buildMyIdConfig(
config
.
clientHashId
=
clientHashId
config
.
clientHashId
=
clientHashId
config
.
passportData
=
passportData
config
.
passportData
=
passportData
config
.
dateOfBirth
=
dateOfBirth
config
.
dateOfBirth
=
dateOfBirth
config
.
minAge
=
minAge
config
.
sdkHash
=
sdkHash
config
.
sdkHash
=
sdkHash
config
.
externalId
=
externalId
config
.
externalId
=
externalId
config
.
threshold
=
threshold
config
.
threshold
=
threshold
...
@@ -198,7 +192,7 @@ class MyIdSdk: NSObject, MyIdClientDelegate {
...
@@ -198,7 +192,7 @@ class MyIdSdk: NSObject, MyIdClientDelegate {
func
onUserExited
()
{
func
onUserExited
()
{
if
let
fResult
=
flutterResult
{
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'
;
import
'enums.dart'
;
part
'myid_config.g.dart'
;
part
'myid_config.g.dart'
;
...
@@ -8,6 +10,7 @@ class MyIdConfig {
...
@@ -8,6 +10,7 @@ class MyIdConfig {
final
String
?
clientHashId
;
final
String
?
clientHashId
;
final
String
?
passportData
;
final
String
?
passportData
;
final
String
?
dateOfBirth
;
final
String
?
dateOfBirth
;
final
Int
?
minAge
;
final
String
?
sdkHash
;
final
String
?
sdkHash
;
final
String
?
externalId
;
final
String
?
externalId
;
final
double
?
threshold
;
final
double
?
threshold
;
...
@@ -27,6 +30,7 @@ class MyIdConfig {
...
@@ -27,6 +30,7 @@ class MyIdConfig {
this
.
clientHashId
,
this
.
clientHashId
,
this
.
passportData
,
this
.
passportData
,
this
.
dateOfBirth
,
this
.
dateOfBirth
,
this
.
minAge
,
this
.
sdkHash
,
this
.
sdkHash
,
this
.
externalId
,
this
.
externalId
,
this
.
threshold
,
this
.
threshold
,
...
@@ -77,7 +81,6 @@ class MyIdOrganizationDetails {
...
@@ -77,7 +81,6 @@ class MyIdOrganizationDetails {
class
MyIdIOSAppearance
{
class
MyIdIOSAppearance
{
final
String
?
primaryColor
;
final
String
?
primaryColor
;
final
String
?
secondaryColor
;
final
String
?
errorColor
;
final
String
?
errorColor
;
final
String
?
primaryButtonColor
;
final
String
?
primaryButtonColor
;
final
String
?
primaryButtonColorDisabled
;
final
String
?
primaryButtonColorDisabled
;
...
@@ -87,7 +90,6 @@ class MyIdIOSAppearance {
...
@@ -87,7 +90,6 @@ class MyIdIOSAppearance {
const
MyIdIOSAppearance
({
const
MyIdIOSAppearance
({
this
.
primaryColor
,
this
.
primaryColor
,
this
.
secondaryColor
,
this
.
errorColor
,
this
.
errorColor
,
this
.
primaryButtonColor
,
this
.
primaryButtonColor
,
this
.
primaryButtonColorDisabled
,
this
.
primaryButtonColorDisabled
,
...
...
lib/myid_config.g.dart
View file @
a972166d
...
@@ -13,6 +13,7 @@ MyIdConfig _$MyIdConfigFromJson(Map<String, dynamic> json) {
...
@@ -13,6 +13,7 @@ MyIdConfig _$MyIdConfigFromJson(Map<String, dynamic> json) {
clientHashId:
json
[
'clientHashId'
]
as
String
,
clientHashId:
json
[
'clientHashId'
]
as
String
,
passportData:
json
[
'passportData'
]
as
String
,
passportData:
json
[
'passportData'
]
as
String
,
dateOfBirth:
json
[
'dateOfBirth'
]
as
String
,
dateOfBirth:
json
[
'dateOfBirth'
]
as
String
,
minAge:
json
[
'minAge'
]
as
Int
,
sdkHash:
json
[
'sdkHash'
]
as
String
,
sdkHash:
json
[
'sdkHash'
]
as
String
,
externalId:
json
[
'externalId'
]
as
String
,
externalId:
json
[
'externalId'
]
as
String
,
threshold:
json
[
'threshold'
]
as
double
,
threshold:
json
[
'threshold'
]
as
double
,
...
@@ -42,6 +43,7 @@ Map<String, dynamic> _$MyIdConfigToJson(MyIdConfig instance) {
...
@@ -42,6 +43,7 @@ Map<String, dynamic> _$MyIdConfigToJson(MyIdConfig instance) {
writeNotNull
(
'clientHashId'
,
instance
.
clientHashId
);
writeNotNull
(
'clientHashId'
,
instance
.
clientHashId
);
writeNotNull
(
'passportData'
,
instance
.
passportData
);
writeNotNull
(
'passportData'
,
instance
.
passportData
);
writeNotNull
(
'dateOfBirth'
,
instance
.
dateOfBirth
);
writeNotNull
(
'dateOfBirth'
,
instance
.
dateOfBirth
);
writeNotNull
(
'minAge'
,
instance
.
minAge
);
writeNotNull
(
'sdkHash'
,
instance
.
sdkHash
);
writeNotNull
(
'sdkHash'
,
instance
.
sdkHash
);
writeNotNull
(
'externalId'
,
instance
.
externalId
);
writeNotNull
(
'externalId'
,
instance
.
externalId
);
writeNotNull
(
'threshold'
,
instance
.
threshold
);
writeNotNull
(
'threshold'
,
instance
.
threshold
);
...
@@ -94,7 +96,6 @@ Map<String, dynamic> _$MyIdIOSAppearanceToJson(MyIdIOSAppearance instance) {
...
@@ -94,7 +96,6 @@ Map<String, dynamic> _$MyIdIOSAppearanceToJson(MyIdIOSAppearance instance) {
}
}
writeNotNull
(
'primaryColor'
,
instance
.
primaryColor
);
writeNotNull
(
'primaryColor'
,
instance
.
primaryColor
);
writeNotNull
(
'secondaryColor'
,
instance
.
secondaryColor
);
writeNotNull
(
'errorColor'
,
instance
.
errorColor
);
writeNotNull
(
'errorColor'
,
instance
.
errorColor
);
writeNotNull
(
'primaryButtonColor'
,
instance
.
primaryButtonColor
);
writeNotNull
(
'primaryButtonColor'
,
instance
.
primaryButtonColor
);
writeNotNull
(
'primaryButtonColorDisabled'
,
instance
.
primaryButtonColorDisabled
);
writeNotNull
(
'primaryButtonColorDisabled'
,
instance
.
primaryButtonColorDisabled
);
...
@@ -106,7 +107,6 @@ Map<String, dynamic> _$MyIdIOSAppearanceToJson(MyIdIOSAppearance instance) {
...
@@ -106,7 +107,6 @@ Map<String, dynamic> _$MyIdIOSAppearanceToJson(MyIdIOSAppearance instance) {
MyIdIOSAppearance
_$MyIdIOSAppearanceFromJson
(
Map
<
String
,
dynamic
>
json
)
{
MyIdIOSAppearance
_$MyIdIOSAppearanceFromJson
(
Map
<
String
,
dynamic
>
json
)
{
return
MyIdIOSAppearance
(
return
MyIdIOSAppearance
(
primaryColor:
json
[
'primaryColor'
]
as
String
?,
primaryColor:
json
[
'primaryColor'
]
as
String
?,
secondaryColor:
json
[
'secondaryColor'
]
as
String
?,
errorColor:
json
[
'errorColor'
]
as
String
?,
errorColor:
json
[
'errorColor'
]
as
String
?,
primaryButtonColor:
json
[
'primaryButtonColor'
]
as
String
?,
primaryButtonColor:
json
[
'primaryButtonColor'
]
as
String
?,
primaryButtonColorDisabled:
json
[
'primaryButtonColorDisabled'
]
as
String
?,
primaryButtonColorDisabled:
json
[
'primaryButtonColorDisabled'
]
as
String
?,
...
...
pubspec.yaml
View file @
a972166d
name
:
myid
name
:
myid
description
:
MyID SDK plugin for Flutter. Package supports iOS and Android to verify users identity.
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
homepage
:
https://pub.dev/packages/myid
repository
:
https://pub.dev/packages/myid
repository
:
https://pub.dev/packages/myid
issue_tracker
:
https://gitlab.aigroup.uz/myid-public-code/myid-sample-flutter/-/issues
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