fix:1、更换项目,使用winter来创建

This commit is contained in:
2026-04-22 11:13:16 +08:00
parent 173cfb2dc9
commit 83ff9f71ad
7375 changed files with 209752 additions and 157557 deletions
+37 -17
View File
@@ -10,26 +10,45 @@ namespace AppsFlyerSDK
// This class should be used to notify and record the user's applicability
// under GDPR, their general consent to data usage, and their consent to personalized
// advertisements based on user data.
// Note that the consent for data usage and ads personalization pair is only applicable when the user is
// subject to GDPR guidelines. Therefore, the following factory methods should be used accordingly:
// - Use [forGDPRUser] when the user is subject to GDPR.
// - Use [forNonGDPRUser] when the user is not subject to GDPR.
// @property isUserSubjectToGDPR Indicates whether GDPR regulations apply to the user (true if the user is
// a subject of GDPR). It also serves as a flag for compliance with relevant aspects of DMA regulations.
// @property hasConsentForDataUsage Indicates whether the user has consented to the use of their data for advertising
// purposes under both GDPR and DMA guidelines (true if the user has consented, nullable if not subject to GDPR).
// @property hasConsentForAdsPersonalization Indicates whether the user has consented to the use of their data for
// personalized advertising within the boundaries of GDPR and DMA rules (true if the user has consented to
// personalized ads, nullable if not subject to GDPR).
/// ## Properties:
/// - `isUserSubjectToGDPR` (optional) - Indicates whether GDPR regulations apply to the user.
/// This may also serve as a general compliance flag for other regional regulations.
/// - `hasConsentForDataUsage` (optional) - Indicates whether the user consents to the processing
/// of their data for advertising purposes.
/// - `hasConsentForAdsPersonalization` (optional) - Indicates whether the user consents to the
/// use of their data for personalized advertising.
/// - `hasConsentForAdStorage` (optional) - Indicates whether the user consents to ad-related storage access.
///
/// **Usage Example:**
/// ```csharp
/// var consent = new AppsFlyerConsent(
/// isUserSubjectToGDPR: true,
/// hasConsentForDataUsage: true,
/// hasConsentForAdsPersonalization: false,
/// hasConsentForAdStorage: true
/// );
/// **Deprecated APIs:**
/// - `ForGDPRUser(...)` and `ForNonGDPRUser(...)` should no longer be used.
/// - Use `new AppsFlyerConsent(...)` instead with relevant consent fields.
///
/// </summary>
public class AppsFlyerConsent
{
public bool isUserSubjectToGDPR { get; private set; }
public bool hasConsentForDataUsage { get; private set; }
public bool hasConsentForAdsPersonalization { get; private set; }
public bool? isUserSubjectToGDPR { get; private set; }
public bool? hasConsentForDataUsage { get; private set; }
public bool? hasConsentForAdsPersonalization { get; private set; }
public bool? hasConsentForAdStorage { get; private set; }
public AppsFlyerConsent( bool? isUserSubjectToGDPR = null, bool? hasConsentForDataUsage = null, bool? hasConsentForAdsPersonalization = null, bool? hasConsentForAdStorage = null)
{
this.isUserSubjectToGDPR = isUserSubjectToGDPR;
this.hasConsentForDataUsage = hasConsentForDataUsage;
this.hasConsentForAdsPersonalization = hasConsentForAdsPersonalization;
this.hasConsentForAdStorage = hasConsentForAdStorage;
}
[Obsolete("Use the new constructor with optional booleans instead.")]
private AppsFlyerConsent(bool isGDPR, bool hasForDataUsage, bool hasForAdsPersonalization)
{
isUserSubjectToGDPR = isGDPR;
@@ -37,15 +56,16 @@ namespace AppsFlyerSDK
hasConsentForAdsPersonalization = hasForAdsPersonalization;
}
[Obsolete("Use new AppsFlyerConsent(...) instead.")]
public static AppsFlyerConsent ForGDPRUser(bool hasConsentForDataUsage, bool hasConsentForAdsPersonalization)
{
return new AppsFlyerConsent(true, hasConsentForDataUsage, hasConsentForAdsPersonalization);
}
[Obsolete("Use new AppsFlyerConsent(...) instead.")]
public static AppsFlyerConsent ForNonGDPRUser()
{
return new AppsFlyerConsent(false, false, false);
return new AppsFlyerConsent(false);
}
}
}