我正在處理我的項目,並且突然間我在項目中出現以下錯誤。ACAccount.h突然出現的錯誤
這是一個在Accounts Framework
中的問題,我甚至沒有親近觸摸(或任何框架)。特別是因爲這些文件被鎖定。
有誰知道我爲什麼得到這個以及如何解決它?
對不起,我不能說更具描述性,但它突然發生,我從來沒有觸及過。
我正在處理我的項目,並且突然間我在項目中出現以下錯誤。ACAccount.h突然出現的錯誤
這是一個在Accounts Framework
中的問題,我甚至沒有親近觸摸(或任何框架)。特別是因爲這些文件被鎖定。
有誰知道我爲什麼得到這個以及如何解決它?
對不起,我不能說更具描述性,但它突然發生,我從來沒有觸及過。
我得到了編輯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
我還沒有修改文件,它看起來和你顯示的完全一樣:/。該錯誤似乎是在我的一個類中。嘗試恢復備份...並逐一恢復文件(多麼痛苦!)但錯誤沒有顯示出來......然後我什麼也不做,然後再次出現.....其如此bizzar –
你導入ACAccount.h直接?如果是這樣,不要這樣做。只導入頂級標頭 - 在這種情況下,這將是<Accounts/Accounts.h>
。
在我的情況下,它並不是我修改AcAccount.h,這很難,因爲Xcode提醒你不擁有該文件,問題是我不小心修改'main.c',而不是提供錯誤我意外地修改它的那條線給出了這個誤導性的信息。
你正在使用什麼部署目標?另外,如果您突出顯示VERY FIRST錯誤,那麼它導航到的代碼(以及它上面的幾行代碼)是什麼? –