iOS Question Push Notification

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
Hi,
I found a link that explanes how to create a PHP procedure to send Push Notification to a IOS iphone.
The link is:

http://www.francescoficetola.it/201...-e-ricevere-le-notifiche-push-in-una-app-ios/

This page said that I need to ask the authorization to send notification and I must put on my App, in AppDelegate, a line of code for Consent and App Record to push notifications:

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

It asks the user if he want notification

Which is the syntax in B4I? Where can i put this code? Where is AppDelegate in a B4I App?

Are there examples of app with push notification?

Thans
Marco
 

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,

from my experince using PHP for sending push notifications it not the best idea, one big problem: repeatedly open and close connections can been seen as a DDos attack. I recommend you to use Firebase, it's really simple to set up and very reliable. Firebase has also a Http Api, so it should be simple to send request from a PHP script.

Which is the syntax in B4I?
Go over this tutorial, everything is explained there.
https://www.b4x.com/android/forum/threads/push-notifications.48562/
Jan
 
Upvote 0

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
OK I'm Trying.
But in the Tutorial Erel saysabout to Create a provision file with the new App ID: The last step is done in the IDE by clicking on Tools - Build Server - Create Push Keystore.
I have B4I 3.6 and I have:
Tools - Build Server - Create Push store - B4X Push Server
or
Tools - Build Server - Create Push store - Firebase Service

Both have an error
upload_2017-7-29_17-24-55.png


This is my keys folder content:

upload_2017-7-29_17-30-31.png


What may I do?
(When solved it i can study Firebse....)
Thans
Marco
 
Upvote 0

JanPRO

Well-Known Member
Licensed User
Longtime User
While creating the push store, you have to move the file aps.cer or aps_development (it depends on whether you want to build it for development or release) to another folder.

Jan
 
Upvote 0

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
I created a Distribution aps certificate and I entered them into Project Attributes Region of App:

#ProvisionFile: ServiceH24Dist.mobileprovision
#CertificateFile: aps.cer

When i compile app I have this:

upload_2017-7-30_17-8-23.png


How can I use aps certificate?
Thans
Marco
 
Upvote 0

Marco Maria Vilucchi

Active Member
Licensed User
Longtime User
Sorry,
but i don't know what's happening.

upload_2017-7-31_15-39-14.png


as a development provisioning profile:

upload_2017-7-31_15-41-7.png


I tryied also with a distribution provisioning profile but htn i can only download the apk file...
 
Upvote 0
Top