Resolved why bool value is not changed in dispatch
i try change bool value in dispatch_async when applicationdidenterbackground invoked. can read correct value when method invoked when try use in dispatch_asynch see not right value. here how code looks code: - (void)applicationdidenterbackground:(uiapplication *)application { __block bool isalarmon = [[nsuserdefaults standarduserdefaults] boolforkey:@"alarmsituation"]; __block bool iswarningrepeaton = [[nsuserdefaults standarduserdefaults] boolforkey:@"warningrepeat"]; nslog(@"iswarningrepeaton %d", iswarningrepeaton); bool isvibrationon = [[nsuserdefaults standarduserdefaults] boolforkey:@"vibration"]; nsstring *strsoundname = [[[nsuserdefaults standarduserdefaults] objectforkey:@"selectedsoundname"] lowercasestring]; if ([[uidevice currentdevice] ismultitaskingsupported]) { __block uibackgroundtaskidentifier background_task; bac