xcode iphone sdk 4.2.1 的问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4260291/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:36:25  来源:igfitidea点击:

Issue with iphone sdk 4.2.1

iphonexcodeios4

提问by Chrizzz

Probably a silly question. When running my project on the Device in the debug mode I get a lot of warnings al having the following string:

大概是个愚蠢的问题。在调试模式下在设备上运行我的项目时,我收到很多警告,其中包含以下字符串:

warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)/Symbols/System/Library/PrivateFrameworks/

警告:无法读取 /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)/Symbols/System/Library/PrivateFrameworks/ 的符号

I think its due to the space between "4.2.1" and "(8C148a)". How can i get rid of it? It must be a setting somewhere in Xcode.

我认为这是由于“4.2.1”和“(8C148a)”之间的空格造成的。我怎样才能摆脱它?它必须是 Xcode 中某处的设置。

I dont have these warnings on the simulator.

我在模拟器上没有这些警告。

thanks in advance, Christian

提前致谢,克里斯蒂安

回答by GnarlyDog

I was getting:

我得到:

warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/info/dns.so (file not found).

警告:无法读取 /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/usr/lib/info/dns.so 的符号(未找到文件)。

Version 4.2.1 does not include 'info/dns.so'. At least that was the case for me. However, it does exist in the 4.2 directory and is pointed to by the /DeviceSupport/Latestshortcut. I simply copy-pasted 'info/dns.so' to where the debugger was looking for it and that seemed to fix the warning.

4.2.1 版不包括​​“info/dns.so”。至少对我来说是这样。但是,它确实存在于 4.2 目录中,并由 /DeviceSupport/ Latest快捷方式指向。我只是将“info/dns.so”复制粘贴到调试器正在寻找它的位置,这似乎解决了警告。

回答by akaru

I had this issue with 4.2.1 (8C148a), which I believe is caused by differing DeviceSupport files on the phone and in XCode. I tried many things, but eventually resolved it by deleting this folder:

我在 4.2.1 (8C148a) 上遇到了这个问题,我认为这是由手机和 XCode 上的不同 DeviceSupport 文件引起的。我尝试了很多东西,但最终通过删除此文件夹来解决它:

/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)/

/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148a)/

After this I plugged in my iOS device and was asked to connect and restore the symbol files from the device, and it worked normally again.

在此之后,我插入了我的 iOS 设备,并被要求从设备连接和恢复符号文件,它再次正常工作。

回答by hotpaw2

When you plug an iOS device (iPad) with a slightly newer OS than the the ones in the SDK, a button to download new symbols should appear in the Organizer window of Xcode. Hit it and wait.

当您使用比 SDK 中的操作系统稍新的操作系统插入 iOS 设备 (iPad) 时,Xcode 的管理器窗口中应该会出现一个用于下载新符号的按钮。打它并等待。

回答by tc.

I don't think 8C148a is "final"; final builds numbers never seem to end in a letter (my phone is reporting "4.2.1 (8C148)"). I haven't debugged apps on it yet (I got bored waiting for it to extract symbols and went home).

我不认为 8C148a 是“最终的”;最终版本号似乎永远不会以字母结尾(我的手机报告“4.2.1 (8C148)”)。我还没有在它上面调试应用程序(我厌倦了等待它提取符号并回家)。

4.2 GM was 8C134, so you're certainly running newer software, but something somewhere is getting the build number wrong.

4.2 GM 是 8C134,所以您肯定在运行更新的软件,但某些地方的内部版本号出错了。

But I digress.

但我离题了。



What directories are in /Developer/Platforms/iPhoneOS.platform/DeviceSupport? If "4.2.1 (8C148a)" doesn't exist but "4.2.1" does, you might have luck doing something like this in Terminal:

/Developer/Platforms/iPhoneOS.platform/DeviceSupport 中有哪些目录?如果 "4.2.1 (8C148a)" 不存在但 "4.2.1" 存在,你可能会在终端中做这样的事情:

cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport
ln -s "4.2.1" "4.2.1 (8C134a)"

Equivalently, if "4.2.1 (8C148)" exists, do something like this instead:

等效地,如果“4.2.1 (8C148)”存在,请执行以下操作:

ln -s "4.2.1 (8C148)" "4.2.1 (8C148a)"

You can generally use this trick to get Xcode to talk to a beta device without installing a beta SDK; this is useful if your company has some people running the beta (for testing purposes) and other people on the latest "final" (for release purposes).

