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
'OneSignal' does not contain a definition for 'SetSubscription' #177
I am creating a toggle where it calls OneSignal.SetSubscription(false); to either enable or disable push notifications.
I am using Com.OneSignal v.3.6.0 (newest)
This is the error: 'OneSignal' does not contain a definition for 'SetSubscription'
Environment
Xamarin.Forms v4.3.0.991211 (newest)
NuGet package.
Com.OneSignal v3.6.0 (newest)
Steps to Reproduce Issue:
Create a simple blank Xamarin Forms project, install Com.OneSignal v3.6.0
Open app.xaml.cs or any .xaml.cs page
Add using Com.OneSignal; at the top of the page.
Add OneSignal.SetSubscription(false);
The error occurs even if placed after OneSignal.Current.StartInit("onesignal-app-id-here").EndInit();
You will get the error saying 'OneSignal' does not contain a definition for 'SetSubscription'.
Description: When using the following function in Xamarin Forms an error is called. I am following the guide that has been created and can be referenced here: https://documentation.onesignal.com/docs/xamarin-sdk#section--setsubscription-
I am creating a toggle where it calls OneSignal.SetSubscription(false); to either enable or disable push notifications.
I am using Com.OneSignal v.3.6.0 (newest)
This is the error: 'OneSignal' does not contain a definition for 'SetSubscription'
Environment
Steps to Reproduce Issue: Create a simple blank Xamarin Forms project, install Com.OneSignal v3.6.0 Open app.xaml.cs or any .xaml.cs page Add using Com.OneSignal; at the top of the page. Add OneSignal.SetSubscription(false);
The error occurs even if placed after OneSignal.Current.StartInit("onesignal-app-id-here").EndInit();
You will get the error saying 'OneSignal' does not contain a definition for 'SetSubscription'.
Anything else: Unable to build app.