CocoaAsyncSocket icon indicating copy to clipboard operation
CocoaAsyncSocket copied to clipboard

kCFStreamNetworkServiceTypeVoIP is deprecated in iOS 9 warning

Open md0u80c9 opened this issue 10 years ago • 2 comments

Hi,

I notice when compiling this in my code that I'm getting a warning that the above constant is deprecated in iOS 9. Would anyone happen to have code which uses PushKit in place of this, as the warning suggests?

md0u80c9 avatar Feb 04 '16 15:02 md0u80c9

Hello,

Solved by @pengyanb https://github.com/robbiehanson/CocoaAsyncSocket/issues/361

Add #import to GCDAsyncSocket.m #import <PushKit/PushKit.h>

Replace in enableBackgroundingOnSocketWithCaveat r1 = CFReadStreamSetProperty(readStream, kCFStreamNetworkServiceType, PKPushTypeVoIP); r2 = CFWriteStreamSetProperty(writeStream, kCFStreamNetworkServiceType, PKPushTypeVoIP);

imiko avatar Feb 23 '16 21:02 imiko

This issue has been marked as stale, it will be closed automatically if there is no further activity.

github-actions[bot] avatar Mar 08 '20 00:03 github-actions[bot]