Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在处理服务器端 swift (Perfect 2.0)。有没有办法在不使用任何 CocoaTouch 框架的情况下访问 Xcode 的构建设置变量“$(PROJECT_DIR)”或“$(SRCROOT)”。即CoreFoundation。?
实际上我想要的是从代码访问我的项目的根目录。但是使用 NSBundle 不起作用,因为它不是 CocoaTouch
我建议使用 Perfect 的文件和目录处理。 https://www.perfect.org/docs/file.html