Git Product home page Git Product logo

emitron-ios's Introduction

emitron (iOS)

emitron is the code name for the kodeco.com app. This repo contains the code for the iOS version of the app.

Contributing

To contribute a feature or idea to emitron, create an issue explaining your idea.

If you find a bug, please create an issue.

If you find a security vulnerability, please contact [email protected] as soon as possible. See SECURITY.md for further details.

There is more info about contributing in CONTRIBUTING.md.

Development

emitron runs on iOS 16.0 and greater. It uses SwiftUI and Combine extensively; and since these two technologies were very new at the time of creation, there are plenty of places in the code that could benefit from some refactoring.

Currently, only people that hold an active kodeco.com subscription may use emitron. Non-subscribers will be shown a "no access" page on login. Subscribers have access to streaming videos, and a subset of subscribers (ones with a "Professional" subscription) is allowed to download videos for offline playback.

Secrets Management

emitron requires 2 secrets:

  • SSO_SECRET. This is used to ensure secure communication with guardpost, the kodeco.com authentication service. Although this is secret, a sample secret is provided inside this repo. This shouldn't be used to create a beta or production build.
  • APP_TOKEN. Required in order to enable downloads. This is not provided in the repo, and is not generally available.

The secrets are stored in Emitron/Emitron/Configuration/secrets.*.xcconfig files, with one file for each deployment stage. These files have entries in the .gitignore, so they won't appear when you first download the repo.

To generate these files after you've first cloned the repository, execute the following command:

$ scripts/generate_secrets.sh

This will make the required copies of the template file, which includes an SSO secret appropriate for open-source development.

NOTE: To get the release build secrets, check the emitron S3 bucket, or contact [email protected]. Developers should never need these, as CI will handle it.

If you are working on the download functionality and are having problems without an APP_TOKEN, contact [email protected] and somebody will assist you with your specific needs.

Details

The two xcconfig files are used to configure the project. To access the values specified, these files must be added to the Info.plist file.

Use the Configuration struct to access these values from code.

For more details on this approach, check out https://nshipster.com/xcconfig/

SwiftLint

SwiftLint runs as part of the build process in Xcode, and errors/warnings are surfaced in Xcode as well. Please ensure that you run SwiftLint before submitting a pull request.

To install SwiftLint using homebrew:

$ brew install swiftlint

Xcode will automatically run SwiftLint if it is installed.

Continuous Integration & Deployment

emitron uses GitHub Actions to perform continuous integration and deployment. Every PR is built and tested before it can be merged.

  • Merges to development will create a new build of the emitron β app on TestFlight.
  • Merges to production will create a new build of the emitron production app on TestFlight.

emitron-ios's People

Contributors

0xtim avatar adesugbaa avatar bladebunny avatar catiecatterwaul avatar darren102 avatar dependabot[bot] avatar derrickp avatar fsjohnson avatar heathermh avatar hqin0066 avatar jasongoodney avatar jellodiil avatar jessycatterwaul avatar leamars avatar martinrist avatar nikitashvadlenko avatar riana-soumi avatar robertomachorro avatar sammyd avatar vegetarianzombie avatar zoha131 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emitron-ios's Issues

Can control the playback speed & quality of the video.

  • The user should be able to choose between the following speeds: 0.5x, 0.75x, 1x, 1.25x, 1.5x & 2x.
  • If feasible, the user should also be able to change the quality of the stream—it’s all in a single - HLS stream, so overriding the auto level may or may not be possible.
  • This settings should be saved and used for all videos.

Can open app and log in to their raywenderlich.com account.

  • There is a web-based flow for authentication, which returns a token to be used for future API requests. (There is a framework available for Swift). Details available on https://raywenderlich.docs.apiary.io/#/introduction/authentication
  • Users should also be able to sign out of the app.
  • Only video subscribers will be able to see anything within the app.
  • The app should check that a user is still a subscriber once every day, and remove access if they are not. (note that the inability to access the internet is distinct from determining that a user is no longer a subscriber)

