atvHelloWorld - AppleTV2 1-click build and deploy Xcode 4 sample project
As presented at 360iDev Denver 2011, atvHelloWorld is an Xcode project I developed to illustrate how amazing the AppleTV2 could be if Apple ships an AppleTV SDK and adds AppleTV apps to the AppStore. Huge doesn’t even begin to describe the opportunity (more on that later…).
To get the source, head over to github and pull or fork to your hearts content:
360iDev Session - AppleTV Apps: Are you ready for the big screen?
Great news! I’ve been accepted as a speaker for the 360iDev conference in Denver, Colorado taking place September 11-14, 2011. Here is an overview of my session:
Headline from 2012: Apple destroys yet another market by introducing AppleTV AppStore. 60,000 games available today! Nintendo in panic mode…
Did you know the latest AppleTV runs iOS? Is your app ready for the AppleTV AppStore? Do you know how best to present your app on a large-screen format? This session will teach you everything you want to know about AppleTV, including:
- How to develop unofficially until Apple releases the AppleTV AppStore
- Hardware provided by AppleTV
- Designing your app for the big screen
- User interface issues with limited remote control
- Sending audio and video to your AppleTV via AirPlay
See the entire schedule here: http://360idev.com/schedule
And don’t forget to register early: http://360idev.eventbrite.com/?ref=ebtnI’m also working hard to bring a couple “one more thing” surprises, so be sure to grab your seat early!
Django runserver and stunnel for testing HTTPS
Recently I was testing a Django web app that required SSL enabled in order to retrieve a secure cookie for use server-side. After some quick google and stackoverflow searches, it appeared that simple tunneling with stunnel was the way to go. Unfortunately most of the documentation for doing this is typical unhelpful RTFM-isms.
To get a simple tunnel setup, we typically want to follow this route:
browser ---> https://localhost:8443 ---> http://localhost:8000 ---> runserver
That is, the routing of all requests on
8000, which is where our Django runserver instance is serving up our web application and static content (if any). To setup this routing, I’ve created a simple stunnel configuration file, which also provides a few other configuration niceties, like outputting all messages to
stdout rather than running silently in the background. The configuration file is represented below:
Be sure to note the use of the
TIMEOUTclose option. Without this set to a low timeout value, you will notice a severe lag before your browser receives a close message. To run stunnel with this configuration, simply execute the following from the command line:
sudo stunnel fake_https
Finally, you must tell Django’s runserver to modify all incoming HTTP requests to behave as if they were over HTTPS. This tells Django to set all request objects to return
True for calls to
request.is_secure(). This may be accomplished by simply setting the
HTTPS environment variable to a non-zero value (i.e. True) prior to executing runserver. For example:
HTTPS=1 python manage.py runserver
You may now visit
https://localhost:8443 in your web browser, and you should see activity in your stunnel terminal window and in your Django runserver terminal window, indicating a successful tunneling of all local SSL traffic to your basic Django runserver.
This simple method is a great way to test your web apps locally to ensure they behave correctly under secure and unsecure scenarios, including server-side handling of secure cookies.