I have 3 classes which are CCLayer registered with dispatcher using addTargetedDelegate ( I override CCLayer::registerWithTouchDispatcher() - as recommended in CCLayer source file). I have also couple plain CCMenu objects (which also registered with dispatcher with addTargetedDelegate ). All of them are set to swallow touches ( bSwallowsTouches = true ).
I’m using AirplaySDK on PC, and all works in the simulator. All of registered objects respond to touches.
The problem is CCMenu (which add/removes/manipulates other objects registered with dispatcher) often don’t respond to touches on the hardware(iPhone). Then I have to exit application (using push button), and start it again. And it is lottery, sometimes it works 1 time, sometimes after 10 tries. It is completely random. When it works - it works perfectly - meaning all object receive touches as expected (as it happens on simulator).
It’s not definitely priority issue of TargetDelegate - as it always works on simulator, and only sometime on platform.
I have jail-broken iPhone, and when this process is started and does not respond to touches, I double check if process is actually running. I login via ssh and check with ps. Some of psProcess state = Rs
MEM = 52.0
CPU = 32.3
There is nothing wrong with this process as far as I can see - meaning it is running.
My code is still quite beta/unstable - but it does run perfectly on simulator.
Any idea what else I can do/check? What can cause this problem? To me looks like it is timing issue.
For now, I would rather avoid installing and running gdb on iPhone.