IOS TNotification problem

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

Post Reply
Lena
BCBJ Master
BCBJ Master
Posts: 696
Joined: Sun Feb 06, 2011 1:28 pm

IOS TNotification problem

Post by Lena »

Hi.
I can not receive notification on iOS, neither when the application is minimized, nor when it is activated - under any circumstances. FMLocalNotificationPermission is set to true (Project -> Options -> Version Info). Breakpoints indicate that the try block executes, however I do not see notifications. The application was given permission to receive notifications. Tell me, please, what's missing?

Code: Select all

if (NotificationCenter1->Supported())
	{
	TNotification *myNotification = NotificationCenter1->CreateNotification();
 	__try {
			myNotification->Number = 1;
			myNotification->AlertBody = L"Hello.";
			myNotification->Name = "MyNotificationStart";
		      myNotification->FireDate = System::Dateutils::IncSecond(Now(), 600);
		      NotificationCenter1->ScheduleNotification(myNotification);
		  }
	   __finally
		   {
			myNotification->DisposeOf();
		   }
	}
Post Reply