Can see a page about a course, including a list of the individual videos.

  • Tapping on a course in the course list will transition to a page that includes further details about a course. These will be available via an additional API call, and includes a description, artwork, platform, authors and a list of one or more episodes (videos) that make up the course.
  • The user can navigate from this display back whence they came.

Can see a list of downloaded videos

  • The app has a tab that lists all the downloaded videos.
  • Users can see expiry, swipe to mark complete, and swipe to delete from here.
  • The downloads list includes queued downloads, and those in progress.

Can display subtitles

  • The user should be able to toggle subtitles on or off.
  • The setting should be saved and applied across videos and app relaunches.

The next video in a course autoplays.

When a user gets to the end of a video, the next video should autoplay in the same player, provided there is another video available in the same course.

Downloaded videos expire after 7 days without confirming an active subscription

  • Once a video file is downloaded, the app should periodically check that the user is still permitted to possess the downloaded file.
  • If this isn’t the case, the video should be locked, but not deleted. The user can delete locked videos.
  • If the app has not been able to confirm the user is permitted to download videos at any point in the previous 7 days, the video will become locked.
  • A locked video has a button to retry authorisation, displayed in the list view of downloaded videos.

Add pro content/ui

When the user logs in we need to determine whether they're pro, and then skin the app appropriately (some videos are now allowed, and PRO tags are listed...)

Pro courses are labelled appropriately

  • Show a label to highlight a pro course in the content list.
  • A similar label appears on the course detail page
  • If a user is unable to view pro content (i.e. they have a beginner-level subscription) a message is displayed on the course page, and locks appear next to the videos.

Can play downloaded videos

  • Tapping on a downloaded video will pull up the player, and allow playback using the same settings as the streaming player.
  • Autoplay should work, provided the next video is available in downloads. If it’s not available, the player will dismiss, returning the user to the downloads list.

Bugfixing and app preparation support

  • The deliverable app must be accepted by the appropriate app store. Although Razeware will handle submission, we’ll need support in case the app has review issues.
  • Also fixing bugs reported either internally or from the public.

Can filter and search the course list, similar to /library.

  • Implement a search and filtering functionality on the course list. This can be done using an API endpoint, or using internally cached data.
  • The options will be a subset of those presented on raywenderlich.com/library, and filter options should be persisted between app launches. As seen in the designs / wireframes.

Progress through the video is stored.

  • As the viewer watches the video, we should record their progress, both locally and remotely, through regular API calls.
  • When a video is complete, this too should be recorded via an API call.
  • When a user taps on a video that has progress recorded against it, the video should begin at the point they most recently stopped watching.

Can download (and delete) videos to local storage

  • If the user’s account permits it, they can download the video to local storage.
  • This storage should not be part of the backup protocol.
  • The file URL is exposed via an API call.
  • There should be a limit to the number of simultaneous downloads.
  • There are two qualities available.
  • If the user logs out, downloaded videos are deleted.
  • Downloads should use best practices for background processes and power management.

Can play a video.

  • Tapping on a video in the list on the course display opens a modal video player and starts playing the video.
  • This involves an API call to request the stream URL, and then a call to register beginning of playback.
  • It also makes an API call to determine the most recent progress recorded against this video, and initiates playback from there.
  • The stream is an HLS stream, hosted by Vimeo.
  • It should use the most appropriate player (e.g. the system provided player in iOS).
  • The video should be played in landscape, using the following wireframe as a guide https://invis.io/MSS8ZUS9X7P. However, we want to stick to the native appearance as closely as possible, this wireframe is a guideline.

Can play video PIP

  • It should be possible to pop the player out and switch to a different app, following the OS best practices.
  • Popping it back in works as expected.

Can bookmark courses and see a list of bookmarks

  • Both courses and individual videos can be bookmarked.
  • Users tap a toggle device in several places across the UI manage their bookmarks.
  • Bookmarks are synced via the API
  • A user can access a list of all their bookmarks, in descending creation order. This is provided via a paged API.
  • Users can swipe on this list to remove a bookmark.

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.