Can not find protocol declaration for NSUserNotificationCenter in xcode 4.5

530 Views Asked by At

I am trying to implement a simple notification application, I have a xcode 4.5 on my machine. I have created a empty application and added a class which is derived from NSObject, but when i want to implement a NSUserNotificationCenter protocol for my class, compiler throwing the error : Cannot find protocol declaration for NSUserNotificationCenter. I did checked Foundation/foundation.h file and in that file if i try to go to the source of NSUserNotification.h file it says Symbol not found.

I am newbie in IPhone development, how do i make sure i have a right sdk/ framework for NSUserNotificationCenter.

Thanks in advance.

1

There are 1 best solutions below

1
On BEST ANSWER

You mention being new to iPhone developement, so I assume you are trying to use NSUserNotificationCenter in an iOS App.

NSUserNotification is part of Mac OSX SDK, and is used to display notifications in the notification center introduced in Mountain Lion.

If you want to implement similar functionality on iOS you have to use UILocalNotification for local notifications. Check Apple documentation: Local and Push Notification Programming Guide.