nickoneill / PermissionScope

Intelligent iOS permissions UI and unified API
MIT License
4.85k stars 507 forks source link

How to use Permissions API in Objective-C? #175

Closed thomasgpeng closed 7 years ago

thomasgpeng commented 8 years ago

Does anyone know how to use the unified permissions API in an Objective-C project? So far I've got:

PermissionScope *pScope = [[PermissionScope alloc] init];
if (pScope.statusLocationAlways == ???) {

}

I'm not sure how to use the Swift enums in this code however and couldn't find any examples. Any help would be much appreciated.

nickoneill commented 8 years ago

Hi @thomasgpeng, have you examined the ObjC example project?

thomasgpeng commented 8 years ago

@nickoneill Yes I have, but it only has an example of how to use the UI (which works great), not the permissions API as far as I can tell.

Thanks a lot for this library, btw. Rejected permisisons are a huge issue for my app so I'm looking forward to implementing this.

bre7 commented 7 years ago

Check:

Mind the bugs (e.g: #130)