Xcode 7 Beta 6,dyld ___NSArray0__ 崩溃
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32211894/
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 7 Beta 6, dyld ___NSArray0__ crash
提问by Sachin
For the first time I was able to compile my app in Xcode 7 (failed in beta 4 and 5). So, thats good progress I guess.
我第一次能够在 Xcode 7 中编译我的应用程序(在 beta 4 和 5 中失败)。所以,我猜这是一个很好的进步。
However, when i load my app on my iPhone 6, iOS 8.4.1, it crashed in the debugger with the following message:
但是,当我在 iPhone 6、iOS 8.4.1 上加载我的应用程序时,它在调试器中崩溃并显示以下消息:
dyld: Symbol not found: _NSArray0Referenced from: /private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq Expected in: /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation in /private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq
dyld:找不到符号:_NSArray0引用自:/private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq 预期在:/System/Library/Frameworks/CoreFoundation。 /private/var/mobile/Containers/Bundle/Application/0294DF62-AE80-485D-BB11-8C3A5D39777D/Boxtiq.app/Boxtiq中的框架/CoreFoundation
Is this something to do with the order of the libraries being linked? Look forward to some advise.
这与链接库的顺序有关吗?期待一些建议。
Thanks!
谢谢!
采纳答案by johnnyg17
I experienced the same exact crash running Xcode 7.0 beta 6 on a device with the first iOS 9 beta installed, the crash however was not occurring while using the simulator.
我在安装了第一个 iOS 9 beta 的设备上运行 Xcode 7.0 beta 6 时遇到了同样的崩溃,但是在使用模拟器时没有发生崩溃。
After updating my iPhone to iOS 9 beta 5, the crash stopped.
将我的 iPhone 更新到 iOS 9 beta 5 后,崩溃停止了。
回答by Dan
I fixed it by putting this in the podfile. platform :ios, '8.4'No need to update your device to iOS 9 and lose out on 8.4 testing.
我通过将它放在 podfile 中来修复它。 平台 :ios, '8.4'无需将您的设备更新到 iOS 9 并在 8.4 测试中失败。
回答by A. Trejo
I had the same error and I fixed. I removed CoreFoundation.framework and Add again with Status "Optional" and works.
我有同样的错误,我修复了。我删除了 CoreFoundation.framework 并再次添加状态为“可选”并工作。
回答by Sergey Katranuk
回答by nguyen van
I also had this problem and I fixed it by adding framework CoreFoundation.framework to Build Settings.
我也遇到了这个问题,我通过将框架 CoreFoundation.framework 添加到构建设置来修复它。
回答by Suresh D
This as a problem on iOS8 build with the new XCODE release, Please remove CoreFoundation.frameworkand Add it again with Status of "Optional".
这是使用新 XCODE 版本构建的 iOS8 上的一个问题,请删除CoreFoundation.framework并重新添加它,状态为“ Optional”。
回答by Mike Demidov
I used to have the same error during compilation of a mac os project after updating the Xcode for 7.0 GM version (7A218). Xcode 7 has the 10.11 sdk in it only (you could check that in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, where it's a MacOSX10.11.sdk).
我曾经在更新 Xcode 7.0 GM 版本(7A218)后,在编译 mac os 项目时出现同样的错误。Xcode 7 中仅包含 10.11 sdk(您可以在 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs 中查看,它是 MacOSX10.11.sdk)。
At compilation time the xcode will link the frameworks from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks, but at runtime from /System/Library/Frameworks/ as I guess.
在编译时,xcode 将链接来自 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks 的框架,但在运行时来自 /System/图书馆/框架/我猜。
I have OS X 10.10.5 (14F27) on mac. Either I have my static library that I've built by xcode 7 (MacOSX10.11.sdk as you remember from earlier), which I've linked to my project after. After running I got the runtime error as
我在 Mac 上有 OS X 10.10.5 (14F27)。要么我有我用 xcode 7 构建的静态库(MacOSX10.11.sdk,你记得之前),我已经链接到我的项目。运行后我得到了运行时错误
dyld: Symbol not found: _NSArray0
dyld:未找到符号:_NSArray0
I think it's because the library has been compiled with CoreFoundation.framework from mac os sdk 10.11, but at runtime was linked to CoreFoundation.framework from /System/Library/Frameworks/ where version of which is 10.10 (as OS version).
我认为这是因为该库是使用来自 mac os sdk 10.11 的 CoreFoundation.framework 编译的,但在运行时链接到来自 /System/Library/Frameworks/ 的 CoreFoundation.framework,其中版本为 10.10(作为操作系统版本)。
How I fixed this. Friend of mine has xcode 6 yet, I took mac os sdk 10.10 from there (as you remember in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs, name is MacOSX10.10.sdk) and added it to Xcode of mine. Then I rebuilt my static library with 10.10 sdk (you could compile from cli with '-sdk macosx10.10' parameter or set build sdk in Build Settings => Base SDK). After the problem has been solved.
我是如何解决这个问题的。我的朋友有 xcode 6,我从那里拿了 mac os sdk 10.10(你记得在 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs,名字是 MacOSX10.10.sdk)并将其添加到我的 Xcode 中。然后我用 10.10 sdk 重建了我的静态库(您可以使用 '-sdk macosx10.10' 参数从 cli 编译或在 Build Settings => Base SDK 中设置 build sdk)。问题解决后。
I assume that for the iOS you could apply the same strategy.
我假设对于 iOS,您可以应用相同的策略。


