How to use NSStreamNetworkServiceTypeBackground in iOS?

I found the NSStreamNetworkServiceTypeBackground key in the NSStreamNetworkServiceTypeBackground file. It is declared as

 FOUNDATION_EXPORT NSString * const NSStreamNetworkServiceTypeBackground NS_AVAILABLE(10_7, 5_0); 

This means that it is available in iOS 5 onwards. However, in plist I could not find one matching background setting for this. Does anyone know how to use this?

The application will be published in the application store, so you want to approve it.

BR, Akshay Shah.

+4
source share
1 answer

If you use CFStream for networking, you can do this:

 NSInputStream *inputStream = (__bridge_transfer NSInputStream *)readStream; NSOutputStream *outputStream = (__bridge_transfer NSOutputStream *)writeStream; 

After that you can use constants (but not sure about the appstore)

What does the NSStreamNetworkServiceTypeBackground "do under the hood" setting do?

0
source

All Articles