我正在处理我的项目很好,突然间我在项目中遇到以下错误。
这是Accounts Framework
中的一个问题,我甚至没有接近触摸(或任何框架)。特别是因为这些文件被锁定了。
有谁知道为什么我会得到这个以及如何解决它?
抱歉,我不能更具描述性,但它突然发生了,我从未接触到它。
答案 0 :(得分:0)
编辑ACAccount.h后出现以下错误。
打开标题文件夹,选择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
答案 1 :(得分:0)
您是否直接导入ACAccount.h?如果是这样,请不要这样做。只导入顶级标题 - 在这种情况下,该标题为<Accounts/Accounts.h>
。
答案 2 :(得分:0)
在我的情况下,我没有修改AcAccount.h,这很难,因为Xcode警告你不拥有该文件,问题是我不小心修改了#main.c&#39;,
,而不是在我不小心修改它的行上给出错误