首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ACAccount.h突发错误

ACAccount.h突发错误
EN

Stack Overflow用户
提问于 2013-10-06 02:36:48
回答 3查看 109关注 0票数 0

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

这是Accounts Framework中的一个问题,我甚至没有接触到它(或任何框架)。尤其是那些文件被锁定之后。

有没有人知道我为什么得到这个以及如何修复它?

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

EN

回答 3

Stack Overflow用户

发布于 2013-10-06 03:31:46

在编辑ACAccount.h之后,我得到以下错误。

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

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

代码语言:javascript
复制
//
//  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
票数 0
EN

Stack Overflow用户

发布于 2013-10-06 09:49:49

是否直接导入ACAccount.h?如果是这样,请不要这样做。只导入顶级标头-在本例中,它应该是<Accounts/Accounts.h>

票数 0
EN

Stack Overflow用户

发布于 2015-05-18 19:25:44

在我的例子中,不是我修改了Account.h,这是困难的,因为Xcode提醒你不拥有那个文件,问题是我意外地修改了'main.c',而不是在我意外修改的行上给出了一个错误,它给出了误导性的消息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19201314

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档