我在我的项目上工作得很好,突然我在我的项目中得到了以下错误。
这是Accounts Framework中的一个问题,我甚至没有接触到它(或任何框架)。尤其是那些文件被锁定之后。
有没有人知道我为什么得到这个以及如何修复它?
对不起,我不能更多地描述,但它突然发生了,我从来没有碰过它。

发布于 2013-10-06 03:31:46
在编辑ACAccount.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发布于 2013-10-06 09:49:49
是否直接导入ACAccount.h?如果是这样,请不要这样做。只导入顶级标头-在本例中,它应该是<Accounts/Accounts.h>。
发布于 2015-05-18 19:25:44
在我的例子中,不是我修改了Account.h,这是困难的,因为Xcode提醒你不拥有那个文件,问题是我意外地修改了'main.c',而不是在我意外修改的行上给出了一个错误,它给出了误导性的消息。
https://stackoverflow.com/questions/19201314
复制相似问题