
In the company where I work, it is time for
corporate testing of our iOS application, and since mako is here only for me, and all the other developers and, most importantly, QA work under Ubuntu, <irony> which means they have no iPhones </ irony>, then I had to think of a solution to the problem and rid myself of the agony of transferring the personal iPhone to my hands testers.
If you are faced with a similar problem or are simply interested in the topic of sharing a single poppy with the possibility of simultaneous work on it, then I ask for a cat.
')
Apple Remote Desktop
First we tried
www.pieceable.com , the thing is really good, especially with the prospects for the development of the project, because judging by the main thing, they bought it on Facebook, but so far the speed of its work leaves much to be desired, although the very idea (if someone is not familiar with it, then this is the launch of an emulator on a poppy with the subsequent broadcast of a picture on clients) we liked.
Starting with Mac OS X 10.6, Apple Remote Desktop (VNC, in fact, only TCC ...) supports Multi-user Screen Sharing, and this is exactly what we need, because the main task was not to distract from the iOS developer’s workflow. which works behind this mac.
Mac Action
Settings for Mac OS X 10.8 aka Mountain Lion (for other systems should not be much different):
- Create a user, for example, SimulatorViewer;
- Go to Settings -> Sharing -> Remote Managment, set up Allow access for: SimulatorViewer, select at least Observe + Control + Open And Quit Applications;
- We click on Computer Settings and select VNC thereers viewers may control screen with password, as well as enter the password for VNC.
This completes the Mac OS X part setup.
Ubuntu Actions
To connect to the Mac, we will use the
Remmina Remote Desktop Client , which is already present in the standard Ubuntu delivery, as I was told :) I apologize for the “strange” screenshot, now there is no possibility to make your own:

- Connection-> New ...
- Protocol: VNC - Virtual Network Computing ;
- Server - Mac's IP address (shown on it in the Sharing window, and indeed in many places, adults already)
- We enter in the User and Password our data for the user SimulatorViewer, which we created a little higher;
- Color Depth is set to High color (15 bit) , it is possible and more, if the network allows), the value does not relieve the brakes :)
You can try to join already, the Mac OS X screen should appear, and the session of her user at the computer will not be interrupted.
Customize Xcode
It remains only to make the simulator Xcode builds available to our user. I chose the simplest option by moving the build directory to / Users / Shared /:
- We expel the iOS developer from the Mac to smoke for 5 minutes, and at this time they themselves climb into the Xcode settings, the Locations section;
- Select Derived Data: Custom , path / Users / Shared / Xcode / DerivedData ;
- In Advanced ... click on the Shared Folder and enter Build ;
- We comment on the random line in the programmer's code;
- create executable (!) file /Users/Shared/run.sh with the following contents:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication blah
- We notice traces and we leave from the computer of the iOS programmer.
The attentive reader will notice the blah identifier, a brief explanation:
without it, it will not work, we specifically ask for a nonexistent path and then the simulator will ask us to specify it at the start :)
Work of the received system
We have already figured out how to connect to the working Mac, it remains to run a simulator in it and start mocking the programmer.
- We ask the iOS developer to build a build for the simulator (!);
- We go through the VNC on our poppy (I describe the further actions already inside the machine, which we visited);
- Go to Finder in / Users / Shared / ;
- Run run.sh , which will open the simulator with a file selection window;
- If we have an application called Habrahabr, then the path to it will be like this:
/Users/Shared/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/Habrahabr.app
If everything is done correctly, the application will start and you can start testing.
Appendix
In the course of testing, I encountered some problems, which I will put in the form of a FAQ:
FAQQ: The developer of the iMac 27 "and iPhone brain, is it possible to make the resolution smaller?
A: When working through VNC, you can easily change the screen resolution, as well as their configuration. Screen settings -> Scaled, 1024x768
Q: On a poppy 2 monitors, how to display only one of them?
A: Just go to the settings screen and click Mirror Displays, then only one screen will be shown.
Q: When working there are brakes, what to do? (
A: We tried several VNC clients and their settings, but everywhere there is a problem of lags and slow connection “dying”, with which it was never found, because in general, the testers are satisfied. Reconnect helps.
Q: What should Windows users do?
A: There is such a thing (c) that we did not find the Win computer in the office, but it all comes down to the simplest search for a VNC client under Win that connects to Apple Remote Desktop.
Conclusion
In essence, the article is a collective image of the Mac VNC + VNC Client + Xcode custom build path + Running Simulator with target application and was written to save you from googling data topics.
Tips for improving the circuit, especially the bottleneck in the form of VNC and its slow work, are welcome.
Thanks for attention!