Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 927567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:52:28+00:00 2026-05-15T19:52:28+00:00

i use APNS Sharp library for my apple push notification. i have downloded from

  • 0

i use APNS Sharp library for my apple push notification. i have downloded from Here.i use sample test program provided by APNS sharp library without any modification.

it simply does not send any notification until i put break point at that line of code.
if i put break point. i just work fine.is this expected behaviour or i am doing something wrong. and also i am not getting any exception. thanks for any help.
here is the code

static void Main(string[] args)
{
    bool sandbox = true;
    string testDeviceToken = "Token";
    string p12File = "apn_developer_identity.p12";
    string p12FilePassword = "yourpassword";
    int sleepBetweenNotifications = 15000;
    string p12Filename = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, p12File);
    NotificationService service = new NotificationService(sandbox, p12Filename, p12FilePassword, 1);
    service.SendRetries = 5; 
    service.ReconnectDelay = 5000; //5 seconds
    service.Error += new NotificationService.OnError(service_Error);
    service.NotificationTooLong += new NotificationService.OnNotificationTooLong(service_NotificationTooLong);
    service.BadDeviceToken += new NotificationService.OnBadDeviceToken(service_BadDeviceToken);
    service.NotificationFailed += new NotificationService.OnNotificationFailed(service_NotificationFailed);
    service.NotificationSuccess += new NotificationService.OnNotificationSuccess(service_NotificationSuccess);
    service.Connecting += new NotificationService.OnConnecting(service_Connecting);
    service.Connected += new NotificationService.OnConnected(service_Connected);
    service.Disconnected += new NotificationService.OnDisconnected(service_Disconnected);
    Notification alertNotification = new Notification(testDeviceToken);
    alertNotification.Payload.Alert.Body = "Testing {0}...";
    alertNotification.Payload.Sound = "default";
    alertNotification.Payload.Badge = i;
    if (service.QueueNotification(alertNotification))
      Console.WriteLine("Notification Queued!");
    else
      Console.WriteLine("Notification Failed to be Queued!");
    Console.WriteLine("Cleaning Up...");

    service.Close();// if i dont put a break point in here, it simply does not send any notification

    service.Dispose();

}

i hope my question is clear…
Update: i am stuck here.please any one can help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:52:29+00:00Added an answer on May 15, 2026 at 7:52 pm

    i found out the problem. it was error in APNS SHARP library thread workflow.

    EDIT:
    i am calling this method after queueing all the notification.
    like
    service.start();
    and here is method

         public void Send()
        {
            foreach (NotificationConnection conn in this.notificationConnections)
            {
               // Console.Write("Start Sending");
                conn.start(P12File, P12FilePassword);
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my iPhone Apple push notifications (APNS) working in php on my own
Am trying to implement a Java program which sends an Apple Push Notification to
I am developing iPhone applications. I have to use push notification for my iPhone
Is there a sample project showing how to use APNS on the IPhone and
We use a data acquisition card to take readings from a device that increases
We use QuickBooks for financial management, and feed it from a variety of sources.
I've already managed to get the devicetoken from APNs. It's type of NSData. So
USE AdventureWorks2008R2; GO INSERT INTO myTestSkipField SELECT * FROM OPENROWSET(BULK 'C:\myTestSkipField-c.dat', FORMATFILE='C:\myTestSkipField.fmt' ) AS
use POSIX; my $test = ; my $elements = scalar(@array); my $tablecount = ($elements
i use a slideshow jquery plugin which automatically create a thumbnails path from my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.