Skip to content

X Schedule is an iOS app which fetches the bell times from the St. X website and displays it in the app and in Notification Center.

License

Notifications You must be signed in to change notification settings

Cin316/X-Schedule

Repository files navigation

X Schedule

X Schedule is an iOS app that fetches the bell schedule for St. Xavier High School from the St. X website. It shows an in-app view of the schedule and has a Notification Center widget. Its modular approach makes it easy to adapt to a multitude of situations.

Screenshots

Schedule View Notification Center Widget iPad Week View

Download and Installation

X Schedule is available on the App Store for iPhone and iPad.

Download on the App Store

Compiling

To download and compile X Schedule, you will need:

  • OS X 10.10+
  • Xcode 6+
  • git

Clone the repository from GitHub.

git clone http://github.com/Cin316/X-Schedule.git

Navigate to the Xcode project file and open it.

cd "X Schedule"
open "X Schedule.xcodeproj"

You should now be able to compile and run X Schedule through Xcode.

Issues

File bug reports and feature requests on the GitHub issues tracker. I will look at them as soon as I can.

Forking

Feel free to fork and modify this code for any type of schedule or organization as you see fit. Be sure to include the copyright notice as indicated in the MIT License. To adapt it to another website, modify the XScheduleParser.swift and XScheduleDownloader.swift files.

The XScheduleDownloader class contains one method to override, downloadSchedule(date: NSDate, completionHandler: String -> Void, errorHandler: String -> Void), which returns an NSURLSessionTask. It should fetch a schedule in some way for the given date, and pass a String representation to the given completionHandler. If an error occurs, it should pass an error message to the errorHandler. The method returns the NSURLSessionTask of the download if it is being fetched via the web. It should return NSURLSessionTask() in all other cases. This class will usually download an HTML or XML webpage. It may use other methods as helpers. This method should not block the thread.

The XScheduleParser class has two methods to override. parseForSchedule(string: String, date: NSDate) returns a Schedule object as described in Schedule.swift. It should take the String output from XScheduleDownloader, parse it, and return a matching Schedule object with the date specified. It may use other methods as helpers. For example, my implementation uses NSXMLParserDelegate methods to help with parsing. The code in parseForSchedule may block the thread. storeScheduleInString(schedule: Schedule) returns a String representation of the Schedule provided. It should be in the same format as the output of XScheduleDownloader and be able to be parsed by XScheduleParser. This method is used to cache and store schedules.

Legal

The authors and content of this app are not affiliated with or endorsed by St. Xavier High School in any way, shape, or form.

This is licensed under the MIT License. The text of the license is located in LICENSE.txt.

The images in this project are licensed under the Creative Commons Attribution License unless otherwise noted. The text of the license is located at http://creativecommons.org/licenses/by/4.0/.

The GitHub logo and icons located in GitHub.imageset are (c) 2015 GitHub, Inc and are not licensed under CC-BY 4.0.

About

X Schedule is an iOS app which fetches the bell times from the St. X website and displays it in the app and in Notification Center.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages