Ignore:
Timestamp:
Jul 18, 2017 11:55:25 AM (7 years ago)
Author:
ming
Message:

Re #1994 (misc): Fixed warning during runtime on iOS 11:
UI API called on a background thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/ios/ipjsua/ipjsuaAppDelegate.m

    r5542 r5628  
    190190    if (dev_ori == prev_ori) return; 
    191191     
    192     NSLog(@"Device orientation changed: %d", (prev_ori = dev_ori)); 
     192    NSLog(@"Device orientation changed: %ld", (prev_ori = dev_ori)); 
    193193     
    194194    if (dev_ori >= UIDeviceOrientationPortrait && 
     
    272272        alert.alertAction = @"Activate app"; 
    273273         
    274         [[UIApplication sharedApplication] presentLocalNotificationNow:alert]; 
     274        dispatch_async(dispatch_get_main_queue(), 
     275                       ^{[[UIApplication sharedApplication] 
     276                          presentLocalNotificationNow:alert];}); 
    275277    } 
    276278     
Note: See TracChangeset for help on using the changeset viewer.