|
@@ -104,6 +104,10 @@ RCT_ENUM_CONVERTER(RNPermission, (@{
|
104
|
104
|
|
105
|
105
|
@end
|
106
|
106
|
|
|
107
|
+@interface RNPermissions ()
|
|
108
|
+@property (nonatomic, strong) NSMutableDictionary<NSString *, id<RNPermissionHandler>> *_Nonnull handlers;
|
|
109
|
+@end
|
|
110
|
+
|
107
|
111
|
@implementation RNPermissions
|
108
|
112
|
|
109
|
113
|
RCT_EXPORT_MODULE();
|
|
@@ -226,13 +230,13 @@ RCT_EXPORT_MODULE();
|
226
|
230
|
}
|
227
|
231
|
|
228
|
232
|
- (NSString *)insertHandler:(id<RNPermissionHandler>)handler {
|
229
|
|
- if( self.handlers == nil){
|
230
|
|
- self.handlers = [NSMutableDictionary new];
|
|
233
|
+ if(_handlers == nil){
|
|
234
|
+ _handlers = [NSMutableDictionary new];
|
231
|
235
|
}
|
232
|
236
|
|
233
|
237
|
NSString *randomId = [[NSUUID UUID] UUIDString];
|
234
|
238
|
|
235
|
|
- [self.handlers setObject:handler forKey:randomId];
|
|
239
|
+ [_handlers setObject:handler forKey:randomId];
|
236
|
240
|
|
237
|
241
|
return randomId;
|
238
|
242
|
}
|