Starscream icon indicating copy to clipboard operation
Starscream copied to clipboard

NWProtocolTCP Crash

Open nibasang opened this issue 1 year ago • 6 comments

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:

  • OS/Version: [e.g. iOS/16.2]
  • Starscream Version [e.g. 4.0.8]
  • Xcode version [e.g. 15.2]

Additional context

Add any other context about the problem here.

nibasang avatar Mar 22 '24 04:03 nibasang

How was it ultimately resolved?

lihongyang108 avatar Mar 27 '24 10:03 lihongyang108

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

lucking avatar Apr 09 '24 06:04 lucking

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 avatar Apr 09 '24 07:04 lucking

最终是如何解决的呢?

看我的评论

lucking avatar Apr 09 '24 07:04 lucking

its working when set useCustomEngine: false

kumaresh-Magzter avatar Apr 25 '24 12:04 kumaresh-Magzter

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

Charlotte3240 avatar Jun 07 '24 08:06 Charlotte3240