了解 Xcode 决定链接到特定库的原因
我正在使用 Unity 3D 引擎构建 iPhone 应用程序,当我生成 Xcode 项目进行编译时,它包含一些相当大的库:Mono.Security.dll.s、System.dll.s、System. Core.dll.s 等。
我不知道这个问题是否真的是 Xcode 问题或 Unity 问题,但我试图找出为什么每个库都被链接 -正在引用哪些函数/类 - 理想情况下,这样我就可以重写我的代码以删除尽可能多的依赖项。有人知道如何找到这些信息吗?
I'm using the Unity 3D engine to build an iPhone app, and when I go to generate my Xcode project for compilation, it includes a few fairly large libraries: Mono.Security.dll.s, System.dll.s, System.Core.dll.s, etc.
I don't know if this question is really an Xcode question or a Unity question, but I'm trying to figure out why each of those libraries is being linked - which functions / classes are being referenced - ideally so that I can rewrite my code to remove as many of the dependencies as possible. Does anybody know a way to find this information out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否使用任何外部组件?如果是这样,您应该获取它们的源代码并检查它们包含的内容。有时可以禁用外部程序集中的内容以删除不需要的依赖项。
进入 Unity 中的“项目设置 -> 播放器”菜单,并确保剥离级别设置得尽可能高。剥离将尝试将 System.Core 与 mscorlib 交换,其中不包括 Linq 等内容。
找出为什么包含特定程序集的方法是打开 MonoDevelop 解决方案的引用部分,然后双击程序集。这将打开程序集浏览器,您将能够了解依赖于特定程序集的命名空间。
Are you using any external assemblies? If so you should get the source code for them and check what they are including. Sometimes it's possible to disable stuff in external assemblies to remove unneeded dependencies.
Go into the "project settings->player" menu in Unity and make sure that stripping level is set as high as possible. Stripping will attempt to swap System.Core with mscorlib, which doesn't include stuff like Linq.
A way to find out why a particular assembly is being included is to open up the references section of your MonoDevelop solution, and double-click on an assembly. This will open the assembly browser and you'll be able to get an idea of the namespaces that depend on a particular assembly.
这个DLL的东西是由Unity3D添加到项目中的,Xcode与此无关。您使用什么版本的Unity3D?尝试调整项目设置(检查器)中的优化选项,尤其是“剥离”。
This DLL stuff is added to project by Unity3D, Xcode has nothing to do with this. What version of Unity3D do you use? Try to tweak Optimization options in project settings (Inspector), especially 'Stripping'.