iOS Question B4X push issue

wl

Well-Known Member
Licensed User
Longtime User
I'm running the the B4X push server and iOS app and the push notification does not get deliverd (status 8): this seems to have something to do with an invalid token ?

This is what I have
- development certificates and APN certificate
- non wildcard app ID

A release build on my Iphone through the B4I Builder.

When the IOS app starts my server does recognize the connection ans shows Token added: 0A...
But when I send a mesage to my server (http://domain.tld:51044/send?password=123&text=Message to send) I get a status = 8

The server connects to gateway.sandbox.push.apple.com / feedback.sandbox.push.apple.com

When I change my config.txt to connect to gateway.push.apple.com / feedback.push.apple.com the server keeps trying to connect ...

I removed the SQL lite database files a few times ...

Thanks
 

wl

Well-Known Member
Licensed User
Longtime User
I installed the app by hooking up on my Mac and build/deployed the app using Xcode: this works !

Why isn't it working using the B4iBuilder ?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I installed the app by hooking up on my Mac and build/deployed the app using Xcode: this works !

Why isn't it working using the B4iBuilder
It doesn't matter how the app is installed. The problem is somewhere else.

Tips:
1. Only use distribution certificates (ad hoc).
2. Firebase is the recommended push backend for new projects.
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
Thanks,

I'm using development certificates. Perhaps that's the issue ?

I created new certificates etc and now I have exactly the same issue with an XCode build: status error =8 and no notifications ... ??

As far as Firebase is concerned ... As I understand for iOS/Android it is using the native push mechanism which is also used by the B4X push framework. So it adds an additional layer / dependency on an external party (google) (which is an additional risk) ?

What is the benefit in using it then ? (hence my other question on the forum). I read Firebase supports messages to be sent between clients without a need for a server process (I guess this is implemeneted in the Google backend), but I do not need this functionality and I do have access to my own B4J server/backend

Thanks
 
Last edited:
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
I tried it yesterday but had some issues with the distribution certificate.

Is this what I should have then (using push notifications) ?

- iOS distribution certificate
- APNs DevelopmentiOS
- non wildcard app id
- provisioning profile for this appid and the distribution certificate

Thanks
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
thanks, should I use the sandbox gateway or the production gateway in that case ?
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
For those facing the same issues:
you need:
- iOS Distribution certificate
- non-wildcard appID, push notifications enabled and a Production SSL certificate created
- an distribution, ad-hoc provisioning profile

In the config.txt of the push server you will need to set the production URL's (so those without "sandbox" in their names - see comment in config.txt)
 
Upvote 0
Top