iOS InterprocessConnection Callbacks never called


#1

HI

I’m using Juce as the network backend for an iOS application that connects to a Juce desktop application

I’ve created an InterprocessConnection class which connects and I’m having no problems sending messages from the iOS textfield to my desktop application. However I’m finding the desktop application is completely unable to send messages to the iPhone Simulator, the connection made/lost callbacks are also not being called.

Have I missed something in the set up process??


#2

I’ve never tried that class on iOS… The code should work just like any other posix OS, but maybe there’s some firewalling going on because of security stuff…?

Have you traced through the socket code to make sure that sockets are being opened successfully?


#3

[quote=“jules”]I’ve never tried that class on iOS… The code should work just like any other posix OS, but maybe there’s some firewalling going on because of security stuff…?

Have you traced through the socket code to make sure that sockets are being opened successfully?[/quote]

My guess is there is some funky firewalling action going on blocking incoming data

I’m able to send messages out no problem, so I’m sure the socket is opening correctly (that is what you were asking right?)

Also, barely related I apologise, but I’m trying to make an OwnedArray of my interprocessconnection class which is called RemoteInterprocessConnection using
RemoteInterprocessConnection.h

otherFile.h

[code]
#include “RemoteInterprocessConnection.h”

OwnedArray <RemoteInterprocessConnection, CriticalSection> connections;[/code]
But it’s kicking up a fuss, complaining that “C++ requires a type specifier for all declarations”

Any idea why that may be?


#4

Yes… If the socket has connected, then I really don’t know what could be wrong. There could be some firewalling somewhere, though why that’d only operate in one direction, I’m not sure…

Your OwnedArray syntax looks fine, must be something elsewhere in your code that’s causing the confusion.


#5

[quote=“jules”]
Yes… If the socket has connected, then I really don’t know what could be wrong. There could be some firewalling somewhere, though why that’d only operate in one direction, I’m not sure…

Your OwnedArray syntax looks fine, must be something elsewhere in your code that’s causing the confusion.[/quote]

Hmmm, the plot thickens. I’ll do some searching around and report back. It’d be a shame if it didn’t work, I would have exposed myself to obj-c for nothing :smiley:

The array issue turned out to be a case of circular dependency, ooops. Today I learnt about forward declarations.


#6

Problem solved, hopefully this will help someone in the future

Since I was using Juce for InterprocessConnection only I’m assuming no Message Thread was being created. Therefore setting the callbacksOnMessageThread variable to false in the constructor fixed everything

So the constructor on my iOS InterprocessConnection class looks like this