Skip to content

Commit

Permalink
Photo Library Usage Description doesn't override Xcode setting if it'…
Browse files Browse the repository at this point in the history
…s empty
  • Loading branch information
yasirkula committed Oct 28, 2023
1 parent c777ed2 commit e3428e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Plugins/NativeGallery/Editor/NGPostProcessBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ public static void OnPostprocessBuild( BuildTarget target, string buildPath )
plist.ReadFromString( File.ReadAllText( plistPath ) );

PlistElementDict rootDict = plist.root;
rootDict.SetString( "NSPhotoLibraryUsageDescription", Settings.Instance.PhotoLibraryUsageDescription );
rootDict.SetString( "NSPhotoLibraryAddUsageDescription", Settings.Instance.PhotoLibraryAdditionsUsageDescription );
if( !string.IsNullOrEmpty( Settings.Instance.PhotoLibraryUsageDescription ) )
rootDict.SetString( "NSPhotoLibraryUsageDescription", Settings.Instance.PhotoLibraryUsageDescription );
if( !string.IsNullOrEmpty( Settings.Instance.PhotoLibraryAdditionsUsageDescription ) )
rootDict.SetString( "NSPhotoLibraryAddUsageDescription", Settings.Instance.PhotoLibraryAdditionsUsageDescription );
if( Settings.Instance.DontAskLimitedPhotosPermissionAutomaticallyOnIos14 )
rootDict.SetBoolean( "PHPhotoLibraryPreventAutomaticLimitedAccessAlert", true );

Expand Down

0 comments on commit e3428e7

Please sign in to comment.