@capawesome/capacitor-age-signals 0.4.0 → 0.4.1

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.
@@ -103,21 +103,26 @@ import DeclaredAgeRange
103
103
 
104
104
  let declaration: AgeRangeDeclaration?
105
105
  if #available(iOS 26.2, *), let value = range.ageRangeDeclaration {
106
- if #available(iOS 26.5, *), value == .confirmed {
106
+ switch value {
107
+ case .selfDeclared:
108
+ declaration = .selfDeclared
109
+ case .guardianDeclared:
110
+ declaration = .guardianDeclared
111
+ case .checkedByOtherMethod, .guardianCheckedByOtherMethod,
112
+ .governmentIDChecked, .guardianGovernmentIDChecked,
113
+ .paymentChecked, .guardianPaymentChecked:
107
114
  declaration = .confirmed
108
- } else {
109
- switch value {
110
- case .selfDeclared:
111
- declaration = .selfDeclared
112
- case .guardianDeclared:
113
- declaration = .guardianDeclared
114
- case .checkedByOtherMethod, .guardianCheckedByOtherMethod,
115
- .governmentIDChecked, .guardianGovernmentIDChecked,
116
- .paymentChecked, .guardianPaymentChecked:
115
+ default:
116
+ // `.confirmed` requires the iOS 26.5 SDK (Xcode 26.5, Swift 6.3.2).
117
+ #if compiler(>=6.3.2)
118
+ if #available(iOS 26.5, *), value == .confirmed {
117
119
  declaration = .confirmed
118
- default:
120
+ } else {
119
121
  declaration = nil
120
122
  }
123
+ #else
124
+ declaration = nil
125
+ #endif
121
126
  }
122
127
  } else {
123
128
  declaration = nil
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capawesome/capacitor-age-signals",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Capacitor plugin to use the Play Age Signals API to retrieve age-related signals for users.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -33,7 +33,7 @@
33
33
  "url": "https://opencollective.com/capawesome"
34
34
  }
35
35
  ],
36
- "homepage": "https://capawesome.io/plugins/age-signals/",
36
+ "homepage": "https://capawesome.io/docs/plugins/age-signals/",
37
37
  "keywords": [
38
38
  "capacitor",
39
39
  "plugin",
@@ -65,7 +65,6 @@
65
65
  "@capacitor/ios": "8.0.0",
66
66
  "@ionic/eslint-config": "0.4.0",
67
67
  "eslint": "8.57.0",
68
- "prettier": "3.4.2",
69
68
  "prettier-plugin-java": "2.6.7",
70
69
  "rimraf": "6.1.2",
71
70
  "rollup": "4.53.3",