Reputation: 841
I have a CFUserNotificationDisplayAlert setup like this:
CFOptionFlags cfRes;
CFUserNotificationDisplayAlert(5, kCFUserNotificationNoteAlertLevel,
NULL, NULL, NULL,
CFSTR("Okay"),
CFSTR("Stop!"),
&cfRes);
switch (cfRes)
{
case kCFUserNotificationDefaultResponse:
strTest = CFSTR("Default response");
break;
case kCFUserNotificationAlternateResponse:
strTest = CFSTR("Alternate response");
break;
}
With this code I get this error:
use of undeclared identifier kCFUserNotifactationDefualtResponce (And the other kCF*'s)
Any ideas? I have the following imported:
#import <CoreFoundation/CoreFoundation.h>
#import <CoreData/CoreData.h>
#import <UIKit/UIKit.h>
Upvotes: 2
Views: 777
Reputation: 1155
The CFUserNotification API is not available on iOS. Looks to me like you copied that bit of code from a Mac App.
Quoted from CodaFi's comment above so question can be marked as answered as per: https://meta.stackexchange.com/questions/54718/how-should-i-handle-questions-which-are-answered-in-the-comments
Upvotes: 1