0

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

这是 中的一个问题Accounts Framework,我什至没有接触过(或任何框架)。特别是因为这些文件已被锁定。

有谁知道我为什么会得到这个以及如何解决它?

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

4

3 回答 3

0

你是直接导入 ACAccount.h 的吗?如果是这样,请不要这样做。只导入顶级标题——在这种情况下,就是<Accounts/Accounts.h>.

于 2013-10-06T01:49:48.577 回答
0

编辑 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-05T19:31:46.080 回答
0

在我的情况下,我修改了Account.h,这很困难,因为Xcode会提醒您不拥有该文件,问题是我不小心修改了'main.c',而不是在我不小心在行上给出错误修改它给出了误导性信息。

于 2015-05-18T11:25:44.483 回答