NSTimer or NSThread in the background of iOs 4

I need to save NSThread or NSTimer when the iPhone application goes into the background. Is it possible? I turned on background modes in info.plist and opened readstream and writestream as follows ... (I use UDP)

CFReadStreamSetProperty (readStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP);

CFWriteStreamSetProperty(writeStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP);

But when my application goes into background and locked state, NSThread or NSTimer do not call. So, please suggest me how to achieve background thread in iPhone background lock state?

+3
source share
3 answers

It is also interesting about this.

CLLocation ( ) . , , - NSTimer.

, ?

+1

NSTimer UILocalNotification, , .

+1

(, , voip) Apple .

​​ , . , UIBackgroundModes Info.plist. , :

audio
location
voip
+1
source

Source: https://habr.com/ru/post/1771915/


All Articles