Objective c account.h突然错误

Objective c account.h突然错误,objective-c,cocoa-touch,cocoa,Objective C,Cocoa Touch,Cocoa,我在我的项目中工作得很好,突然我在我的项目中出现了以下错误 这是账户框架中的一个问题,我甚至没有接触到它(或任何框架)。特别是因为那些文件被锁定了 有人知道我为什么要得到这个,以及如何修复它吗 对不起,我不能再描述了,但它突然发生了,我从来没有碰过它 编辑account.h后,我出现以下错误 打开headers文件夹,选择ACAccount.h并按⌘z(撤消) 或者将您的ACAccount.h文件与下面的代码进行比较 // // ACAccount.h // Accounts // //

我在我的项目中工作得很好,突然我在我的项目中出现了以下错误

这是
账户框架
中的一个问题,我甚至没有接触到它(或任何框架)。特别是因为那些文件被锁定了

有人知道我为什么要得到这个,以及如何修复它吗

对不起,我不能再描述了,但它突然发生了,我从来没有碰过它


编辑account.h后,我出现以下错误

打开headers文件夹,选择ACAccount.h并按⌘z(撤消)

或者将您的ACAccount.h文件与下面的代码进行比较

//
//  ACAccount.h
//  Accounts
//
//  Copyright (c) 2011-2012 Apple Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Accounts/AccountsDefines.h>
@class ACAccountType, ACAccountCredential;

// The ACAccount class represents an account stored on the system.
// Accounts are created not bound to any store. Once an account is saved it belongs
// to the store it was saved into.

ACCOUNTS_CLASS_AVAILABLE(10_8, 5_0)
@interface ACAccount : NSObject

// Creates a new account object with a specified account type.
- (id)initWithAccountType:(ACAccountType *)type;

// This identifier can be used to look up the account using [ACAccountStore accountWithIdentifier:].
@property (readonly, weak, NS_NONATOMIC_IOSONLY) NSString      *identifier;

// Accounts are stored with a particular account type. All available accounts of a particular type 
// can be looked up using [ACAccountStore accountsWithAccountType:]. When creating new accounts
// this property is required.
@property (strong, NS_NONATOMIC_IOSONLY)   ACAccountType       *accountType;

// A human readable description of the account.
// This property is only available to applications that have been granted access to the account by the user.
@property (copy, NS_NONATOMIC_IOSONLY)     NSString            *accountDescription;

// The username for the account. This property can be set and saved during account creation. The username is
// only available to applications that have been granted access to the account by the user.
@property (copy, NS_NONATOMIC_IOSONLY)     NSString            *username;

// The credential for the account. This property can be set and saved during account creation. It is 
// inaccessible once the account has been saved.
@property (strong, NS_NONATOMIC_IOSONLY)   ACAccountCredential *credential;

@end
//
//ACAccount.h
//帐目
//
//版权所有(c)2011-2012苹果公司。保留所有权利。
//
#进口
#进口
@类ACAccountType,ACAccountCredential;
//ACAccount类表示存储在系统上的帐户。
//创建的帐户未绑定到任何存储。保存帐户后,它就属于该帐户
//它被保存到了一家商店里。
可用的科目类别(10个8,5个0)
@接口ACAccount:NSObject
//创建具有指定帐户类型的新帐户对象。
-(id)initWithAccountType:(ACAccountType*)类型;
//此标识符可用于使用[ACAccountStore accountWithIdentifier:]查找帐户。
@属性(只读、弱、NS_U非原子\u IOSOLY)NSString*标识符;
//帐户以特定的帐户类型存储。特定类型的所有可用帐户
//可以使用[ACAccountStore accountsWithAccountType:]进行查找。创建新帐户时
//此属性是必需的。
@属性(强,非原子)ACAccountType*accountType;
//对账户的可读描述。
//此属性仅对已被用户授予帐户访问权限的应用程序可用。
@属性(复制,仅非原子)NSString*accountDescription;
//帐户的用户名。可以在创建帐户期间设置和保存此属性。用户名是
//仅适用于已被用户授予帐户访问权限的应用程序。
@属性(复制,仅非原子)NSString*用户名;
//帐户的凭据。可以在创建帐户期间设置和保存此属性。它是
//保存帐户后将无法访问。
@属性(强,非原子)ACAccountCredential*凭证;
@结束

您是否直接导入account.h?如果是这样,就不要这样做。在这种情况下,只导入顶级标题,这是

在我的情况下,并不是我修改了AcAccount.h,这很困难,因为Xcode警告您不拥有该文件,问题是我意外地修改了“main.c”,我无意中修改了该行,但没有给出错误,而是给出了误导性的信息。

我没有修改该文件,它与您显示的文件完全相同:/。错误似乎在我的一个类中。已尝试恢复备份。。。一个接一个地恢复文件(多么痛苦!)但是错误没有出现。。。然后我什么也不做,又出现了。。。。。很奇怪,您使用的是什么部署目标?另外,如果突出显示第一个错误,那么它导航到的代码是什么(以及上面的几行)?