Я хочу открыть официальные настройки iphone из моего приложения в функции getinfo(), если пользователь уже зарегистрировался, чем нет необходимости открывать официальную настройку iphone, если нет входа пользователя в приложение, чтобы открыть официальную настройку iphone в настоящее время я не могу открыть настройки iphone.Как открыть iPhone Настройка из моего собственного приложения?
- (IBAction)twitterLogin:(id)sender {
[self getInfo];
}
- (void) getInfo
{
// Request access to the Twitter accounts
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
[accountStore requestAccessToAccountsWithType:accountType options:nil completion:^(BOOL granted, NSError *error){
if (granted) {
GET_DEFAULTS
[defaults setInteger:1 forKey:kHasUserRemembered];
[defaults synchronize];
NSArray *accounts = [accountStore accountsWithAccountType:accountType];
ACAccount *twitterAccount = [accounts objectAtIndex:0];
GET_DBHANDLER
NSDictionary *tempDict = [[NSMutableDictionary alloc] initWithDictionary:
[twitterAccount dictionaryWithValuesForKeys:[NSArray arrayWithObject:@"properties"]]];
NSString *tempUserID = [[tempDict objectForKey:@"properties"] objectForKey:@"user_id"];
NSLog(@"userid: %@", tempUserID);
userDC *user = [dbHandler authenticate_User:twitterAccount.username andPassword: @"" andIsFB:0 AndIsTwitter:1];
[defaults setObject:tempUserID forKey:kHastwitterID];
[defaults synchronize];
[self gotoMainView];
}
else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]];
NSLog(@"No access granted");
}
}];
}
яблоко не позволяет получить доступ к настройкам iPhone в приложении. – Pratik
есть буквально тонны вопросов об этом. Вы потратили больше времени на отправку своего вопроса, а затем выполнили базовый поиск по Google: https://www.google.com/search?q=open+ios+settings+from+app –