简体   繁体   English

Facebook iOS共享对话框崩溃

[英]Facebook iOS share dialog crash

I have a problem. 我有个问题。 While sharing on iOS with FBSDKShareDialog I encounter a crash when presing (x). 在iOS上与FBSDKShareDialog共享时,按(x)时发生崩溃。 Doing this throws only Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) and nothing more. 这样做只会引发Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) ,仅此而已。 No delegate called or error just crash. 没有委托被调用或错误只是崩溃。 Production app connected to the same fb app works properly. 连接到同一fb应用程序的生产应用程序可以正常运行。 I will be gratefull for any advice where to look for. 如果您在哪里寻找任何建议,我将不胜感激。 My share dialog code: 我的共享对话框代码:

let method = user.id == CurrentUser.sharedUser.id ? "some_action" : "other_action"
fbAction.actionType = method
fbAction.setString("\(manager.appHost)\(obj.fbShareUrl)", forKey: "employee")
let content = FBSDKShareOpenGraphContent()
content.action = fbAction
content.previewPropertyName = "employee"
FBSDKShareDialog.show(from: showingController, with: content, delegate: showingController)

在此处输入图片说明

I have found a workaround for this. 我已经找到了解决方法。 FBSDKShareDialog has a property mode . FBSDKShareDialog具有属性mode I set it to .web so the sharing dialog opens now in UIView (like a popup) not Safari. 我将其设置为.web因此共享对话框现在在UIView (如弹出窗口)中打开,而不是在Safari中打开。 In UIView closing buttons works without problem. 在UIView中,关闭按钮可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM