Can [[HTNotifier sharedNotifier] checkForNoticesAndReportIfReachable] be called directly?

Mike Ho's Avatar

Mike Ho

06 May, 2011 06:16 PM

We have an internal (deployed via the Apple Enterprise App program) application deployed on iPod Touches in the field, so we have no guarantee as to when internet connectivity is available.

Often times, our users will already be logged into the application when they gain wifi access to sync data back to our server. Having HopToad check for and upload crash notices upon app launch is fine... but we really need to do an explicit check & upload when our user does a sync. I noticed that there is a private checkForNoticesAndReportIfReachable method.

Is an explicit call to [[HTNotifier sharedNotifier] checkForNoticesAndReportIfReachable] in our "performSync" method an appropriate approach to do this? I tried it and it worked fine, but the fact that the method is categorized as (private) is a bit concerning. Is this something that may not be supported in the future? Or if it is the correct approach, can you update the library so that's it's not longer categorized as (private)? Or alternatively, is there a better/safer approach to doing this?


  1. 2 Posted by calebdavenport on 06 May, 2011 08:59 PM

    calebdavenport's Avatar

    The notifier will post notices automatically as the result of one key event at this moment. It posts whenever a UIApplicationDidBecomeActiveNotification is sent AND the service is reachable. So, if the service is not reachable, nothing will happen. But the first time the app comes to the foreground and hoptoad is reachable, it will post notices. More information about that event can be found here That should cover most cases. It does need to be enhanced to post in the event that it is already active and the reachability status changes. That is on my to-do list.

    The current method for triggering a post is private, only in the sense that we reserve the right to change it without warning or providing backwards compatibility. Since it is open source you are of course free to use those any of those methods, or even move the declaration into the interface to keep the compiler happy. Just keep an eye out for updates to the notifier and make sure that changes are still compatible with your app. I can say that the next few updates I have planned don't have any need to change the name or functionality surrounding that method.

  2. 3 Posted by Mike Ho on 10 May, 2011 09:35 PM

    Mike Ho's Avatar

    Got it... thanks so much for your help!

  3. Harold Gimenez closed this discussion on 11 May, 2011 01:11 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac