react-native-persona 2.11.0 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ require 'json'
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
4
 
5
- persona_sdk_version = '2.26.0'
5
+ persona_sdk_version = '2.26.1'
6
6
 
7
7
  Pod::Spec.new do |s|
8
8
  s.name = 'RNPersonaInquiry2'
@@ -65,5 +65,5 @@ dependencies {
65
65
  implementation("com.facebook.react:react-android")
66
66
 
67
67
  // NB: be sure to bump `nfc-impl` in example/android/app/build.gradle as well
68
- implementation 'com.withpersona.sdk2:inquiry:2.16.3'
68
+ implementation 'com.withpersona.sdk2:inquiry:2.17.0'
69
69
  }
@@ -54,9 +54,14 @@ class PersonaInquiry2: RCTEventEmitter {
54
54
  let themeSource = options["themeSource"] as? String
55
55
  let fieldsObject = options["fields"] as? [String: [String: Any]]
56
56
  let returnCollectedData = options["returnCollectedData"] as? Bool ?? false
57
- let locale = options["locale"] as? String
57
+ // our iOS SDK uses Locale.current.identifier which chooses app language instead of device language
58
+ // imo this is the appropriate level of control, that way apps can enforce what languages they support
59
+ // and not be beholden to our SDK using a device language they don't want or expect
60
+ // react native apps are dumb and don't configure app languages correctly on iOS
61
+ // so we'll just use the preferred device language as that is the frequent expectation from this platform
62
+ let locale = options["locale"] as? String ?? Locale.preferredLanguages.first
58
63
  let themeSetId = options["themeSetId"] as? String
59
-
64
+
60
65
  var nfcAdapter: InquiryNfcAdapter? = nil
61
66
  #if canImport(PersonaNfc)
62
67
  nfcAdapter = PersonaNfcAdapter()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-persona",
3
3
  "title": "React Native Persona",
4
- "version": "2.11.0",
4
+ "version": "2.11.2",
5
5
  "description": "Launch a mobile native implementation of the Persona inquiry flow from React Native.",
6
6
  "homepage": "https://docs.withpersona.com/docs/react-native-sdk-integration",
7
7
  "bugs": "https://github.com/persona-id/persona-inquiry-sdk-public",