Does anyone ever tried running calabash-ios and calabash android together.
Suppose I have installed application A in android and application B on iOS and want to send some message from application A and validate that in application B.
Please let me know if anyone have done this and or any idea how to do this it will be really helpful.
Regards, Nishant Singh
This answer is from memory, so apologies if any of it is incorrect. If I can get hold of my old code I will recheck this and update if necessary.
NOTE: My experience is for doing this using real devices, so it may differ slightly for simulators.
For android you can manually configure multiple instances of the driver.
Once instantiated, you can run methods on a specific device by calling it directly
Or you can use a method to define which device is the default one that you want it to run on. Then any calabash commands will run on that device. This setting is only applicable for android and doesn't affect iOS devices in any way.
From what I remember for iOS, you can set up the iOS driver in the same way as you would for the case where you are only using one device that's iOS, i.e. setting environment variables. To use the iOS device you need to make sure there is a setting for one of the environment variables, I think it was DEVICE_ENDPOINT. If this environment variable is set with the iOS device's ip, then any commands from calabash will be sent to the iOS device. If it is set to an empty string then any calabash commands will be sent to the android device.
So assuming that you have the iOS environment variables all configured correctly, and that you have a constant IPHONE_IP which contains you iOS device IP.
I ended up making a class that dealt with this stuff for me, as it gets annoying having to add and remove the env var, and switch between devices. I also ended up moving away from the complicated cross platform multi device implementation in favour of using mocks. Hope this works for you!