Very disappointed, the music tried, Viop tried, but reportedly will be rejected.
-(void) Applicationdidenterbackground: (uiapplication *) Application {
NSLog (@ "Go backstage");
[Application Beginbackgroundtaskwithexpirationhandler:nil];
BOOL backgroundaccepted = [[uiapplication sharedapplication] setkeepalivetimeout:600 handler:^{[self Backgroundhandler]; }];
if (backgroundaccepted)
{
NSLog (@ "backgrounding accepted");
}
[Self backgroundhandler];
}
static int counter = 0;
-(void) Backgroundhandler {
NSLog (@ "# #-->backgroundinghandler");
UIApplication *app = [UIApplication sharedapplication];
__block uibackgroundtaskidentifier bgtask = [App beginbackgroundtaskwithexpirationhandler:^{
[App Endbackgroundtask:bgtask];
Bgtask = Uibackgroundtaskinvalid;
}];
Start the long-running task
Dispatch_async (Dispatch_get_global_queue (dispatch_queue_priority_default, 0), ^{
while (1) {
NSLog (@ "Counter:%ld", counter++);
Sleep (1);
}
});
0917-found VoIP will be rejected