Giter Site home page Giter Site logo

quran-ios's Introduction

QuranEngine

CI codecov

QuranEngine is the open-source iOS library that powers the Quran.com iOS App. This repository contains approximately 99% of the Quran.com iOS App code, providing you with a robust foundation to build Quran-related applications.

In this repository, we also provide an example application called QuranEngineApp that mimics the Quran.com iOS App, available under the Example folder.

Installation

The repository can be installed via Swift Package Manager:

.package(url: "https://github.com/quran/quran-ios", branch: "main")

Then use one or more of the available targets as dependency. All targets are available for consumers, for example:

.product(name: "AppStructureFeature", package: "quran-ios"),

⚠️ Please note that we do not support CocoaPods or Carthage, and we do not plan to support these in the future.

Repository Structure and Architecture

The library consists of 6 top-level directories:

  • Core: General purpose libraries that work with any app. The only exception is the Localization library, which we aim to make more universal.

  • Model: Contains simple entities that facilitate building a Quran App. These entities mostly work together without including extensive logic.

  • Data: This directory includes SQLite, CoreData, and Networking libraries that abstract away the underlying technologies used.

  • Domain: This is where the business logic of the app resides. It depends on Model and Data to serve such business logic.

  • UI: Houses the design system used by the App (we call it NoorUI). We are gradually shifting towards using SwiftUI in all our components, except for the navigation aspect - we will continue using UIKit for that. UI does not depend on Domain nor Data, but can depend on Core and Model.

  • Features: Comprises the screens making up the app. They rely on all other components to create our Quran apps. Features can encompass other features to create higher-level features. For example, AppStructureFeature hosts all other features to create the app.

⚠️ UI and Features do not yet contain tests, and makes up around 50% of the source code. We are keen on adding tests to them in the future inshaa'Allah.

Here is a visual representation of the architecture:

architecture

This dependency order is enforced in Package.swift.

Contributions

We warmly welcome contributions to the QuranEngine project. We encourage potential contributors to tackle any of the open issues. Please start a conversation with us in the Discussions section of the repo and we will do our best to assist you inshaa'Allah.

If your contribution is small enough, feel free to create a Pull Request directly. For larger contributions, we ask that you first create a post in the discussions section. This allows us to ensure that nobody else is working on the same feature, and also allows us to plan for upcoming features in case your contribution is dependent on another feature.

Intended Use

We are re-open sourcing the app because we see a lot of benefits in allowing developers to build on top of what we have already built. This way, developers don't have to re-implement the foundation and can innovate more on the idea itself. The malicious behavior we've seen previously, including but not limited to selling this free code to people who are not aware of this repo's existence, is negligible compared to the overall benefit of giving what we have implemented to others. We look forward to seeing great Islamic innovation that helps Muslims everywhere inshaa'Allah.

We welcome all types of use. However, we kindly ask that you don't use the QuranEngineApp example and republish it without making any modifications. You may also need to bring your own data.

License

quran-ios's People

Contributors

abdelouali avatar abid-dev avatar aziev avatar iamraafay avatar mohamede1945 avatar raheelahmad avatar takasurazeem avatar techyescountry avatar zukhan 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quran-ios's Issues

Implement Last Viewed Page Bookmark

  • Implement a simple bookmark screen with only last viewed page.
  • The data should be always up to date with the last page viewed by the user.

Full functionality of the bookmarking shall be in V2.

Audio Downloads Tab

Implementing Audio Downloads Tab.

  • Should show Reciters and how many suras are downloaded.
  • User can delete downloads of a particular reciter with a confirmation.
  • User can tap on the reciter to see more details.
  • The details should show all suras and next to each sura a delete (if downloaded) or a download (if not) icon or progress (if download in progress).
  • Tapping the sura line should perform the action delete/download/cancel download.
  • There should be a button to download all suras, hide that button if all suras are already downloaded.

Reciter ends Juz' Early

Currently, there is a problem with the last ayah finder algorithm. For example in page 604, listening to Quran ends before the last sura

Translation Downloads Tab

  • List all translations available with downloaded translations at the top.
  • Each row should show the translation name and a delete (if downloaded) or a download (if not) icon or progress (if download in progress).
  • Tapping the row should perform the action delete/download/cancel download.

Reading & Listening

Most of the users will be reading and/or listening to Quran in our app, it's very important to focus and give the user best experience possible.

I want to contribute

A.s, I always wanted to build such an app... I'm 16 years old and I will give my best

Crash for Updating Last page from Last Pages Bookmarks

After applying #60 now there is a crash when the user opens the Quran from one of the last pages.

Steps to reproduce:

  1. Assume you have in the "last pages bookmarks", pages 1 and 2.
  2. Open the Quran from page 1.
  3. Then swipe the page to go to page 2. The app will crash at this point.

I think the crash in function

func update(page: LastPage, toPage newPage: Int) throws -> LastPage

Download Manager

To manage downloads of resources in the application by downloading more resources or delete downloaded resources.

Currently, it will be implemented with 2 tabs (Audio Files, Translations). It's expected to be on its own tab and Audio/Translation tabs will be nested inside.

Pause/Play doesnt work on first time

  1. Launch app
  2. Tap on Surah Baqarah
  3. Tap play button at the bottom.
  4. Observe, button first shows play mode and then changes to pause mode
  5. Tap the button, the recitation doesnt stop, tap again, now it stops
  6. This happens only first time for any surah when its loaded.

