You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 19, 2025. It is now read-only.
if ([error.domain isEqualToString:ALAssetsLibraryErrorDomain]) {
233
+
if (error.code == ALAssetsLibraryAccessUserDeniedError || error.code == ALAssetsLibraryAccessGloballyDeniedError) {
234
+
dispatch_async(dispatch_get_main_queue(), ^{
235
+
NSString *otherButtonTitle = nil;
236
+
if ([[selfclass] isiOS8OrAbove]) {
237
+
otherButtonTitle = NSLocalizedString(@"Open Settings", @"Go to the settings app");
238
+
}
239
+
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Media Library", @"Title for alert when access to the media library is not granted by the user")
240
+
message:NSLocalizedString(@"This app needs permission to access your device media library in order to add photos and/or video to your posts. Please change the privacy settings if you wish to allow this.", @"Explaining to the user why the app needs access to the device media library.")
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Media Capture", @"Title for alert when access to media capture is not granted")
489
-
message:NSLocalizedString(@"This app needs permission to access the Camera to capture new media, please change the privacy settings if you wish to allow this.", @"")
490
-
delegate:self
491
-
cancelButtonTitle:NSLocalizedString(@"OK", nil)
492
-
otherButtonTitles:nil] show];
518
+
[selfshowAlertAboutMediaCapturePermission];
493
519
return;
494
520
}
495
521
[selfshowMediaCaptureViewController];
@@ -499,14 +525,26 @@ - (void)captureMedia
499
525
}
500
526
501
527
dispatch_async(dispatch_get_main_queue(), ^{
502
-
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Media Capture", @"Title for alert when access to media capture is not granted")
503
-
message:NSLocalizedString(@"This app needs permission to access the Camera to capture new media, please change the privacy settings if you wish to allow this.", @"")
504
-
delegate:self
505
-
cancelButtonTitle:NSLocalizedString(@"OK", nil)
506
-
otherButtonTitles:nil] show];
528
+
[selfshowAlertAboutMediaCapturePermission];
507
529
});
508
530
}
509
531
532
+
- (void)showAlertAboutMediaCapturePermission
533
+
{
534
+
NSString *otherButtonTitle = nil;
535
+
if ([[selfclass] isiOS8OrAbove]) {
536
+
otherButtonTitle = NSLocalizedString(@"Open Settings", @"Go to the settings app");
537
+
}
538
+
539
+
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Media Capture", @"Title for alert when access to media capture is not granted")
540
+
message:NSLocalizedString(@"This app needs permission to access the Camera to capture new media, please change the privacy settings if you wish to allow this.", @"")
0 commit comments