Pushsharp 4.0 - Namespace not recognized "Pushbroker"

Asked

Viewed 56 times

0

I have the following problem, recently added to my server the lib PushSharp 4.0 to send notifications to Ios.

However with the code I have, I’m having the following error:

the type namespace name 'Pushbroker' could not be found

The code I have is this::

using PushSharp;
using PushSharp.Core;
using PushSharp.Apple;

var push = new PushBroker();

try
{
   var appleCert = File.ReadAllBytes(test);//Server.MapPath(test));

   push.RegisterAppleService(new ApplePushChannelSettings(true, appleCert, _iphoneCertPasswordV2));

   push.QueueNotification(new AppleNotification()
                .ForDeviceToken(device)//the recipient device id
                .WithAlert("Mensagem a enviar")//the message
                .WithBadge(1)
                .WithSound("sound.caf")
   );
}
catch (Exception ex)
{
    throw ex;
}

Why don’t you recognize the PushBroker? The same happens more down with AppleNotification().

  • @Taisbevalle errors of few lines is not necessary to format as code and quote together.

  • Thanks for the info, @diegofm

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.