Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 解析在哪里存储用户会话_Ios_Objective C_Parse Platform - Fatal编程技术网

Ios 解析在哪里存储用户会话

Ios 解析在哪里存储用户会话,ios,objective-c,parse-platform,Ios,Objective C,Parse Platform,登录代码: [PFUser logInWithUsernameInBackground:self.userTextField.text password:self.passwordTextField.text block:^(PFUser *user, NSError *error) { if (user) { [self performSegueWithIdentifier:@"LoginSuccesful" sender:self]; } else {

登录代码:

[PFUser logInWithUsernameInBackground:self.userTextField.text password:self.passwordTextField.text block:^(PFUser *user, NSError *error) {
    if (user) {
        [self performSegueWithIdentifier:@"LoginSuccesful" sender:self];
    }
    else {
        NSInteger code = [error code];
        NSString *message;
        if (code == 100) {
            message = @"No Internet Connection";
        }
        else if(code == 101) {
            message = @"Wrong credentials";
        }

        UIAlertView *errorAlertView = [[UIAlertView alloc] initWithTitle:@"Error" message:message delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
        [errorAlertView show];
    }
}];
我们可以检查用户是否已登录

if ([PFUser currentUser]) { 
    // user is logged
}
这意味着PFUser logInWithUsernameInBackground:password:下载用户数据并将其存储在iOS中的某个位置,我不知道它是在plist还是其他文件中,或者可能是会话中


Parse Framework在iOS中将用户登录会话存储在哪里?

我对我的一个使用Parse的应用程序进行了一番探索,发现了以下内容


Library/Private Documents/Parse
中有一个
currentUser
文件,其中包含用户的JSON表示。

您是否创建了访问这些数据的方法?我对会话id特别感兴趣。我正在从解析服务器转移到自己的实现中,不希望我的用户再次登录。我认为这样做的方法是直接访问会话id并使用它进行身份验证。