Giter Club home page Giter Club logo

wwdcalertapp's Introduction

WWDC Alert App

This is a simple app that will generate a local notification every time WWDC page updates.

It refreshes every 2 mins and caches the last fetched content of WWDC page. If the most recent content is not exactly same as previously cached copy (using [NSString isEqualToString]), it will trigger a UILocalNotification.

The app also generates a UILocalNotification, if the app is killed or there was an error fetching the latest WWDC page.

Here's my blog post on the App.

How does it run in background?

The app registers for background mode to receive location updates. Every time it is backgrounded, it kicks off a background task that wakes up every 2 mins to refresh the WWDC page. If the app is running out of background time allotted to it, it triggers location update on CLLocationManager, which allows for a reset of (bumps up) allotted background time to the app. As you might have already realized, this app will use GPS approximately every 9 mins and also use network to refresh WWDC page every 2 mins; so beware of the high battery consumption. On an iPhone 5, it drained 15% of battery over 6 hours, while running in the background.

Please feel free to modify and run it on your local devices. If you find a bug, please submit a fix/report to the repo for all of us to benefit. Also, this app was put together quickly over an evening, and has not been field tested well, so please do not make this the only source of tracking WWDC date update and use other means as well.

NOTE: This app will NOT be approved (rightfully so) by Apple for the AppStore. It uses location updates to be able to run in the background. There is no valid reason for this type of app to use location updates.

Credits

This app uses AFNetworking to download WWDC page. Thanks to @mattt

Contact

Find me on Twitter: @rmatta

wwdcalertapp's People

Contributors

mgreiner avatar rmatta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.