Show HN: Run dedicated iOS Simulators in the browser
appetize.io
appetize.io
The "video" quality is pretty bad though. From what I can see, the app streams base64 encoded JPEGs via WebSockets and draws them in a Canvas. The overhead of sending complete images costs a lot of bandwidth.
You may want to look into jsmpeg for live streaming: https://github.com/phoboslab/jsmpeg
http://googleblog.blogspot.com/2012/05/next-step-in-chrome-o...
If you're having performance issues with it, you just have the video codec tuned wrong.
we'll check that out, thanks for the heads up.
We'd love to use it and appreciate your hard work though. Do you have any ideas on how that problem can be solved?
The more difficult part is probably detecting this lag. I'm not sure how this could be done. Maybe the node websocket server (ws) can detect congestion somehow.
MJPEG is supported in all browsers I know of, and would cut down on bandwidth by 33% over base64.
(If you really want to use WebSockets, a more dense encoding than base64 could also help - look into base85, for example.)
For this application you'd need it to be in an <img> tag anyway since there's the other stuff on the page too, so that's a moot point.
My only question is how you're going to combat abuse. You're basically providing free servers in the demo. The economics of doing that means no amount of captcha will save you (it's been tried many times).
Even if you don't provide a demo and charge for simulating, you're buying into a whole new problem of metering while maintaining a sane price. Comments?
That said, congratulations on shipping working software!
all solid points, and thanks for your support.
we will definitely need to think through abuse, server costs, etc. it's a pretty lean setup but still gotta run on mac hardware :)
weiyin
Some of you may be familiar with app.io's demo pages service which was discontinued in August. We loved using their service and we thought it'd be a blast building a replacement.
Technologies used: node, socket.io, mongodb, html5 canvas
Care to shed any light as to an overview on how the backend works? I've always been curious since I first saw App.io
Maybe a modified iOS Simulator binary that can run hundreds of instances on a single powerful server, would be my best bet.
Apparently app.io had some setup w/ VMs running on lightweight hypervisors (https://macstadium.com/casestudies), but we found we didn't have to have all that overhead to run multiple simulators per machine.
And you're exactly right about the small piece of custom code to pass controls and send frames. We're big fans of socket.io - pretty powerful stuff!
Happy to answer follow-ups if we missed something.
Thanks, weiyin
Thanks!
yea, so the incoming keystrokes and mouse movements are managed through some custom OS X code as well.
the specific method we're using is CGEventPostToPSN, more information here: https://developer.apple.com/library/mac/documentation/Carbon...
Thats a pretty sweet API, never seen that before, thanks! I'm going to play around with it a bit to see what it can do!
ps. I love the new /embed endpoint and iPad support. Keep it coming!
That could be an attack vector.
If it's the former, I think that's a 'vulnerability' with any site that has a file chooser.
If it's the latter, could you elaborate where and how you would do so? Perhaps you're saying you could load it through the simulator that's running on the actual computer/vm somewhere, but those simulator environment are sandboxes (afaik) so that you could only access files on within the simulator's context.
In this iteration we are using the OS permission system to isolate users. We are looking into more effective sandbox methods. Security is an ongoing process, and we always take an adversarial point of view when evaluating our system.
There are a few online code compilers too like this Swift one (http://swiftstub.com/) to work with.
Certainly not ideal but probably not impossible.
P.S. at this time you're probably better with an OS X VPS.
Edit: also click on the demo and saw the simulator but couldn't get it to do anything. What is supposed to happen in the simulator? Should I be able to click on something? Any instructions/information would be helpful. Right now you're assuming everyone knows what the site is about and what the simulator is supposed to do.
Also, fonts are rendering poorly in Firefox and Chrome [0]. Bumping the font-weight up to at least 400 makes the text much more legible.
Thanks for taking a look! And sorry our site is having some problems on Firefox. Maybe use Chrome for now until we fix it up.
This service we put together would allow anybody to run iOS simulators in the browser for a whole variety of reasons. For example, a developer can easily send builds to clients/colleagues or even embed the demo in a website or blog post.
Cheers, Weiyin
We were using and enjoying app.io[0] until they decided to pivot and stop serving us.
[0] they didn't support pinch gestures, which made using a map impossible
I'd pay for it, if it actually made training easier...
I.e, with AutoLayout, can you not adjust the frame of the app to be that of Android, and therefore have a semi-legit looking webapp for Android without developing a responsive website?
That said, I could see this as a tool for sharing to a client for demo purposes.
I've heard in one episode of the Core Intuition podcast that Panic has actually spent some time polishing a simulator build of Transmit(?) for iOS, for use with app.io (a service which did the same thing as the OP until they pivoted). This is something I'd also love to do if this business promises to survive longer than app.io did.
This is especially interesting if you are an iOS freelancer who wants to show off their work, without clients having to create accounts etc. :)