ICanHas alternatives and similar libraries
Based on the "Permissions" category.
Alternatively, view ICanHas alternatives based on common mentions on social networks and blogs.
-
PermissionScope
Intelligent iOS permissions UI and unified API (Supports Location, Notifications, Camera, Contacts, Calendar, Photos, Microphone, BT, Activity Monitoring, HealthKit and CloudKit). -
SPPermissions
Universal API for request permission and get its statuses. -
ClusterPrePermissions
Cluster's reusable pre-permissions utility that lets developers ask the users on their own dialog for photos or contacts access, before making the system-based request. This is based on the Medium post by Cluster describing the different ways to ask for iOS permissions (https://medium.com/p/96fa4eb54f2c). -
AREK
AREK is a clean and easy way to request any kind of iOS permission (with some nifty features ๐ค) -
STLocationRequest
Request the Location Services via a 3D 360ยฐ flyover MKMapView ๐บ -
ISHPermissionKit
A polite and unified way of asking for permission on iOS -
JLPermissions
An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of ICanHas or a related project?
README
ICanHas
Swift 4 library that simplifies iOS user permission requests (push notifications, location, camera, photo library, contacts, calendar).
Installation
Just add ICanHas.swift to your Xcode project (I know, I know).
Usage
Use the provided method every time you need to make sure that the app has permissions to access the corresponding service. The first time a function is called, it may prompt the user to allow that service on a native alert view. See the examples below
Location:
ICanHas.location { authorized, status in
print(authorized ? "You're authorized to use location!" : "You're not authorized to use location!")
}
๐ก You may specify whether you would like the app to be able to access location while in the background, and/or the location manager you will be using, as follows:
let myManager = CLLocationManager()
ICanHas.location(background: false, manager: myManager) { ... }
๐ก Also make sure to add the NSLocationWhenInUseUsageDescription
or NSLocationAlwaysUsageDescription
key to your Info.plist
file. More info here.
Push Notifications:
ICanHas.push { authorized in
print(authorized ? "You're authorized to send push notes!" : "You're not authorized to send push notes!")
}
๐ก This function has one optional parameter types: UIUserNotificationType
which specifies the user notification types for which you would like the app to be registered. The default value includes all types [.alert, .badge, .sound]
.
๐ก For this authorization to work, you will need to run your app on a device (the simulator cannot register for push notifications) and make sure you have all the necessary provisioning and certificates. More info here.
Calendar:
ICanHas.calendar { authorized, status, error in
print(authorized ? "You're authorized to access the calendar!" : "You're not authorized to access the calendar!")
}
๐ก You may optionally specify an EKEventStore
and/or an entity type. For example:
let myStore = EKEventStore()
ICanHas.calendar(store: myStore, type: .event) { ... }
Capture (Camera, Microphone, etc):
ICanHas.capture { authorized, status in
print(authorized ? "You're authorized to access the camera!" : "You're not authorized to access the camera!")
}
๐ก To request access to the microphone use the optional type
parameter: ICanHas.capture(type: .audio) { ... }
. See AVMediaType
for other available types.
Photos (Library):
ICanHas.photos { authorized, status in
print(authorized ? "You're authorized to access photos!" : "You're not authorized to access photos!")
}
Contacts:
ICanHas.contacts { authorized, status, error in
print(authorized ? "You're authorized to access contacts!" : "You're not authorized to access contacts!")
}
๐ก You may optionally specify the address book reference you would like to use:
let addressBook = ABAddressBookCreateWithOptions(nil, nil)?.takeRetainedValue()
ICanHas.contacts(addressBook: addressBook) { ... }
License
ICanHas is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the ICanHas README section above
are relevant to that project's source code only.