Skip to content

Commit

Permalink
Fixed RequestPermissionAsync not working on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirkula committed Jan 18, 2024
1 parent 705dabf commit 535827c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Plugins/NativeGallery/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Native Gallery for Android & iOS (v1.7.8) =
= Native Gallery for Android & iOS (v1.7.9) =

Documentation: https://github.com/yasirkula/UnityNativeGallery
FAQ: https://github.com/yasirkula/UnityNativeGallery#faq
Expand Down
2 changes: 1 addition & 1 deletion Plugins/NativeGallery/iOS/NativeGallery.mm
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ + (int)requestPermission:(BOOL)readPermission permissionFreeMode:(BOOL)permissio
// version < iOS 8: request permission using AssetsLibrary framework (Photos framework not available)
result = [self requestPermissionOld:asyncMode];
}
#endif

if( asyncMode && result >= 0 ) // Result returned immediately, forward it
UnitySendMessage( "NGPermissionCallbackiOS", "OnPermissionRequested", [self getCString:[NSString stringWithFormat:@"%d", result]] );

return result;
#endif
}

#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.yasirkula.nativegallery",
"displayName": "Native Gallery",
"version": "1.7.8",
"version": "1.7.9",
"documentationUrl": "https://github.com/yasirkula/UnityNativeGallery",
"changelogUrl": "https://github.com/yasirkula/UnityNativeGallery/releases",
"licensesUrl": "https://github.com/yasirkula/UnityNativeGallery/blob/master/LICENSE.txt",
Expand Down

0 comments on commit 535827c

Please sign in to comment.