Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NWProtocolTCP Crash #1010

Open
nibasang opened this issue Mar 22, 2024 · 5 comments
Open

NWProtocolTCP Crash #1010

nibasang opened this issue Mar 22, 2024 · 5 comments
Labels

Comments

@nibasang
Copy link

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 nibasang added the bug label Mar 22, 2024
@lihongyang108
Copy link

How was it ultimately resolved?

@lucking
Copy link

lucking commented Apr 9, 2024

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

@lucking
Copy link

lucking commented Apr 9, 2024

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
Copy link

lucking commented Apr 9, 2024

最终是如何解决的呢?

看我的评论

@kumaresh-Magzter
Copy link

its working when set useCustomEngine: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants