0

I am trying to add an sdk call to my Xcode project, and in their documentation, they say:

"If you are using these API's you can become an observer for the following events:
NOTIFICATION_COMPLETED True/False - mail has completed with success/failure."

I managed to get this far:

[[NSNotificationCenter defaultCenter] addObserver: rootViewController
                                         selector: @selector(_NotificationCompleted:)
                                             name: NOTIFICATION_COMPLETED
                                           object: nil];

or, I assume that is correct... I am not sure about the nil on the end though.

anyway, I have no idea how to format my _NotificationCompleted function...

this is what I wrote:

void _NotificationCompleted(Boolean WasSuccessfullySent)
{
     if(WasSuccessfullySent)
     {
          // YAY!
     } else {
          // Boo!
     {
}

What am I doing wrong?

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0
- (void)_NotificationCompleted:(NSNotification *)notification {
     // your code goes here.
}
lambmj
  • 1,843
  • 2
  • 21
  • 27