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

SetEmail method missing #90

Closed ghost closed 6 years ago

ghost commented 6 years ago

I noticed that there's no way to set the user email because the SetEmail method that are available for other platforms does not exist in the Xamarin SDK.

ghost commented 6 years ago

I had closed the issue before because I thought I was using an outdated version of the nuget package but now I confirmed I'm on version 3.1.1 and the method is still missing. I opened the nupkg file and extracked the Com.OneSignal.Abstractions.dll that was inside the lib/netstandard1.0 folder and noticed that the version of this dll is 3.0.1. Opening it in Visual Studio object browser I noticed that the SetMail method is not present in the IOneSignal interface. As the method is present in the source code, I think that maybe the problem is the creation of the nuget package.

Screenshot

Nightsd01 commented 6 years ago

Hi @matheusfernal

That is quite bizarre. It looks like we forgot to update the DLL version number in the last release, but the package version number should be consistent.

We just created a new Xamarin project and installed the OneSignal SDK via nuget and we are able to see the SetEmail() method just fine.

Can you right-click on OneSignal in the Packages folder and make sure it shows the correct version (3.1.1)?

alt text

ghost commented 6 years ago

Hello @Nightsd01. Thanks for the reply.

I've just created a new Xamarin project and installed the package via NuGet. Again the SetEmail method was not available for. As you can see in the picture, I'm using version 3.1.1.

capturar

Nightsd01 commented 6 years ago

@matheusfernal does your application support Windows phone? We have dropped support for the windows phone platform. I’m not sure if that’s related.

Otherwise, I am unable to reproduce your issue. Could you possibly zip up an example project that demonstrates this problem?

ghost commented 6 years ago

@Nightsd01 My app doesn't support Windows Phone. Just iOS and Android. I'm sending the solution of the screenshot above. Inside the directory there is the nupkg file I've downloaded from nuget.org and installed using Install-Package Com.OneSignal -Source C:\PathToThePackageDir\ although for me there was no difference installing it from local or online source. Either way the method was missing.

TesteOneSignal.zip

Nightsd01 commented 6 years ago

@matheusfernal Sorry for the delay here - we have been investigating this issue quite extensively and we've been able to reproduce it ourselves. We believe it's an issue with cached DLL's not being updated when we use msbuild to build the project, or potentially an issue when packing the nuget package. Either way we will be continuing to investigate and expect to have a fix soon.

Nightsd01 commented 6 years ago

@matheusfernal this was quite a difficult issue to debug, but it has finally been resolved in the new release (3.2.0).

ghost commented 6 years ago

Thanks! I've just updated my package and it's working as expected.