【问题标题】:ShareKit for iPhone randomly crashing适用于 iPhone 的 ShareKit 随机崩溃
【发布时间】:2010-10-04 22:37:21
【问题描述】:

我在使用 iPhone 的 ShareKit 时遇到了一些问题。我有我需要的一切(主要是 Twitter、Facebook 和电子邮件),非常适合发送 URL。然而,在我的应用程序的另一部分,我正在尝试实现共享少量文本的功能。当我在分享此文本时尝试打开 Facebook 时,它会快速打开 Facebook 屏幕然后消失。此外,当我尝试共享文本时,应用程序会定期崩溃,但绝不会因为 URL 崩溃。这对我来说似乎很奇怪。

我对崩溃日志和调试等方面的经验不是很丰富,但如果有人可以指导我在应用程序崩溃时提供 xcode 提供的信息,这些信息可能会为那些专业程序员提供帮助,我一定会提供。

编辑:我只想说我将 SHConfig 文件复制到示例项目中,并且从那里开始一切正常,所以这一定是我的代码有问题。这是崩溃后显示的内容:

#0  0x028f0903 in objc_msgSend
#1  0x07540f70 in ??
#2  0x0276bf29 in __CFXNotificationPost_old
#3  0x026eb26a in _CFXNotificationPostNotification
#4  0x0019ec8a in -[NSNotificationCenter postNotificationName:object:userInfo:]
#5  0x007c11b7 in -[UIInputViewTransition postNotificationsForTransitionStart]
#6  0x007c1651 in -[UIPeripheralHost(UIKitInternal) executeTransition:]
#7  0x007b8728 in -[UIPeripheralHost(UIKitInternal) setInputViews:]
#8  0x00507403 in -[UIResponder(UIResponderInputViewAdditions) reloadInputViews]
#9  0x005079d0 in -[UIResponder becomeFirstResponder]
#10 0x0011204e in -[SHKFormFieldCell setSelected:animated:] at SHKFormFieldCell.m:116
#11 0x004b29cb in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:]
#12 0x004a924d in -[UITableView selectRowAtIndexPath:animated:scrollPosition:]
#13 0x0011051a in -[SHKFormController viewDidAppear:] at SHKFormController.m:122
#14 0x004f2a5a in -[UINavigationController viewDidAppear:]
#15 0x006d827f in -[UIWindowController transitionViewDidComplete:fromView:toView:]
#16 0x004c8905 in -[UITransitionView notifyDidCompleteTransition:]
#17 0x0046f499 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:]
#18 0x0046f32b in -[UIViewAnimationState animationDidStop:finished:]
#19 0x047a6db0 in run_animation_callbacks
#20 0x047a6c6f in CA::timer_callback
#21 0x02774f73 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
#22 0x027765b4 in __CFRunLoopDoTimer
#23 0x026d2dd9 in __CFRunLoopRun
#24 0x026d2350 in CFRunLoopRunSpecific
#25 0x026d2271 in CFRunLoopRunInMode
#26 0x02f7e00c in GSEventRunModal
#27 0x02f7e0d1 in GSEventRun
#28 0x0044daf2 in UIApplicationMain
#29 0x00002690 in main at main.m:15

【问题讨论】:

  • 我使用 PinkelStar 实现原生分享。效果很好,并提供额外的统计数据。

标签: iphone sharekit


【解决方案1】:

嘿,Rob,尝试使用以下方法查找崩溃发生的位置: How to add a breakpoint to objc_exception_throw?

然后回发导致崩溃的对象/方法。

您可能还想尝试将您的 SHKConfig.h 文件从您的项目复制到 ShareKit 中提供的示例项目中,以查看崩溃是否仍然发生。如果是,那么是 Sharekit 的问题,如果不是,则问题出在您自己的应用程序中。

【讨论】:

  • 我按照链接中的说明进行操作,当应用程序崩溃时,它把我踢回了 xcode。我仍然不太清楚我现在在寻找什么。在左下角显示“GDB:程序接收信号:“EXC_BAD_ACCESS”
【解决方案2】:

我找到了问题的根源,但不知道如何解决我想要做的事情。我试图从 UIAlertView 中的按钮启动 ShareKit。显然,Sharekit 需要从屏幕上的一个简单按钮或 UIActionView 启动。我使用了 UIActionView,现在它可以工作了。

【讨论】:

  • 我也注意到了。我认为这与 AlertView 解雇有关
猜你喜欢
  • 2012-08-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-07-16
  • 2011-05-05
  • 1970-01-01
相关资源
最近更新 更多