2014-02-12 3 views
0

로그인 한 계정이없는 경우 twitter SDK에서 제공하는 알림과 같은 알림을 표시 할 수있는 방법이 있습니까?표시 할 수 없음 설정 경고 iOS6 +

사용자가 내 앱의 설정 -> 알림 센터를 사용 중지 한 경우 해당 유형의 알림을 표시하려고합니다.

알림을 표시하려면 트위터를 ref로 지정하십시오. 트위터가 아니야. enter image description here

참고 : 소셜 미디어를 표시하거나 사용하고 싶지는 않습니다. 참고로 iOS의 설정 앱으로 사용자를 안내 할 수있는 맞춤 알림을 표시 할 수 있습니까?

+1

확인 할 수있다 프레임 워크는 오지 않습니다. 원한다면 – codercat

+0

@iDev를 사용자 정의 할 수 있습니다. 감사하지만 내가 ref 만 언급했습니다. 사용자가 내 앱의 설정 -> 알림 센터를 사용 중지 한 경우 해당 유형의 알림을 표시하려고합니다. – Zubair

답변

2

알림 센터> 내 앱에서 전환 상태를 알 수있는 방법은 없습니다. 액세스 할 수있는 유일한 방법은 사용자가받을 알림 유형 ([[UIApplication sharedApplication] enabledRemoteNotificationTypes];)입니다.

0

액세스 할 수있는 유일한 설정은 앱 또는 설정 앱에있을 수있는 앱 설정입니다. 앱의 설정은 [NSUserDefaults standardUserDefaults]를 사용하여 설정하거나 가져 오는 설정입니다. 그러나 귀하의 경우에는 1 초 후에 발생하는 통지를 예약하고, 귀하가 전화를 받았는지 확인하십시오 - (void) application : (UIApplication *) application didReceiveLocalNotification : (UILocalNotification *) notification. 다음은 예제 코드입니다.

-(void) createLocalNofication{ 
UILocalNotification *local = [[UILocalNotification alloc] init]; 
local.fireDate = [NSDate dateWithTimeIntervalSinceNow:1.0f]; 

local.alertBody = @"Some Alert Body"; 
local.timeZone = [NSTimeZone defaultTimeZone]; 
[[UIApplication sharedApplication] scheduleLocalNotification:local]; 


} 
- (void)application:(UIApplication *)application didReceiveLocalNotification: (UILocalNotification *)notification { 

//Here you can set some flag 
} 

주제에 대한 더 많은 통찰력을 얻으려면 apple documentation link을 확인하십시오.

더 참고로

UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; 
if (!(types & UIRemoteNotificationTypeAlert)) { 
UIAlertView *al = [[UIAlertView alloc] initWithTitle:@"TITLE" message:@"YOUR MESSAGE" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:@"Settings",nil]; 
    [al show]; 
    [al release]; 

} 

아래와 같이 비활성화 될 때 앱의 알림 설정을 알 수 및 경고를 표시 할 수 있습니다

관련 문제