Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

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 Nov 14, 2023
1 parent 014d521 commit cd516d5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Plugins/NativeShare/Editor/NSPostProcessBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ 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.PhotoLibraryUsageDescription );
if( !string.IsNullOrEmpty( Settings.Instance.PhotoLibraryUsageDescription ) )
{
rootDict.SetString( "NSPhotoLibraryUsageDescription", Settings.Instance.PhotoLibraryUsageDescription );
rootDict.SetString( "NSPhotoLibraryAddUsageDescription", Settings.Instance.PhotoLibraryUsageDescription );
}

File.WriteAllText( plistPath, plist.WriteToString() );
}
Expand Down

0 comments on commit cd516d5

Please sign in to comment.