OneSignal / OneSignal-Xamarin-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
Other
105 stars 50 forks source link

RequiresPrivacyConsent when called throws exception #325

Closed GBrienza closed 2 years ago

GBrienza commented 2 years ago

Hi I am using

  1. Xamarin Forms 5.0.0.2337
  2. OneSignalSDK.Xamarin (4.1.2)

calling OneSignal.Default.RequiresPrivacyConsent=false; will throw error as below:

Error System.TypeLoadException Message=Could not resolve type with token 01000027 from typeref (expected class 'Com.OneSignal.iOS.OSPermissionObserver' in assembly 'OneSignal.iOS.Binding, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null') assembly:OneSignal.iOS.Binding, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null type:Com.OneSignal.iOS.OSPermissionObserver member:(null)

jkasten2 commented 2 years ago

@GBrienza Thanks for reporting this issue. The "Could not resolve type" error does not look related to OneSignal.Default.RequiresPrivacyConsent you are setting. Have you changed anything else at the same time?

Do you see this issue with Android? Or iOS only?

You don't need to set OneSignal.Default.RequiresPrivacyConsent to false as this is the default.

GBrienza commented 2 years ago

@jkasten2 thanks for your reply.Closing it as I revisited the all Solution and the iOS one was the only one still referencing "Com.OneSignal" error on my part as I had thought I had replaced all of them. Closed and thanks for replying!