ios Xcode 5 框架/库搜索路径绝对地址
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19130744/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 5 Framework/Library Search Path Absolute Address
提问by cessmestreet
I updated my Xcode to 5.0. I added some library/framework search paths and the path it's displaying is the absolute path. For example, if my folder is in my desktop it would display /Users/username/Desktop/"foldername"/"subfolder"/"subfolder"/"framework". Because of this, whenever I check out a working copy in another mac, I have to remove references to certain libraries/frameworks and add them back in. Isn't there a way to fix it where I don't have to remove-add reference again?
我将我的 Xcode 更新到 5.0。我添加了一些库/框架搜索路径,它显示的路径是绝对路径。例如,如果我的文件夹在我的桌面上,它将显示 /Users/username/Desktop/"foldername"/"subfolder"/"subfolder"/"framework"。因此,每当我在另一台 mac 上查看工作副本时,我都必须删除对某些库/框架的引用并将它们重新添加进去。 有没有办法在我不必删除的情况下修复它?再次参考?
回答by cessmestreet
Here's what i did:
$(SRCROOT)/"subfolder"/"subfolder"/"framework"
This is what we're using before in previous Xcode versions. The reason why it wasn't working with Xcode5 is because; for some reason, whenever you add another framework to your project, it automatically adds a "\" so you need to remove those to make it work. I don't know why it does that.
这是我所做的:
$(SRCROOT)/"subfolder"/"subfolder"/"framework"
这是我们之前在以前的 Xcode 版本中使用的。它不能与 Xcode5 一起使用的原因是因为;出于某种原因,每当您向项目添加另一个框架时,它都会自动添加一个“\”,因此您需要删除它们才能使其工作。我不知道为什么会这样。
回答by marcwjj
I was able to solve the same problem with the latest Xcode (v5.1), add this to the Library Search Paths in Build Settings and make sure you select recursive, delete other library paths which might be absolute paths.
我能够使用最新的 Xcode (v5.1) 解决同样的问题,将其添加到 Build Settings 中的 Library Search Paths 并确保选择递归,删除其他可能是绝对路径的库路径。
$(PROJECT_DIR) recursive
回答by Michael Dautermann
The best way to add in a folder full of files, when you drag it into your project, is to make certain the "Copy Items Into Destination Folder" checkbox is checked to on.
添加一个充满文件的文件夹的最佳方法是,当您将其拖入项目时,确保选中“将项目复制到目标文件夹”复选框。
Then you'll avoid the trouble you've just found yourself in.
这样你就可以避免刚刚遇到的麻烦。
回答by Gautam Jain
Like I mentioned in this answer:
就像我在这个答案中提到的:
Well I faced the same issue and $(SRCROOT) didn't help. Here's the fix that worked for me. Go to framework search paths. Delete whatever is there and add ./ and make it recursive.
好吧,我遇到了同样的问题,而 $(SRCROOT) 没有帮助。这是对我有用的修复程序。转到框架搜索路径。删除那里的任何内容并添加 ./ 并使其递归。
回答by boulder_ruby
Copied and pasted ~/Library/SDKs/ArcGIS/iOS/ArcGIS.framework
directly into /Developer/Frameworks
.
~/Library/SDKs/ArcGIS/iOS/ArcGIS.framework
直接复制粘贴到/Developer/Frameworks
.
App still isn't compiling, but I think this solved my issue here.
应用程序仍未编译,但我认为这在这里解决了我的问题。
回答by Abd Aboudi
1- Add $(SRCROOT) in Framework Search Paths and make it recursive.
1- 在框架搜索路径中添加 $(SRCROOT) 并使其递归。
2- If the previous step is not worked, go to Copy Bundle Resources and delete ArcGIS.bundle and then add it again.
2- 如果上一步不起作用,请转到复制捆绑资源并删除 ArcGIS.bundle,然后重新添加。