Vanar 2 Posted November 23, 2023 My iOS application is configured to accept PUSH. When I accept "my" PUSH intended for my application, everything works fine, my behavior logic works. When my application is open, when I click on “foreign” (for other applications) PUSH, my application closes abnormally. Tell me, what am I doing wrong? procedure TFmMain.FormCreate(Sender: TObject); begin ... TMessageManager.DefaultManager.SubscribeToMessage(TPushRemoteNotificationMessage, PushRemoteNotificationMessageHandler); PUSHMessage := ''; ... end; Procedure TFmMain.PushRemoteNotificationMessageHandler(const Sender: TObject; const AMessage: TMessage); Begin If AMessage Is TPushRemoteNotificationMessage Then Begin PUSHMessage := TPushRemoteNotificationMessage(AMessage).Value.Notification; End; end; The form contains TNotificationCenter; procedure TFmMain.NotificationCenter1ReceiveLocalNotification(Sender: TObject; ANotification: TNotification); begin // Some actions end; How can I process only “my own” PUSH and ignore “others”? Even if NotificationCenter1ReceiveLocalNotification(Sender: TObject; ANotification: TNotification) is empty, When I click on "Aliens" PUSH, my application crashes! Share this post Link to post
Dave Nottage 557 Posted November 23, 2023 4 minutes ago, Vanar said: When my application is open, when I click on “foreign” (for other applications) PUSH, my application closes abnormally. There is no reason for your application to do anything if you tap a notification that is meant for other applications. What do you mean by "closes abnormally"? Does it crash with no error messages? Have you used the Console app to check for log messages that might help determine why your app crashes? 1 Share this post Link to post
Vanar 2 Posted November 23, 2023 (edited) What do you mean by "closes abnormally"? - the application crashes. Does the application crash without error messages? - Crashes without error messages Have you used the Console application to check the log messages that can help determine why your application is crashing? -I used it, but there are a lot of incomprehensible things there Here's the script: 1. Open the application 2. A message arrived from a telegram 3. Click on PUSH messages (a long request to immediately respond in a telegram) 4. And the application crashes Look at the console in the attachment Console.txt Edited November 23, 2023 by Vanar Share this post Link to post
Vanar 2 Posted November 23, 2023 (edited) After many attempts, I think that the application crashes only when you long press "Aliens" PUSH. When you long press "Aliens" PUSH, additional windows appear... Edited November 24, 2023 by Vanar Share this post Link to post
Vanar 2 Posted November 24, 2023 It's decided! If anyone is interested: When you long press PUSH, the virtual keyboard is activated! And I have an event attached to OnVirtualKeyboardShown() ... Share this post Link to post