Skip to content

Commit

Permalink
enable UIFileSharingEnabled and UISupportsDocumentBrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-psi committed Apr 8, 2022
1 parent dcc7631 commit 7704d9a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions internal/patcher/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ func PatchDiscord(discordPath *string, iconsPath *string, dylibPath *string) {
}
log.Println("icons patched")

log.Println("showing Discord's document folder in the Files app and Finder/iTunes")
if err := patchiTunesAndFiles(); err != nil {
log.Fatalln(err)
}
log.Println("patched")

packDiscord()
log.Println("cleaning up")
clearPayload()
Expand Down Expand Up @@ -178,3 +184,16 @@ func patchIcon() error {
err = savePlist(&info)
return err
}

// Show Enmity's document folder in Files app and iTunes/Finder
func patchiTunesAndFiles() error {
info, err := loadPlist()
if err != nil {
return err
}
info["UISupportsDocumentBrowser"] = true
info["UIFileSharingEnabled"] = true

err = savePlist(&info)
return err
}

0 comments on commit 7704d9a

Please sign in to comment.