views:

224

answers:

1

Hello!

I have read THIS tutorial about creating Push nodes and posting/subscribing to notifications. The only problem I have met is that it seems that notificationconf unable to create that node...

My first question: are nodename (parameter of notificationconf tool) and notificationName (NSString which I use from app) the same things?

Second:

notificationconf createnode push.example.com BFMyTestPushhNotification beefon
Enter password: // password from Open Directory for user beefon - it is Admin of the 10.6 server
2010-01-24 13:24:58.916 notificationconf[15221:903] created XMPP session
2010-01-24 13:24:58.931 notificationconf[15221:903] Connecting to push.example.com:5222 with user [email protected]/TestPubsub, security = 2 ...
2010-01-24 13:24:59.130 notificationconf[15221:903] sessionCallback (event 1)
2010-01-24 13:24:59.130 notificationconf[15221:903] Session stopped (event 1)

What I do wrong? And posting notification from app does nothing...

Thanks for any help!

+5  A: 

Notifications are easy to use on the same node, but harder across a network. Especially, I don't think too many people are actually using it, as Google search results are scarce :) Now, regarding your questions:

For 1: yes, you need to have matching nodename and notificationName. The man page says so (although not crystal-clear):

 createnode hostname nodename username
         Creates a node on the server to send notifications using.  Before
         a client can subscribe to notifications with a given name, the
         server must be configured with a node with a matching name.

So, first you have to create the node, then you can listen to notifications of a given name. Otherwise, you don't get the notifications.

For 2: I get this error when there is no XMMP daemon running (i.e. port 5222 is closed). Is that port open for you? (check the output of nmap -p 5222 push.example.com).

FX
Host is up (0.0071s latency).\n PORT STATE SERVICE\n 5222/tcp open unknown\n Nmap done: 1 IP address (1 host up) scanned in 0.21 seconds\nThis is output of nmap. Still no luck getting notifications to work.
beefon
What do the server log say? You could also listen to the raw network traffic (with tcpdump) and check what happens.
FX
To be honest, the fact that a google search for "notificationconf createnode" (with the quotes) only turn up your questions on the Apple forums smells oh-so-bad.
FX
Well, now iChat service logs say: connect -> Password verification failed -> disconnect jid=unbound, packets: 0. It's strange because earlier logs were just: connect -> disconnect jid=unbound, packets: 0. Without password error. What is the username in createnode command? And in setpass command? I suppose that username must be server administrator's username, am I right?
beefon
I think it has to be a valid XMMP user, with rights to create nodes. Maybe this is to check on your iChat server configuration.Unfortunately, it's hard to dig further because 1. the doc is so scarce, and 2. it isn't in the opensource part of the OS.
FX
Do you have a working notifications on your system?
beefon