您通常可以使用此技巧让 Xcode 与 beta 设备对话,而无需安装 beta SDK;如果您的公司有一些人在运行 Beta 版(用于测试目的),而另一些人在运行最新的“最终版”(用于发布目的),这将非常有用。

回答by Mark Adams

I've seen errors like that when my device wasn't on the same version as what I was building for. Are you sure you're not on a 4.2 beta?

当我的设备与我正在构建的版本不同时,我看到过类似的错误。你确定你不是在 4.2 测试版?

回答by Luke

There's a mismatch at the moment, where the released version of 4.2.1 is ahead of the SDK version 4.2

目前存在不匹配,4.2.1 的发布版本领先于 SDK 4.2 版本

@Khrob's comment fixed it for me though!

不过@Khrob 的评论为我修复了它!

回答by Moose

Until they provide a solid SDK, a cool workaround is to :

在他们提供可靠的 SDK 之前,一个很酷的解决方法是:

1 - select the Executable ( In 'Executables' in the project browser ),

1 - 选择可执行文件(在项目浏览器的“可执行文件”中),

2 - get info and turn off "Break on Debugger() and DebugStr()"*

2 - 获取信息并关闭“Break on Debugger() 和 DebugStr()”*

Cheers, and best wishes for 2011.

干杯,并祝福2011年。

T

This does not disable NSLog.

这不会禁用 NSLog。

回答by Brad Howes

I have 4.2.1 on an iPhone 3G and Xcode 3.2.5 running on a MacBook Pro with 10.6.6. After a clean install of Xcode, I was getting the prompt to download symbols for 4.2.1 after plugging in my iPhone. After the transfer, I would no longer get the prompt when attaching the iPhone, but I was getting tons of "unable to read symbols" messages.

我在 iPhone 3G 和 Xcode 3.2.5 上运行 4.2.1,在 10.6.6 的 MacBook Pro 上运行。全新安装 Xcode 后,我在插入 iPhone 后收到提示下载 4.2.1 的符号。转移后,我在连接 iPhone 时不再收到提示,但我收到了大量“无法读取符号”的消息。

First, what did not work for me:

首先,什么对我不起作用:

  • Creating symbolic link to '4.2 (8C134)' with the name '4.2.1 (8C148)'
  • Creating symbolic link inside directory '4.2.1 (8C148)' like there is in '4.2 (8C134)' to the ../../Developer/SDKs/iPhoneOS4.2.sdk
  • 使用名称“4.2.1 (8C148)”创建指向“4.2 (8C134)”的符号链接
  • 在目录 '4.2.1 (8C148)' 内创建符号链接,就像在 '4.2 (8C134)' 到 ../../Developer/SDKs/iPhoneOS4.2.sdk 一样

Both of the above caused the 'UUID mismatch' errors for several libraries. GDB would start but appear to hang.

以上两个都导致了几个库的“UUID 不匹配”错误。GDB 会启动但似乎挂起。

Finally, what is currently working for me:

最后,目前对我有用的是:

  • % cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport
  • % mkdir '4.2.1 (8C148)' # if it does not exist
  • % cd '4.2.1 (8C148)'
  • % cp ../4.2\ \(8C134\)/DeveloperDiskImage.dmg* .
  • % cp -r ../../Developer/SDKs/iPhoneOS4.2.sdk Symbols
  • Attempt to run debug session for an application and watch the Console. For each warning about a UUID mismatch, remove the file indicated in the log message (I had AudioToolbox, CoreMedia, and some others)
  • Stop GDB and try again, hopefully with success
  • % cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport
  • % mkdir '4.2.1 (8C148)' # 如果不存在
  • % cd '4.2.1 (8C148)'
  • % cp ../4.2\\(8C134\)/DeveloperDiskImage.dmg*。
  • % cp -r ../../Developer/SDKs/iPhoneOS4.2.sdk 符号
  • 尝试为应用程序运行调试会话并观察控制台。对于关于 UUID 不匹配的每个警告,删除日志消息中指示的文件(我有 AudioToolbox、CoreMedia 和其他一些)
  • 停止 GDB 并重试,希望成功

At least for my application under development, everything now works fine. Hopefully, Xcode 4.0 will clear this up.

至少对于我正在开发的应用程序,现在一切正常。希望 Xcode 4.0 能解决这个问题。