Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled permission usage in tvOS target #717

Merged
merged 1 commit into from Sep 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions ios/MediaLibrary/RNPermissionHandlerMediaLibrary.m
Expand Up @@ -14,7 +14,7 @@ + (NSString * _Nonnull)handlerUniqueId {

- (void)checkWithResolver:(void (^ _Nonnull)(RNPermissionStatus))resolve
rejecter:(void (__unused ^ _Nonnull)(NSError * _Nonnull))reject {
#if TARGET_OS_SIMULATOR
#if TARGET_OS_SIMULATOR || TARGET_OS_TV
resolve(RNPermissionStatusNotAvailable);
#else
switch ([MPMediaLibrary authorizationStatus]) {
Expand All @@ -32,7 +32,7 @@ - (void)checkWithResolver:(void (^ _Nonnull)(RNPermissionStatus))resolve

- (void)requestWithResolver:(void (^ _Nonnull)(RNPermissionStatus))resolve
rejecter:(void (^ _Nonnull)(NSError * _Nonnull))reject {
#if TARGET_OS_SIMULATOR
#if TARGET_OS_SIMULATOR || TARGET_OS_TV
resolve(RNPermissionStatusNotAvailable);
#else
[MPMediaLibrary requestAuthorization:^(__unused MPMediaLibraryAuthorizationStatus status) {
Expand Down