I'm trying to deploy a framework to /Library/Frameworks but I'm not sure if I'm dealing with a permissions issue or build configuration issue, or something else.
In the framework target's Deployment section I've set:
Deployment Location: Yes
DSTROOT: /
INSTALL_PATH: /Library/Frameworks
Skip Install: No
I get the following error when building for running:
SymLink /Library/Frameworks/MyKit.framework/Versions/Current A (in target 'MyKit' from project 'MyKit')
cd /Users/rayascott/Developer/bitbucket/MyApp/MyAppSpace/Projects/MyKit
/bin/ln -sfh A /Library/Frameworks/MyKit.framework/Versions/Current
error: unable to create symlink at '/Library/Frameworks/MyKit.framework/Versions/Current' (in target 'MyKit' from project 'MyKit')
Nothing is deployed to /Library/Frameworks/.
I've given Xcode full disk access, but I'm guess that's not enough for it to access system folders. Am I better off with a zsh script and sudo from the command line to deploy this? I do really need to place it there, as I have a priviledged helper tool that needs to access this framework.
On a side note: how would a user of my app be able to deploy this framework to /Library/Frameworks if they aren't an Administrator? Would I then have to deploy to ~/Library/Frameworks? But I see that's discouraged. How does everyone else get this working in for a deployed release build? Thanks.
Ideally, you would just embed such frameworks inside your app. If you are developing a framework along with an app, you can configure an Xcode workspace that contains both the app and the framework. Xcode will know how to properly sync them together. The framework project and the app project need to by side-by-side. If you are just trying to deploy a project, you would create an installer package. When you install it, as root, it will be able to write to /Library/Frameworks.