@@ -8,17 +8,18 @@ class Onfido: NSObject {
88 applicantId: String ,
99 countryId: String ,
1010 resolver resolve: @escaping RCTResponseSenderBlock ,
11- rejecter reject: @escaping RCTResponseSenderBlock ) -> Void {
11+ rejecter reject: @escaping RCTResponseSenderBlock ) -> Void ,
12+ primaryColor: String = " #FF9100 " {
1213 DispatchQueue . main. async {
1314 switch flowType {
1415 case " full " :
15- self . run ( withToken: token, andApplicantId: applicantId, andCountryCode: countryId, resolver: resolve, rejecter: reject)
16+ self . run ( withToken: token, andApplicantId: applicantId, andCountryCode: countryId, resolver: resolve, rejecter: reject, andPrimaryColor : primaryColors )
1617 case " selfie " :
17- self . runSelfie ( withToken: token, andApplicantId: applicantId, andCountryCode: countryId, resolver: resolve, rejecter: reject)
18+ self . runSelfie ( withToken: token, andApplicantId: applicantId, andCountryCode: countryId, resolver: resolve, rejecter: reject, andPrimaryColor : primaryColor )
1819 case " document " :
19- self . runDocument ( withToken: token, andApplicantId: applicantId, andCountryCode: countryId, resolver: resolve, rejecter: reject)
20+ self . runDocument ( withToken: token, andApplicantId: applicantId, andCountryCode: countryId, resolver: resolve, rejecter: reject, andPrimaryColor : primaryColor )
2021 default :
21- self . run ( withToken: token, andApplicantId: applicantId, andCountryCode: countryId, resolver: resolve, rejecter: reject)
22+ self . run ( withToken: token, andApplicantId: applicantId, andCountryCode: countryId, resolver: resolve, rejecter: reject, andPrimaryColor : primaryColor )
2223 }
2324 }
2425 }
@@ -32,10 +33,11 @@ class Onfido: NSObject {
3233 andApplicantId id: String ,
3334 andCountryCode countryId: String ,
3435 resolver resolve: @escaping RCTResponseSenderBlock ,
35- rejecter reject: @escaping RCTResponseSenderBlock ) {
36+ rejecter reject: @escaping RCTResponseSenderBlock ,
37+ andPrimaryColor primaryColor: String = " #FF9100 " ) {
3638
3739 let appearance = Appearance (
38- primaryColor: colorWithHexString ( hexString : " #FF9100 " ) ,
40+ primaryColor: colorWithHexString ( primaryColor ) ,
3941 primaryTitleColor: colorWithHexString ( hexString: " #FFFFFF " ) ,
4042 primaryBackgroundPressedColor: colorWithHexString ( hexString: " #111222 " ) ,
4143 secondaryBackgroundPressedColor: colorWithHexString ( hexString: " #333444 " )
@@ -87,10 +89,11 @@ class Onfido: NSObject {
8789 andApplicantId id: String ,
8890 andCountryCode countryId: String ,
8991 resolver resolve: @escaping RCTResponseSenderBlock ,
90- rejecter reject: @escaping RCTResponseSenderBlock ) {
92+ rejecter reject: @escaping RCTResponseSenderBlock ,
93+ andPrimaryColor primaryColor: String = " #FF9100 " ) {
9194
9295 let appearance = Appearance (
93- primaryColor: colorWithHexString ( hexString: " #FF9100 " ) ,
96+ primaryColor: colorWithHexString ( hexString: primaryColor ) ,
9497 primaryTitleColor: colorWithHexString ( hexString: " #FFFFFF " ) ,
9598 primaryBackgroundPressedColor: colorWithHexString ( hexString: " #111222 " ) ,
9699 secondaryBackgroundPressedColor: colorWithHexString ( hexString: " #333444 " )
@@ -140,10 +143,11 @@ class Onfido: NSObject {
140143 andApplicantId id: String ,
141144 andCountryCode countryId: String ,
142145 resolver resolve: @escaping RCTResponseSenderBlock ,
143- rejecter reject: @escaping RCTResponseSenderBlock ) {
146+ rejecter reject: @escaping RCTResponseSenderBlock ,
147+ andPrimaryColor primaryColor: String = " #FF9100 " ) {
144148
145149 let appearance = Appearance (
146- primaryColor: colorWithHexString ( hexString: " #FF9100 " ) ,
150+ primaryColor: colorWithHexString ( hexString: primaryColor ) ,
147151 primaryTitleColor: colorWithHexString ( hexString: " #FFFFFF " ) ,
148152 primaryBackgroundPressedColor: colorWithHexString ( hexString: " #111222 " ) ,
149153 secondaryBackgroundPressedColor: colorWithHexString ( hexString: " #333444 " )
0 commit comments