Bookmarking Screen

  • Show list of bookmarked pages. Sorted by date added descending.
  • Give the user the ability to delete entries from the list.

Home Page

  • Home page will display the Quran table of content.
  • There will be 2 tabs (Surahs and Juz).

Surahs tab:

  • Surahs tab will list the surahs in an ascending order with the Juz as label.
  • Surahs will be numbered according to its order.
  • Surahs will show the the start page number.
  • Below the Surah name show whether it's (Makki or Madani) and number of verses.

Juz tab:

  • Juz tab shall show the Juzs in an ascending number in a sectioned manner.
  • Each section will have 8 Quarters or (Roba).
  • Each Quarter will show the first few words of the start Ayah.
  • Each Quarter will show the name of the Surah it's in, the Ayah number and the page number.
  • Each Quarter will show the Hezb number inside a pie on the left.

Handle Error More Elegently

  1. Network Error: are not handled correctly and I can see the download stuck for certain cases. (e.g. downloading on cellular network).
  2. No space available for the hard disk currently shows a general error.

React-Native hybrid

Salam all,

Want to get your opinion on this. Airbnb has a wonderful iOS app (and I think their Android too) that is a mix of native and React-Native. Coincidently, quran.com is built on React. Thus, my suggestion is, what if we follow those footsteps of having a hybrid between the two. Perhaps all the online stuff can be React Native.

Thoughts?

CC: @mohamede1945 @ahmedre

History Of Last Pages

  • Add the ability to have multiple last pages (3 for now). Each item represents a session.
  • The user can resume a session if he goes to Bookmarks/Last Page and tap one of them
  • The user can create a new session by opening the Quran from any other place (e.g. Juz tab, Sura tab, Ayah Bookmark, Page Bookmark).
  • History of last pages shall be sorted by last update date.

Tafseer / Translation

  • Add the ability to switch between Translation and regular reading experience with Madani Quran.
  • If there are no translations downloaded yet. Show the Translation download manager.
  • When switching to translation view, always show the last selected translation or the first one from the list.
  • Give the user the ability to change current translation from the currently downloaded translations and add a link to download more to show the Translation download manager if not all translations downloaded yet.
  • The translation view show always show the Ayah in Arabic.
  • The listening experience should be the same as if the user reading Arabic Madani Quran. Highlight the current Ayah in Arabic and its translation and automatically scroll to the currently playing ayah, etc.

Adding New Qari

Is there any way i can add new qari in application. what are steps to do this?

Reading & Listening Screen

For the reading screen, we need to do the following:

  • Show a page from Quran.
  • User can switch to full screen (reading mode).
  • User can navigate to next and previous pages if applicable.
  • User can choose one of the available readers to listen to.
  • User can start listening to the current Qari.
  • User can pause the audio.
  • User can resume the audio.
  • User can fast forward the audio to the next Ayah.
  • User can go backward the audio to the previous Ayah.
  • User can stop the audio and return back to the readers selection.
  • User can choose the ability to repeat surahs (no repeats, 1, 2, 3 or infinite repeats).
  • If audio is playing, open next page when the current page is done
  • If audio is playing, automatically start next Surah when the current one is completed unless it's the last Surah.
  • Set the default download type to be by Juz.
  • While audio playing, needs to handle headphones command pause/play/stop.
  • When the audio is interrupted by external audio/music. The app should pause the currently playing audio.

Images from API?

Just a thought:

On Quran.com, we used to use images instead of font but eventually decided font with the web is best. But since the size of the app is so large, thoughts about doing the same for the app? For example, we can render text and for those that have internet connection, it'd download the images and replace them with the text. Similar to what we do on Quran.com too. You can also load a few pages before and after, so not needing to download all the images for the whole Surah but where the user might scroll.

Thoughts?

Repeating Verses

Add the ability to repeat verses while audio is playing for (1 repeat, 2 repeats, 3 repeats, indefinitely repeating).

Download Quran Images On Startup

  • When the app loaded check if it's the first time, then download the quran images.
  • Save the images on disk on the documents directory.
  • Unzip the images file, delete the zip file.
  • Save images version locally.
  • If the version changes on a new app update/install, delete existing images and re-download them again.
  • Make sure the app starts as fast as possible. Checking if the images downloaded or not shouldn't exceed few milliseconds (e.g. don't go through all the downloaded images and check if they exist or not).

Bookmarking Quran Page

  • Add the ability to bookmark a page and remove bookmarking of a page if bookmarked.
  • Label a bookmarked page with a different icon than not bookmarked one.

Quran IOS Crash

When I lauch the app, after it showing me a green header and a blank page it the app crashes. My IOS version is 8.1.2.

I'am now updating to 9.0.

Hopefully it wil work so

Search

  • Add ability to search for text in Ayah.
  • Add ability to search for text in downloaded translations.

V1 Screens Localization

  • Add localization for new labels not in the Android app.
  • Make sure all languages supported by Android app is supported in iOS.

Notification When Download Completes

The download might take a long time to complete especially with slow internet connection. Accordingly, we need a notification to the user to tell him that the download is completed. One exception is the user didn't close the app and the audio will play after the download is completed in that case we don't need a notification.

Bookmarks error Iphone SE

Salam,

i was reading the Customer Reviews in the App store. A user has an error on bookmarking on his Iphone SE.

Below a screenshot
knipsel

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.