expo-local-authentication 13.6.0 → 13.8.0

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.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,19 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 13.8.0 — 2023-11-14
14
+
15
+ ### 🛠 Breaking changes
16
+
17
+ - Bumped iOS deployment target to 13.4. ([#25063](https://github.com/expo/expo/pull/25063) by [@gabrieldonadel](https://github.com/gabrieldonadel))
18
+ - On `Android` bump `compileSdkVersion` and `targetSdkVersion` to `34`. ([#24708](https://github.com/expo/expo/pull/24708) by [@alanjhughes](https://github.com/alanjhughes))
19
+
20
+ ## 13.7.0 — 2023-10-17
21
+
22
+ ### 🛠 Breaking changes
23
+
24
+ - Dropped support for Android SDK 21 and 22. ([#24201](https://github.com/expo/expo/pull/24201) by [@behenate](https://github.com/behenate))
25
+
13
26
  ## 13.6.0 — 2023-09-04
14
27
 
15
28
  ### 🎉 New features
@@ -3,15 +3,20 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '13.6.0'
6
+ version = '13.8.0'
7
7
 
8
- buildscript {
9
- def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
10
- if (expoModulesCorePlugin.exists()) {
11
- apply from: expoModulesCorePlugin
12
- applyKotlinExpoModulesCorePlugin()
8
+ def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
9
+ if (expoModulesCorePlugin.exists()) {
10
+ apply from: expoModulesCorePlugin
11
+ applyKotlinExpoModulesCorePlugin()
12
+ // Remove this check, but keep the contents after SDK49 support is dropped
13
+ if (safeExtGet("expoProvidesDefaultConfig", false)) {
14
+ useExpoPublishing()
15
+ useCoreDependencies()
13
16
  }
17
+ }
14
18
 
19
+ buildscript {
15
20
  // Simple helper that allows the root project to override versions declared by this library.
16
21
  ext.safeExtGet = { prop, fallback ->
17
22
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
@@ -35,23 +40,44 @@ buildscript {
35
40
  }
36
41
  }
37
42
 
38
- afterEvaluate {
39
- publishing {
40
- publications {
41
- release(MavenPublication) {
42
- from components.release
43
+ // Remove this if and it's contents, when support for SDK49 is dropped
44
+ if (!safeExtGet("expoProvidesDefaultConfig", false)) {
45
+ afterEvaluate {
46
+ publishing {
47
+ publications {
48
+ release(MavenPublication) {
49
+ from components.release
50
+ }
43
51
  }
44
- }
45
- repositories {
46
- maven {
47
- url = mavenLocal().url
52
+ repositories {
53
+ maven {
54
+ url = mavenLocal().url
55
+ }
48
56
  }
49
57
  }
50
58
  }
51
59
  }
52
60
 
53
61
  android {
54
- compileSdkVersion safeExtGet("compileSdkVersion", 33)
62
+ // Remove this if and it's contents, when support for SDK49 is dropped
63
+ if (!safeExtGet("expoProvidesDefaultConfig", false)) {
64
+ compileSdkVersion safeExtGet("compileSdkVersion", 34)
65
+
66
+ defaultConfig {
67
+ minSdkVersion safeExtGet("minSdkVersion", 23)
68
+ targetSdkVersion safeExtGet("targetSdkVersion", 34)
69
+ }
70
+
71
+ publishing {
72
+ singleVariant("release") {
73
+ withSourcesJar()
74
+ }
75
+ }
76
+
77
+ lintOptions {
78
+ abortOnError false
79
+ }
80
+ }
55
81
 
56
82
  def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
57
83
  if (agpVersion.tokenize('.')[0].toInteger() < 8) {
@@ -67,25 +93,17 @@ android {
67
93
 
68
94
  namespace "expo.modules.localauthentication"
69
95
  defaultConfig {
70
- minSdkVersion safeExtGet("minSdkVersion", 21)
71
- targetSdkVersion safeExtGet("targetSdkVersion", 33)
72
96
  versionCode 30
73
- versionName "13.6.0"
74
- }
75
- lintOptions {
76
- abortOnError false
77
- }
78
- publishing {
79
- singleVariant("release") {
80
- withSourcesJar()
81
- }
97
+ versionName "13.8.0"
82
98
  }
83
99
  }
84
100
 
85
101
  dependencies {
86
- implementation project(':expo-modules-core')
102
+ // Remove this if and it's contents, when support for SDK49 is dropped
103
+ if (!safeExtGet("expoProvidesDefaultConfig", false)) {
104
+ implementation project(':expo-modules-core')
105
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
106
+ }
87
107
 
88
108
  implementation "androidx.biometric:biometric:1.2.0-alpha04"
89
-
90
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
91
109
  }
@@ -87,10 +87,6 @@ class LocalAuthenticationModule : Module() {
87
87
  }
88
88
 
89
89
  AsyncFunction("authenticateAsync") { options: AuthOptions, promise: Promise ->
90
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
91
- promise.reject("E_NOT_SUPPORTED", "Cannot display biometric prompt on android versions below 6.0", null)
92
- return@AsyncFunction
93
- }
94
90
  val fragmentActivity = currentActivity as? FragmentActivity
95
91
  if (fragmentActivity == null) {
96
92
  promise.reject(Exceptions.MissingActivity())
@@ -311,19 +307,7 @@ class LocalAuthenticationModule : Module() {
311
307
  // supported prior to API 30.
312
308
  // https://developer.android.com/reference/androidx/biometric/BiometricManager#canAuthenticate(int)
313
309
  private val isDeviceSecure: Boolean
314
- get() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
315
- keyguardManager.isDeviceSecure
316
- } else {
317
- // NOTE: `KeyguardManager#isKeyguardSecure()` considers SIM locked state,
318
- // but it will be ignored on falling-back to device credential on biometric authentication.
319
- // That means, setting level to `SECURITY_LEVEL_SECRET` might be misleading for some users.
320
- // But there is no equivalent APIs prior to M.
321
- // `andriodx.biometric.BiometricManager#canAuthenticate(int)` looks like an alternative,
322
- // but specifying `BiometricManager.Authenticators.DEVICE_CREDENTIAL` alone is not
323
- // supported prior to API 30.
324
- // https://developer.android.com/reference/androidx/biometric/BiometricManager#canAuthenticate(int)
325
- keyguardManager.isKeyguardSecure
326
- }
310
+ get() = keyguardManager.isDeviceSecure
327
311
 
328
312
  private fun convertErrorCode(code: Int): String {
329
313
  return when (code) {
@@ -10,17 +10,17 @@ Pod::Spec.new do |s|
10
10
  s.license = package['license']
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
- s.platform = :ios, '13.0'
13
+ s.platform = :ios, '13.4'
14
14
  s.swift_version = '5.4'
15
15
  s.source = { git: 'https://github.com/expo/expo.git' }
16
16
  s.static_framework = true
17
17
 
18
18
  s.dependency 'ExpoModulesCore'
19
19
 
20
- # Swift/Objective-C compatibility
21
- s.pod_target_xcconfig = {
22
- 'DEFINES_MODULE' => 'YES',
23
- 'SWIFT_COMPILATION_MODE' => 'wholemodule'
20
+ # Swift/Objective-C compatibility
21
+ s.pod_target_xcconfig = {
22
+ 'DEFINES_MODULE' => 'YES',
23
+ 'SWIFT_COMPILATION_MODE' => 'wholemodule'
24
24
  }
25
25
 
26
26
  if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-local-authentication",
3
- "version": "13.6.0",
3
+ "version": "13.8.0",
4
4
  "description": "Provides an API for FaceID and TouchID (iOS) or the Fingerprint API (Android) to authenticate the user with a face or fingerprint scan.",
5
5
  "main": "build/LocalAuthentication.js",
6
6
  "types": "build/LocalAuthentication.d.ts",
@@ -46,5 +46,5 @@
46
46
  "peerDependencies": {
47
47
  "expo": "*"
48
48
  },
49
- "gitHead": "79607a7325f47aa17c36d266100d09a4ff2cc544"
49
+ "gitHead": "3142a086578deffd8704a8f1b6f0f661527d836c"
50
50
  }