Files
Jot/Carthage/Checkouts/PromiseKit/Extensions/AVFoundation/Sources/AVAudioSession+AnyPromise.m
James Griffin be7b6b5881 Add PromiseKit dependency
- Added PromiseKit dependency
2018-11-15 22:12:39 -04:00

22 lines
462 B
Objective-C

//
// AVAudioSession+PromiseKit.m
//
// Created by Matthew Loseke on 6/21/14.
//
#import "AVAudioSession+AnyPromise.h"
#import <Foundation/Foundation.h>
@implementation AVAudioSession (PromiseKit)
- (AnyPromise *)requestRecordPermission {
return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) {
[[AVAudioSession sharedInstance] requestRecordPermission:^(BOOL granted) {
resolve(@(granted));
}];
}];
}
@end