Reputation: 1950
Someone made the mistake of using "sudo ionic add platform ios" and it has entirely broken my cordova for x-Code.
Nothing will build in x-code due to permission problems about accessing Cordova.
If I run "ionic platform add ios", it gives me:
Error: EACCES: permission denied, open '/Users/mac1/.config/configstore/update-notifier-cordova.json'
You don't have access to this file.
During the build, it gives me a build failed message:
" CompileC build/stashd.build/Debug-iphonesimulator/stashd.build/Objects-normal/i386/MyMainViewController.o stashd/Plugins/com.telerik.plugins.wkwebview/MyMainViewController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/mac1/Dev/John/ionic5/platforms/ios/cordova/build-debug.xcconfig,-project,stashd.xcodeproj,ARCHS=i386,-target,stashd,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/mac1/Dev/John/ionic5/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/mac1/Dev/John/ionic5/platforms/ios/build/sharedpch"
Trying to run in x-code it tells me
You don’t have permission to save the file “project.xcworkspace” in the folder “stashd.xcodeproj”.
Again- all this started to happen when Sudo was used (I never had to use it before, and ionic/Cordova worked perfectly).
So far I've:
Removed & re-installed Node.js, Ionic, NPM and Cordova. None have helped- I still require sudo.
Upvotes: 0
Views: 336
Reputation: 966
First remove ios platform use sudo
:
sudo ionic platform rm ios
or:
sudo rm -rf platforms
And then, delete files that can't be visited:
sudo rm ~/.config/configstore/update-notifier-cordova.json
And then, add ios platform without sudo
:
ionic platform add ios
Hope this will help, regards.
Upvotes: 3