【问题标题】:Weird log messages when creating SMS using MFMessageComposeViewController (iPhone)使用 MFMessageComposeViewController (iPhone) 创建 SMS 时出现奇怪的日志消息
【发布时间】:2011-10-08 22:16:00
【问题描述】:

当我在我的应用程序中创建一条短信时,出现了一些奇怪的日志消息,我不明白。我在网上四处寻找解决方案,但我找不到任何东西。这些是打印的消息:

warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.5 (8L1)/Symbols/System/Library/Frameworks/IOKit.framework/IOKit (file not found).
warning: No copy of IOKit.framework/IOKit found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Tried to remove a non-existent library: /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.5 (8L1)/Symbols/System/Library/Frameworks/IOKit.framework/IOKit

我该如何解决这些问题?我试图找到一个 IOKit 框架,但似乎没有内置到 Xcode 中。如果我提交我的应用程序,它会因为这些消息而被拒绝吗?

这是我用来创建和显示短信的代码:

- (void)smsLocation:(NSString *)locationDetails
{
    if([MFMessageComposeViewController canSendText])
    {
        MFMessageComposeViewController *smsController = [[MFMessageComposeViewController alloc] init];
        smsController.messageComposeDelegate = self;
        smsController.body = @"Some text";

        [self presentModalViewController:smsController animated:YES];
        [smsController release];
    }
}

我还有一个委托方法是:

- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result
{
    [self becomeFirstResponder];
    [self dismissModalViewControllerAnimated:YES];
}

【问题讨论】:

  • “当我创建短信时”是什么意思?...如果您想要商店中的应用,则无法在应用中设置/获取短信。
  • 哦,好吧,我没有意识到这一点。谢谢。
  • @Mat - 使用 MFMessageComposeViewController 你可以打开一个内置的短信窗口,允许你发送短信。挺常见的,apple developer上的文档很好:developer.apple.com/library/ios/#documentation/MessageUI/…
  • @JonW09 - 你能发布你用来发送短信的代码吗?
  • @adamsiton 我已经发布了我用来生成 SMS 的代码。

标签: iphone sms warnings logging iokit


【解决方案1】:

显然,这是一个众所周知的问题。您可以阅读以下帖子:

Unable to read symbols warning after updating to 4.3.3

iPhone app crashes on device, File not found

libXcodeDebuggerSupport.dylib is missing in iOS 4.2.1 development SDK

虽然那里的解决方案都不适合我。

但是,搜索苹果开发者论坛会得到来自苹果支持团队之一的以下答案:

在此处搜索详细信息,但简短的回答是您可以忽略...

我猜这是一个不会导致任何问题的已知错误 - 除了警告之外,代码运行良好。

顺便说一句,如果它真的困扰你,你可以通过简单地复制文件 IOKit 来摆脱至少第一个警告:

/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J2)/Symbols/System/Library/Frameworks/IOKit.framework/Versions/A

到:

/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J2)/Symbols/System/Library/Frameworks/

(或者您使用的是哪个框架而不是 4.3.3)

【讨论】:

  • 好的,非常感谢您提供的所有信息。所以可以肯定地说我可以不理会我的代码,当我将它提交到应用商店进行审查时,它应该不会引起任何担忧?
  • 是的。此代码不应导致应用商店审核出现任何问题。
猜你喜欢
  • 2012-11-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-05-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多