daltoniam / Starscream

Websockets in swift for iOS and OSX
Apache License 2.0
8.36k stars 1.21k forks source link

NWProtocolTCP Crash #1010

Open nibasang opened 8 months ago

nibasang commented 8 months ago

Describe the bug

A clear and concise description of what the bug is. WebSocket method : func connect() debug log: image image

Steps to Reproduce

Detailed steps to reproduce the problematic behavior:

Expected behavior

A clear and concise description of what you expected to happen.

Environment:

Additional context

Add any other context about the problem here.

lihongyang108 commented 8 months ago

How was it ultimately resolved?

lucking commented 7 months ago

遇到同样的问题,你最终是如何解决的呢?

lucking commented 7 months ago

let options = NWProtocolTCP.Options() 奔溃原因,第123行,最低支持12.0 NWProtocolTCP

解决方案: image 第一步:在Podfile文件中,配置以下: post_install do |installer| installer.pods_project.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' end end 然后重新 pod install

第二步: 创建时,useCustomEngine 设置成 false let socket = WebSocket(request: request,useCustomEngine: false)

运行,完美解决😄😄🍺🍺!


半个小时后,另外:经过测试 pod 'Starscream', '~> 4.0.6' 创建时,useCustomEngine 设置成 false let socket = WebSocket(request: request,useCustomEngine: false) 在Podfile文件里不设置“ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' ”, 也能正常运行😄😄🍺🍺!

lucking commented 7 months ago

最终是如何解决的呢?

看我的评论

kumaresh-Magzter commented 7 months ago

its working when set useCustomEngine: false

Charlotte3240 commented 5 months ago

now , it 's crash yet? I can't find this crash on xcode 15.3.0