Since iOS4, developers have the ability to perform background tasks with some limitations. Background tasks must fit one of the five different categories for background supported apps. Music and streaming apps can be backgrounded as long as they play music. Newsstand apps can wake once a day to download updates. Location aware apps can wake up once in a while to update their position. VOIP apps can have one socket (I found out the hard way that the one socket does not include listener sockets) connected in the background. General apps can request up to 10 minutes to finish some task. While this is enough for most backgrounding purposes, sometimes we need backgrounding for more advanced tasks. Specifically, I wanted to write a HTTP proxy server that runs on the device (in the future, this proxy server will work as an ad-blocking proxy) in the background. I will show you the steps of making this work. Please note that Apple will certainly reject any app that abuses their backgrounding policy so doing so would only be useful for personal and enterprise uses. Continue reading
I finally took some time from my busy schedule and made some changes to the site.
- I stopped being cheap and finally bought www.yifanlu.com
- Thanks to WPTouch, the site can be viewed on the iPhone & Android with ease
- Added a contact form
- Made tweaks here and there in the designs, fixed some typos & style errors
Also, quick update: I’m still working on that Facebook app, with all the homework and exams, I barely have any free time, however, here’s some screens on Facebook.
Well, it took two days to coding, but I finally did it. I made an web-app for the iPhone. The reason I decided to do this was to familiarize myself with advanced aspects of PHP, such as classes, curl, and different sorts of weird functions. I created the KGD (KISD Gradebook Disassembler) from scratch in PHP. What it does is logs in to http://pic.katyisd.org/ (where you check grades), and gets to the gradebook page. It parshes the HTML and generates an array of infomation. This array can be sent to other pages for easy creation of stuff based on it. Some other features Idid was cacheing, so it would download the HTML every time, for maximum speed. It also requires NO connection to any database, so it’s very portable and expendable. It may also be one of the cleanest code I’ve ever written and the first one at is object-oriented (to train myself before I get to iPhone SDK programming). The first thing I did is iGradebook. It is a cool app with an slick UI that allows you to check your grades on the iPhone. Some other things I’m looking into with the KGD core is maybe writing a desktop alert app or an Facebook plugin. If you would like to try it, check out the projects page. Look forward to the KGD core being released under GNU when I’m done. (Oh yea, this only works for KISD students, as that’s the only place I have access to grades)