robbiehanson / XMPPFramework

An XMPP Framework in Objective-C for Mac and iOS
Other
5.91k stars 2.09k forks source link

XMPPFramework crash in iOS 16 and Xcode 14 #1223

Open zhangylios opened 2 years ago

zhangylios commented 2 years ago

hello, XMPPFramework runs iOS16, crashes on Xcode14 device, the error is like a screenshot, please help to update and solve it, thank you very much, XMPPFramework is great!

WeChate999a946a8c4024d342e74da6d1e6308
andrea8000 commented 2 years ago

same problem @zhangylios did you find any solution?

Monks-Giorgio commented 2 years ago

Hi, check if you have XMPPStream.enableBackgroundingOnSocket set to YES. In case, try not to use it

pengxu1013 commented 2 years ago

Hi, check if you have XMPPStream.enableBackgroundingOnSocket set to YES. In case, try not to use it

Remove the xmppStream. EnableBackgroundingOnSocket = YES; It solves the crash problem, but does not setting this property affect the functionality?

Monks-Giorgio commented 2 years ago

Hi, check if you have XMPPStream.enableBackgroundingOnSocket set to YES. In case, try not to use it

Remove the xmppStream. EnableBackgroundingOnSocket = YES; It solves the crash problem, but does not setting this property affect the functionality?

yep, for sure it affects functionality, if you need it you should use PushKit as documented in the code (from XMPPStream.h#273):

@property (readwrite, assign) BOOL enableBackgroundingOnSocket DEPRECATED_MSG_ATTRIBUTE("Background sockets are no longer available on iOS 10. You must use PushKit and the XEP-0357 module instead.");

Also check Apple documentation at OptimizeVoIP

zhangylios commented 2 years ago

Hi, check if you have XMPPStream.enableBackgroundingOnSocket set to YES. In case, try not to use it

Remove the xmppStream. EnableBackgroundingOnSocket = YES; It solves the crash problem, but does not setting this property affect the functionality?

yep, for sure it affects functionality, if you need it you should use PushKit as documented in the code (from XMPPStream.h#273):

@property (readwrite, assign) BOOL enableBackgroundingOnSocket DEPRECATED_MSG_ATTRIBUTE("Background sockets are no longer available on iOS 10. You must use PushKit and the XEP-0357 module instead.");

Also check Apple documentation at OptimizeVoIP

This is the answer and solved my problem, thanks a lot

mahesh-reddy-ios commented 1 year ago

Hi, check if you have XMPPStream.enableBackgroundingOnSocket set to YES. In case, try not to use it

Remove the xmppStream. EnableBackgroundingOnSocket = YES; It solves the crash problem, but does not setting this property affect the functionality?

yep, for sure it affects functionality, if you need it you should use PushKit as documented in the code (from XMPPStream.h#273): @property (readwrite, assign) BOOL enableBackgroundingOnSocket DEPRECATED_MSG_ATTRIBUTE("Background sockets are no longer available on iOS 10. You must use PushKit and the XEP-0357 module instead."); Also check Apple documentation at OptimizeVoIP

This is the answer and solved my problem, thanks a lot

Can u please post the solution which solve your problem

Rajai-Sunnyclock commented 1 year ago

@mahesh-reddy-ios Check this: https://github.com/robbiehanson/CocoaAsyncSocket/pull/717/commits

love-cuteQian commented 10 months ago

您好, 请检查您是否将 XMPPStream.enableBackgroundingOnSocket 设置为 YES。以防万一,尽量不要使用

The simulator can be retained. Use this solution directly for real machine debugging.

pengxu1013 commented 10 months ago

我已经解决了,谢谢

------------------ 原始邮件 ------------------ 发件人: "robbiehanson/XMPPFramework" @.>; 发送时间: 2024年1月16日(星期二) 下午4:30 @.>; @.**@.>; 主题: Re: [robbiehanson/XMPPFramework] XMPPFramework crash in iOS 16 and Xcode 14 (Issue #1223)

您好, 请检查您是否将 XMPPStream.enableBackgroundingOnSocket 设置为 YES。以防万一,尽量不要使用

The simulator can be retained. Use this solution directly for real machine debugging.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>