Skip to content

Commit

Permalink
fix(analytics): setConsent(...) method did not work (#651)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Gessinger <jgessinger@aeins.de>
  • Loading branch information
AE1NS and A1Jan authored Jun 26, 2024
1 parent 8529291 commit 79894af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-lies-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@capacitor-firebase/analytics': patch
---

fix(analytics): Fixed setConsent signature issues
4 changes: 2 additions & 2 deletions packages/analytics/ios/Plugin/FirebaseAnalyticsPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ public class FirebaseAnalyticsPlugin: CAPPlugin {
}

@objc func setConsent(_ call: CAPPluginCall) {
guard let consentType = FirebaseAnalyticsHelper.mapStringToConsentType(call.getString("consentType")) else {
guard let consentType = FirebaseAnalyticsHelper.mapStringToConsentType(call.getString("type")) else {
call.reject(errorConsentTypeMissing)
return
}
guard let consentStatus = FirebaseAnalyticsHelper.mapStringToConsentStatus(call.getString("consentStatus")) else {
guard let consentStatus = FirebaseAnalyticsHelper.mapStringToConsentStatus(call.getString("status")) else {
call.reject(errorConsentStatusMissing)
return
}
Expand Down

0 comments on commit 79894af

Please sign in to comment.