Xikolo iOS App
iOS application for the HPI MOOC Platform
- Xcode 12.4
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
- 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
xed .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 model
ResourceListViewController: The view controller listing multiple resources -- usually in a table or collection view
ResourceViewController: The detail view controller for a single resource
ResourceHelper: The controller resonsible for synchronizing the resources with the server
ResourceHelper+FetchRequests: CoreData fetch requests for the resource
Modules & Targets
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.
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.
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.
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.
iOS target is the main application.
TodayExtension target provides the today app extension (widget in the today view, considered legacy in iOS 14 and later).
WidgetExtension target provides the widget extension for iOS 14 and later (widgets on homescreen)
Code of Conduct
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 MIT license. See the LICENSE file.