Permissions problem adding a platform

Hi everyone, I’m just trying to add the ios paltform normally but I can’t, now I’ll explain…

I can add this platform with “sudo ionic cordova platform add ios” but if I do that, “pod install” cannot work because you cannot use it with sudo command, and without this command it doesn’t work nether.

Then I realized that I had to install ios platform without “sudo”, something like “ionic cordova paltform add ios” and then probably I’ll fix the problem of “pod install” not working.

But not I’ve another problem, and this is what I want to fix, when I use “ionic cordova platform add ios” it throws me this error:

        '/Users/<myusername>/.config/configstore/insight-cordova.json'
        You don't have access to this file.

Some solution?

Thank you!

Use chown to give your user ownership of all relevant files and directories. This is a reason why one should not run ionic as root ever.

I finally fixed it, the solution was give permissions to the iOS folder. Now I’ve a new problem, my app doesn’t find the file Pods.lock and Manifest.lock.