iOS application for the HPI MOOC Platform
- Xcode 15
- bundler:
gem install bundler
The following tools will be installed via bundler:
The following tools will be installed via CocoaPods:
Take a look at our Contribution Guide to learn about the key components, our development process, the tools we use, programming guidelines and more.
- Clone this repository
- Install development tools
bundle install
- Update CocoaPods index & install dependencies
bundle exec pod repo update bundle exec pod install
- Copy initial branded app assets to prevent build errors
cp -R ./iOS/Branding/openHPI/assets-ios-brand.xcassets ./iOS/assets-ios-brand.generated.xcassets
- Open
xikolo-ios.xcworkspace
(or simplyxed .
in the terminal) - Build and run one of the targets
- Create the initial credentials file (to avoid build errors on the first test run)
cp iOS-UITests/Credentials.plist.dummy iOS-UITests/Credentials.plist
- Create the default credentials file
cp iOS-UITests/Credentials.plist.dummy iOS-UITests/Credentials-default.plist
- Optional: Create a brand specific credentials file
cp iOS-UITests/Credentials.plist.dummy iOS-UITests/Credentials-<BRAND_NAME>.plist
- Enter your login credentials for testing in the respective credentials files
For the overall architecture, we follow a plain MVC approach. However we make use of some reactive programming by using futures and promises provided by BrightFutures.
The application fetches multiple resources from the backend. For a Resource
, all related classes follow most of the time the following naming schema.
Resource
: The respective CoreData modelResourceListViewController
: The view controller listing multiple resources -- usually in a table or collection viewResourceViewController
: The detail view controller for a single resourceResourceHelper
: The controller resonsible for synchronizing the resources with the serverResourceHelper+FetchRequests
: CoreData fetch requests for the resource
To allow better code reusability, we restructured the codebase in multiple modules. For one, this reduces the application size as resources are not additionally bundled when used in an app extension. It also prevents you from going crazy by ticking hundreds of checkboxes for the target membership.
Important modules are listed below. If applicalble and neccesary, those modules can be further split up.
The Common
module holds the core functionality of the app, which is required in all targets. It includes the CoreData models, API abstraction layer, common functionalities and generic helpers.
The Stockpile
module is responsible for retrieving resources from the backend and synchronizing them with the local storage. It is capable of sending network requests depending on the protocol of the backend.
The Binge
module provides a custom video player which in contrast to AVPlayerViewController
allows entering the full-screen mode programmatically and provides controls for changing the playback rate.
The iOS
target is the main application.
The TodayExtension
target provides the today app extension (widget in the today view, considered legacy in iOS 14 and later).
The WidgetExtension
target provides the widget extension for iOS 14 and later (widgets on homescreen)
Help us keep this project open and inclusive. Please read and follow our Code of Conduct.
This project is licensed under the terms of the GPL-3.0 license. See the LICENSE file.