我在使用 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