Skip to content

abdorizak/Hisnul-Muslim

Repository files navigation

حِصن المسلمِ

GitHub GitHub GitHub


Introduction

Hisnul Muslim iOS App is a digital version of the popular book of supplications and prayers for Muslims. It provides easy access to a collection of authentic prayers and supplications that are derived from the Quran and Sunnah, which are the teachings and practices of the Prophet Muhammad (peace be upon him).

The app features a user-friendly interface with supplications organized thematically, covering topics such as morning and evening supplications, prayers for specific occasions, and supplications for protection and seeking guidance.

The "حِصن المسلمِ" app is designed to be a convenient tool for Muslims to have access to a collection of authentic supplications at their fingertips, whether at home, work, or on-the-go.

Hisnul Muslim App

Features

  • 100+ supplications
  • Swift %100
  • UIKit Programmatic UI
  • Combine Framework
  • MVVM design pattern
  • Bookmark supplications
  • Search supplications
  • Notification supplications based on user's time request using UNUserNotificationCenter
  • Store supplications in Core Data with Notification time
  • Supports iPhone and iPad
  • iPhone SE support
  • Supports iOS 15.0 and above
  • Dark Mode and Light Mode
  • Improved AlertVC with multiple button options.
  • Enhanced Empty State handling
  • Async/Await for better readability
  • Improved file reading using Combine's Just Publisher

Improved Bundle Extension

The Bundle extension has been improved to use Combine for reading files:

import Foundation
import Combine

extension Bundle {
    func readFile(_ file: String) -> AnyPublisher<Data, HSErrors> {
        guard let fileURL = self.url(forResource: file, withExtension: nil) else {
            return Fail(error: HSErrors.fileNotFound).eraseToAnyPublisher()
        }
        
        return Just(fileURL)
            .tryMap { try Data(contentsOf: $0) }
            .mapError { _ in HSErrors.unableToReadFile }
            .eraseToAnyPublisher()
    }
    
    func decodable<T: Decodable>(type Model: T.Type, _ fileName: String) -> AnyPublisher<T, HSErrors> {
        readFile(fileName)
            .decode(type: T.self, decoder: JSONDecoder())
            .mapError { _ in HSErrors.unableToReadFile }
            .eraseToAnyPublisher()
    }
}

Requirements

  • iOS 15.0+
  • Xcode 15.0+
  • Swift 5.0+

why I created this app?

the main reason I created this app is give free access to supplications and prayers for Muslims without any ads or in-app purchases, and I hope this app will help you to learn more about the supplications and prayers.

Contributing

If you have any suggestions or ideas, please feel free to open an issue or pull request.

but before that, please read the contribution guidelines first.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Download

Contact

Author