AREK is a clean and easy way to request any kind of iOS permission (with some nifty features πŸ€–)





GitHub Stars



Last Commit

3yrs ago











Platform Version Pod Version Carthage compatible License Swift Version

AREK is a clean and easy to use wrapper over any kind of iOS permission written in Swift.

Why AREK could help you building a better app is well described by Apple here:

Request personal data only when your app clearly needs it.
Explain why your app needs the information if it’s not obvious.
Request permission at launch only when necessary for your app to function.

Every goal could be easily reached using AREK.

  • show a native popup used to avoid burning the possibility to ask to iOS the real permission
  • show a popup to invite the user to re-enable the permission if it has been denied
  • manage through an easy configuration how many times to ask the user to re-enable the permission (Only once, every hour, once a day, weekly, always😷)

🚨 AREK is a Swift 4.2 and Xcode 10 compatible project 🚨


  • If you want to use it with Xcode 10, swift 4.2, point to the version 4.0.1
  • If you want to use it with Xcode 9, point to any prior version

Build Status


Table of Contents

  1. Implemented permissions
  2. How to use AREK
  3. Permissions Configuration
  4. How to install AREK
  5. How to contribute
  6. TODO
  7. License and Credits

Implemented permissions

  • Camera
  • Bluetooth
  • CloudKit
  • Contacts
  • Events (Calendar)
  • Health
  • Location (Always)
  • Location (When in use)
  • Media Library
  • Microphone
  • Motion
  • Notifications
  • Photo
  • Reminders
  • Siri
  • Speech Recognizer

How to use AREK

Check permission status

    let permission = ArekPhoto()

    permission.status { (status) in
        switch status {
        case .authorized:
            print("! βœ… !")
        case .denied:
            print("! ⛔️ !" )
        case .notDetermined:
            print("! πŸ€” !" )
        case .notAvailable:
            print("! 🚫 !" )

Request a permission

    let permission = ArekEvent()

    permission.manage { (status) in
        switch status {
        case .authorized:
            symbol = "βœ…"
        case .denied:
            symbol = "⛔️"
        case .notDetermined:
            symbol = "πŸ€”"
        case .notAvailable:
            return "🚫"

Permissions Configuration

General configuration

Each permission type included in AREK is configurable through the ArekConfiguration struct. Each permission has a default configuration, so if you are happy with the basic configuration you don't have to care about how it works behind the scenes.

An ArekConfiguration is made up by:

frequency: ArekPermissionFrequency (.Always, .EveryHour, .OnceADay, .OnceAWeek, .JustOnce) This frequency value is related to how often you want to the user to re-enable a permission if that one has been disallowed.

Set by default to .OnceADay

presentInitialPopup: Bool This is an initial popup used to ask kindly to the user to allow a permission. This is useful to avoid burning the possibility to show the system popup.

Set by default to true

presentReEnablePopup: Bool This is the popup used to kindly to the user to re-enable that permission. The frequency value is related to this popup.

Set by defaul to true

Configure the initial and the re-enable popup: ArekPopupData

ArekPopupData is the struct used to configure both the pre-permission popup and the re-enable popup. These popups could be instances of the amazing PMAlertController by Codeido or native iOS alerts.

The configuration is the following:

public struct ArekPopupData {
    var title: String!
    var message: String!
    var image: String!
    var type: ArekPopupType!

    public init(title: String = "", message: String = "", image: String = "", type: ArekPopupType = .codeido) {
        self.title = title
        self.message = message
        self.image = image
        self.type = type

This is an example of the ArekContacts pre-enable popup using PMAlertController:

If you want to present a native UIAlertController set the type to .native otherwise if you want to setup a PMAlertController set the type to .codeido.

Localized Strings

AREK by convention expects to find localized strings in your Localizable files in order to configure the UI.

In the following table there are the configurations for:

  • Pre-permission popup title
  • Pre-permission popup message
  • Re-enable popup title
  • Re-enable popup message
  • Popup image for that permission
  • Allow button title
  • Deny button title

Messages related to the iOS native permission popup should be configured following the conventions described here.

PermissionPre-permission TitlePre-permission MessageRe-Enable TitleRe-Enable MessageImageAllow Button TitleDeny Button Title
Media LibraryArekMediaLibrary_initial_titleArekMediaLibrary_initial_messageArekMediaLibrary_reenable_titleArekMediaLibrary_reenable_messageArekMediaLibrary_imageArekMediaLibrary_allow_button_titleArekMediaLibrary_deny_button_title
Photo LibraryArekPhoto_initial_titleArekPhoto_initial_messageArekPhoto_reenable_titleArekPhoto_reenable_messageArekPhoto_imageArekPhoto_allow_button_titleArekPhoto_deny_button_title
RemindersArekReminders_initial_titleArekReminders_initial_messageArekReminders_reenable_titleArekReminders_reenable_messageArekReminders_imageArekReminders_allow_button_titleArekReminders_ deny_button_title
Speech RecognizerArekSpeechRecognizer_initial_titleArekSpeechRecognizer_initial_messageArekSpeechRecognizer_reenable_titleArekSpeechRecognizer_reenable_messageArekSpeechRecognizer_imageArekSpeechRecognizer_allow_button_titleArekSpeechRecognizer_deny_button_title

How to install AREK


Add AREK to your Podfile

target 'MyTarget' do
    pod 'arek', '~> 2.0.2'

If you want to install just a specific permission, let's say Bluetooth, you have to specify:

target 'MyTarget' do
    pod 'arek/Bluetooth', '~> 2.0.2'
$ pod install


github "ennioma/arek" ~> 4.0.2

Then on your application target Build Phases settings tab, add a "New Run Script Phase". Create a Run Script with the following content:

/usr/local/bin/carthage copy-frameworks

and add the following paths under "Input Files":


Swift Package Manager

import PackageDescription

let package = Package(
  name: "YourApp",
  dependencies: [
    .Package(url: "", versionMajor: 2, minor: 0)
  • Note that if you want to install a Swift 3 version of Arek, the latest compatible version is the 1.7.0.
  • If you need to build it on Xcode 10, you have to point to the version 3.0.0.

Add AREK source code to your project

Add folder to your project.

πŸ™ Take care about adding the ArekHealth class to your project. It includes HealthKit in your project, so if you do this without using HealthKit, your app will be rejected during the AppStore review.

How to contribute

Contributions are welcome πŸ™Œ If you'd like to improve this projects I've shared with the community, just open an issue or raise a PR from the current develop branch.

For any information or request feel free to contact me on twitter (@ennioma).


  • [] Provide a way to inject a custom PMAlertController in a permission
  • [] Provide a way to inject the popup type when the init() is called on a permission
  • [] Update the Swift Package Manager installation

License and Credits


AREK is available under the MIT license. See the LICENSE file for more info.

Arek on the Web:

  1. This week in Swift - Natasha The Robot
  2. iOS Dev Weekly - Dave Verwer


Icones provided by Freepik and Vectors Market from Flaticon

Rate & Review

Great Documentation0
Easy to Use0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Unwelcoming Community0