Jump to content
Vanar

Delphi 11.3: When I click on "Aliens" PUSH, my Ios application crashes!

Recommended Posts

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
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?

  • Thanks 1

Share this post


Link to post

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 by Vanar

Share this post


Link to post

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 by Vanar

Share this post


Link to post

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×