0

In my own Pod, I provide some Localization String files that the users can alter according to their needs. But when they run 'pod update', the files get overwritten and the changes are lost. I don't want to force the user to backup the files.

Is there any way to fix this? Any way run a script before 'pod update' runs?

Suvrat Apte
  • 161
  • 10

1 Answers1

0

The issue is that you are providing these files to the user to alter as per their needs. You should instead have a hook to let them add their files to your pod. When you do a pod update, you are essentially deleting and re-downloading your project's files in the Pods/ directory if a new version of your Pod is available. That's why your localization files are getting deleted.

You can fix this by having a prepare_command that copies these files outside the Pods/ folder and then re-adds them to the project, or simply have the users add these files in separately.

gran_profaci
  • 8,087
  • 15
  • 66
  • 99