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 8322257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:19:31+00:00 2026-06-08T23:19:31+00:00

Here is an issue that is giving me a real headache. We are developing

  • 0

Here is an issue that is giving me a real headache. We are developing a cross platform application where we need Push Notifications. We have a server syncing every app, and in case the app is not running on one device, we notify the latter if we need to. Push is working fine on the other platform.

The weird thing is that: notifications works well if the app has been opened recently. But after a few hours, the server needs to send at least two notifications (if it’s not more) before I can receive one on the device. If the app HAS been opened recently, everything words fine.

The problem can come from:
– The server side. our server API is in C# and we use “APNS Sharp” to send notification to Apple’s servers.
– Apple’s side (not likely i Guess)
– The iphone app. But then, why would I receive one from time to time ? I also noticed that sometime, I receive the notification, but then the blue bubble that pops on the screen disappear after a few seconds and even immediately sometimes.
Here is a snippet of my code in my App Delegate :

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 
    NSLog(@"Registering for remote notifications"); 
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
return YES;
}

- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken {

    NSString * tokenAsString = [[[[devToken description] 
                             stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]] 
                            stringByReplacingOccurrencesOfString:@" " withString:@""] retain];
    [self sendToken:tokenAsString];
NSLog(@"enregistré");
}

- (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err {
    NSLog(@"Error in registration. Error: %@", err);
}

The following function is a function of my own to send the device token to our server. No need to display this.
[self sendToken:tokenAsString];

Does anyone have ever heard of such an issue ? Do you think, based on the code snippet that it could come from the app or Apple’s servers ? Should we orientate our search more on the server side ?

Thanks a lot.

Pierre

EDIT

Turned out to be a server issue. Apple recommends to keep an open connection to their server to limit the amount of connect/disconnect request. We tried to open one at each time and now it is working properly.

  • 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-06-08T23:19:33+00:00Added an answer on June 8, 2026 at 11:19 pm

    For those who might be interested, this was a server issue. Apple recommends that we keep the connection open to avoid too many connections request.

    I’m not really sure how this API works, but we tried to open it once in a while instead (if not for every message) and it works like a charm now. Nothing was wrong in the config on the app above.

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having an issue here that I have tried everything I can think of but
I have a simple page here to demonstrate the issue that I am seeing.
I am stuck with a peculiar issue here. I have a script that basically
Here's the issue: I have 2 data contexts that I would like to do
Here's the issue: I have a list of App names that I want to
Here is my issue. I have a SearchViewModel that has a large number of
Currently in my application I have a single table that is giving me a
The code below is giving me some headache. It's a very simple application that
See here for my issue: http://jsfiddle.net/FvBqA/126/ My issue is that I want to be
I am having a strange issue that I can't seem to resolve. Here is

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.