I've written down all steps I took.
I suspect the b4i.p12 certificate used for sending messages is at fault.
So the steps I took:
Program started.
2015-09-05 21:21:57.776:INFO::main: Logging initialized @829ms
2015-09-05 21:21:57.890:INFOejs.Server:main: jetty-9.1.z-SNAPSHOT
2015-09-05 21:21:57.913:WARNejh.MimeTypes:main: java.util.MissingResourceException: Can't find bundle
for base name org/eclipse/jetty/http/encoding, locale en_US
2015-09-05 21:21:57.927:INFOejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@3c5a99da
{/,file:/C:/.../push/Objects/www,AVAILABLE}
2015-09-05 21:21:57.931:INFOejs.AbstractNCSARequestLog:main: Opened C:\...\push\Objects\logs\b4j-
2015_09_05.request.log
2015-09-05 21:21:58.006:INFOejs.ServerConnector:main: Started ServerConnector@56382dbb{HTTP/1.1}
{0.0.0.0:51044}
2015-09-05 21:21:58.007:INFOejs.Server:main: Started @1081ms
Emulated network latency: 100ms
server version: 0.95
server is listening on port: 51044
Feedback Socket connected.
feedback terminated
Socket connected.
Application_Inactive
Application_Active
Application_Active
Application_Pushtoken
3D0040A538E0D344AC264CF88E8D406D55E54EDF403F62179A5CDFD3562D8E72
05/09/2015 09:24:56>*******************************************************************************
05/09/2015 09:24:56>* Push Notifications - Alberto Iglesias - [email protected]
05/09/2015 09:24:56>*******************************************************************************
05/09/2015 09:24:56>Parametro: C:\...\PushiOS\PushVB.Net.exe
05/09/2015 09:25:25>[SendRequest]:Error:Authentication failed because the remote party has closed the transport stream.
05/09/2015 09:25:25>5/09/2015 21:25:25:3D0040A538E0D344AC264CF88E8D406D55E54EDF403F62179A5CDFD3562D8E72>{"aps": {"badge": 1,"alert": "test test","sound": "cat.caf"}}
05/09/2015 09:25:59>[SendRequest]:Error:Authentication failed because the remote party has closed the transport stream.
05/09/2015 09:25:59>5/09/2015 21:25:59:3D0040A538E0D344AC264CF88E8D406D55E54EDF403F62179A5CDFD3562D8E72>{"aps": {"badge": 1,"alert": "test test","sound": "cat.caf"}}
3D0040A538E0D344AC264CF88E8D406D55E54EDF403F62179A5CDFD3562D8E72
status=8
terminated
Trying to reconnect...
Socket connected.
I suspect the b4i.p12 certificate used for sending messages is at fault.
So the steps I took:
- I removed all certificates, identifiers and provisioning profiles from my developer account at Apple.
- Cleared the b4i keys folder.
- I open the b4i push client demo.
- Create private sign key.
- In my developer account I create:
- A new development certificate using the csr file.
- Save ios_development.cer in the b4i keyfolder.
- App ID with explicit AppID + Push Notifications enabled.
- ApplePush Notificationservice SSL (sandbox) development, using the csr + previous App ID.
- Save aps_development.cert in the b4i keyfolder.
- Generate ios provisioning profile development.
- Save pushdev.mobileprovision in the b4i keyfolder
- Save ios_development.cer in the b4i keyfolder.
- App ID with explicit AppID + Push Notifications enabled.
- ApplePush Notificationservice SSL (sandbox) development, using the csr + previous App ID.
- Save aps_development.cert in the b4i keyfolder.
- Generate ios provisioning profile development.
- Save pushdev.mobileprovision in the b4i keyfolder
- Next I return to b4i and change the name of the application under build configuration -> package to the same name used in de developer profile for generating the certificates.
Condition Symbols: Full
Change provisionFile in the header of the code to the correct filename.
Change provisionFile in the header of the code to the correct filename.
- Compile the application.
- Tools -> Build server -> Create push store
- In b4x I edit config.txt to point to the new push.keystore.
- Next I start the b4x server.
Program started.
2015-09-05 21:21:57.776:INFO::main: Logging initialized @829ms
2015-09-05 21:21:57.890:INFOejs.Server:main: jetty-9.1.z-SNAPSHOT
2015-09-05 21:21:57.913:WARNejh.MimeTypes:main: java.util.MissingResourceException: Can't find bundle
for base name org/eclipse/jetty/http/encoding, locale en_US
2015-09-05 21:21:57.927:INFOejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@3c5a99da
{/,file:/C:/.../push/Objects/www,AVAILABLE}
2015-09-05 21:21:57.931:INFOejs.AbstractNCSARequestLog:main: Opened C:\...\push\Objects\logs\b4j-
2015_09_05.request.log
2015-09-05 21:21:58.006:INFOejs.ServerConnector:main: Started ServerConnector@56382dbb{HTTP/1.1}
{0.0.0.0:51044}
2015-09-05 21:21:58.007:INFOejs.Server:main: Started @1081ms
Emulated network latency: 100ms
server version: 0.95
server is listening on port: 51044
Feedback Socket connected.
feedback terminated
Socket connected.
- The b4i test installs through the bidge on the device, starts, and logs a token.
Application_Inactive
Application_Active
Application_Active
Application_Pushtoken
3D0040A538E0D344AC264CF88E8D406D55E54EDF403F62179A5CDFD3562D8E72
- When I use the PushiOs tool to sent a push messages:
05/09/2015 09:24:56>*******************************************************************************
05/09/2015 09:24:56>* Push Notifications - Alberto Iglesias - [email protected]
05/09/2015 09:24:56>*******************************************************************************
05/09/2015 09:24:56>Parametro: C:\...\PushiOS\PushVB.Net.exe
05/09/2015 09:25:25>[SendRequest]:Error:Authentication failed because the remote party has closed the transport stream.
05/09/2015 09:25:25>5/09/2015 21:25:25:3D0040A538E0D344AC264CF88E8D406D55E54EDF403F62179A5CDFD3562D8E72>{"aps": {"badge": 1,"alert": "test test","sound": "cat.caf"}}
05/09/2015 09:25:59>[SendRequest]:Error:Authentication failed because the remote party has closed the transport stream.
05/09/2015 09:25:59>5/09/2015 21:25:59:3D0040A538E0D344AC264CF88E8D406D55E54EDF403F62179A5CDFD3562D8E72>{"aps": {"badge": 1,"alert": "test test","sound": "cat.caf"}}
- I've also tested with pushserver, which also fails
3D0040A538E0D344AC264CF88E8D406D55E54EDF403F62179A5CDFD3562D8E72
status=8
terminated
Trying to reconnect...
Socket connected.