我有一个在各种设备上运行良好的应用程序但是当我尝试在模拟器上运行它时,我收到以下错误。
指向非常量类型' id'没有明确的所有权
我知道应该从id *中删除*以解决问题,但是id *位于coreData.h中,所以我无法改变它。
如何摆脱这个错误?
在NSFetchRequest.h中有一行 ID * _additionalPrivateIvars; (这是错误的来源)
它是框架coreDate / coreData.h中的标头
将此框架导入我的一个视图控制器
coreData中的其他人是 id ** _kvcpropertyAccessors;在NSEntityDescription.h中 和 ID _optimizationHints;在NSManagedObjectModel.h中 和 ID _cachedObsInfoByEntity;和id * _contextLabel;在NSManagedObject.h中 和 id _additonalPrivateIvars;在NSPersistentStoreCoordinator.h中 和 id _oidFactories;在NSPersistentStore.h中
不知道这是否有帮助,但......
所有这些都与将视频上传到youtube
有关我没有所有设备,因此我必须在模拟器上运行应用程序,主要是查看不同的视图以确保一切正常。我无法使用自动调整大小,因为我在视图运行时会有各种动画,并且必须根据设备的不同来定位。
非常感谢任何帮助。
这里是coreData / NSEntityDescription.h
中的上下文代码#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSRange.h>
NS_ASSUME_NONNULL_BEGIN
@class NSManagedObjectModel;
@class NSManagedObjectContext;
@class NSManagedObject;
@class NSData;
@class NSPropertyDescription;
@class NSRelationshipDescription;
@class NSAttributeDescription;
// Entities describe the "types" of objects available.
NS_CLASS_AVAILABLE(10_4,3_0)
@interface NSEntityDescription : NSObject <NSCoding, NSCopying, NSFastEnumeration> {
@private
int32_t _cd_rc;
id _snapshotClass;
NSString *_versionHashModifier;
NSData *_versionHash;
__weak NSManagedObjectModel *_model;
NSString *_classNameForEntity;
Class _instanceClass;
NSString *_name;
__weak NSEntityDescription *_rootentity;
__weak NSEntityDescription *_superentity;
NSMutableDictionary *_subentities;
NSMutableDictionary *_properties;
id _propertyMapping;
__strong NSRange *_propertyRanges;
struct __entityDescriptionFlags {
unsigned int _isAbstract:1;
unsigned int _shouldValidateOnSave:1;
unsigned int _isImmutable:1;
unsigned int _isFlattened:1;
unsigned int _skipValidation:1;
unsigned int _hasPropertiesIndexedBySpotlight:1;
unsigned int _hasPropertiesStoredInTruthFile:1;
unsigned int _rangesAreInDataBlob:1;
unsigned int _hasAttributesWithExternalDataReferences:1;
unsigned int _hasNonstandardPrimitiveProperties:2;
unsigned int _hasUniqueProperties:1;
unsigned int _validationUniqueProperties:1;
unsigned int _reservedEntityDescription:19;
} _entityDescriptionFlags;
__strong void *_extraIvars;
NSMutableDictionary *_userInfo;
id _flattenedSubentities;
id** _kvcPropertyAccessors; (THIS IS THE OFFENDING CODE LINE)
long _modelsReferenceIDForEntity;
}
以下是导入coreData.h框架的youTubeConnectViewController.h页面。 // youTubeConnectViewController.h
// my little world app
//
// Created by Creatucate on 11/25/12.
// Copyright (c) 2012 Creatucate. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "GData.h"
#import "GDataYouTubeAccessControl.h"
#import <GoogleSignIn/GoogleSignIn.h>
#import <CoreData/CoreData.h>
#import <Security/Security.h>
#import "SSKeychain.h"
#define devKey @"AIzaSyDrmQGFblRrH0aBTbR7gsMKxl5QMqgTxcc"
@interface youTubeConnectViewController : UIViewController <UITextViewDelegate, UIPickerViewDataSource,UIPickerViewDelegate, UITextFieldDelegate,NSFetchedResultsControllerDelegate,GIDSignInDelegate,GIDSignInUIDelegate>{
IBOutlet UILabel *UserName;
IBOutlet UILabel *commas;
IBOutlet UIButton *signInButton1;
IBOutlet NSTextField *mEntryCountField;*/
IBOutlet UIPickerView *catagoryPicker;
IBOutlet UIProgressView *mUploadProgressIndicator;
IBOutlet UIButton *cancel;
NSDictionary *titleTextAttributes;
IBOutlet UITextField *number;
IBOutlet UILabel *toptitle;
IBOutlet UILabel *movieTitle;
IBOutlet UILabel *descp;
IBOutlet UILabel *tags;
IBOutlet UILabel *catag;
IBOutlet UILabel *account;
IBOutlet UILabel *pub;
IBOutlet UILabel *pubdef;
IBOutlet UILabel *pub1;
IBOutlet UILabel *unlist;
IBOutlet UILabel *unlistdef;
IBOutlet UILabel *unlist1;
IBOutlet UILabel *priv;
IBOutlet UILabel *privdef;
IBOutlet UILabel *priv1;
NSDictionary *pictureDictionary3;
NSDictionary *pictureDictionary4;
NSMutableArray *pickerArray;
IBOutlet UITextField *catagoryField;
IBOutlet UITextField *catagoryField1;
IBOutlet UITextField *ViewingField;
IBOutlet UIImageView *buttonbg;
IBOutlet UIImageView *pickerback;
IBOutlet UILabel *okl;
IBOutlet UIView *SignInButton;
float downloadingstatus;
IBOutlet UITextView* terms;
NSString *authToken;
BOOL mIsPrivate;
BOOL mIsPublic;
IBOutlet UIImageView *signIn;
IBOutlet UIImageView *fail;
IBOutlet UIImageView *signOutView;
IBOutlet UIButton *signIncancel;
IBOutlet UIButton *ok;
IBOutlet UILabel *Password;
IBOutlet UITextField *UserNameField;
IBOutlet UITextField *PasswordField;
IBOutlet UITextField *movieNameField;
IBOutlet UITextField *tagsField;
IBOutlet UITextView *descpView;
IBOutlet UITextField *accountView;
IBOutlet UITextField *UserOutField;
IBOutlet UITextField *PublicField;
IBOutlet UITextField *PrivateField;
IBOutlet UITextField *UnlistedField;
IBOutlet UIButton *chooseButton;
NSMutableDictionary *SignInDictionary;
IBOutlet UITextField *PasswordDisplayField;
IBOutlet UIButton *termsButton;
IBOutlet UIButton *SignOutButton;
IBOutlet UIButton *cancelOutButton;
IBOutlet UIButton *toOutButton;
IBOutlet UITextField *length;
IBOutlet UILabel *authfailed;
IBOutlet UILabel *YouTubesignin;
IBOutlet UILabel *YouTubesignout;
IBOutlet UILabel *YouTubesignoutacc;
IBOutlet UITextView *errorfailed;
IBOutlet UIScrollView *scrollview;
GDataFeedYouTubeVideo *mEntriesFeed; // user feed of album entries
GDataServiceTicket *mEntriesFetchTicket;
NSError *mEntriesFetchError;
NSString *mEntryImageURLString;
GDataServiceTicket *mUploadTicket;
NSURL *mUploadLocationURL;
UIImage *buttonimage3;
}
@property (nonatomic, retain)IBOutlet UILabel *allow;
@property (nonatomic, retain)IBOutlet UILabel *done;
@property (nonatomic, retain)IBOutlet UILabel *tap1;
@property (nonatomic, retain)IBOutlet UILabel *tap2;
@property (nonatomic, retain)IBOutlet UILabel *tap3;
@property (nonatomic, retain)IBOutlet UILabel *tap4;
@property (nonatomic, retain)IBOutlet UILabel *tap5;
@property (nonatomic, retain)IBOutlet UILabel *tap6;
@property (nonatomic, retain)IBOutlet UILabel *tap7;
@property(retain, nonatomic) IBOutlet GIDSignInButton *signInButton;
@property (nonatomic, retain) UIImage *buttonimage3;
- (GDataServiceGoogleYouTube *)youTubeService;
@property (nonatomic, retain) IBOutlet UILabel *commas;
@property (nonatomic, retain) IBOutlet UITextField *length;
@property (readwrite, retain) UIView *inputAccessoryView;
@property (nonatomic, retain) IBOutlet UITextField *catagoryField;
@property (nonatomic, retain) IBOutlet UITextField *catagoryField1;
@property (nonatomic, retain) IBOutlet UITextField *PasswordDisplayField;
@property (nonatomic, retain) IBOutlet UIProgressView *mUploadProgressIndicator;
@property (nonatomic, retain) IBOutlet UIScrollView *scrollview;
@property (nonatomic, retain) IBOutlet UIImageView *signIn;
@property (nonatomic, retain) IBOutlet UIImageView *signOutView;
@property (nonatomic, retain)IBOutlet UIButton *signIncancel;
@property (nonatomic, retain)IBOutlet UIButton *signInButton1;
@property (nonatomic, retain)IBOutlet UILabel *UserName;
@property (nonatomic, retain)IBOutlet UILabel *Password;
@property (nonatomic, retain)IBOutlet UITextField *UserNameField;
@property (nonatomic, retain)IBOutlet UITextField *PasswordField;
@property (nonatomic, retain)IBOutlet UITextField *movieNameField;
@property (nonatomic, retain)IBOutlet UITextField *tagsField;
@property (nonatomic, retain) NSArray *pickerArray;
@property (nonatomic, retain) IBOutlet UIButton *chooseButton;
@property (nonatomic, retain) IBOutlet UIPickerView *catagoryPicker;
@property (nonatomic, retain) NSMutableDictionary *SignInDictionary;
@property (nonatomic, retain) IBOutlet UITextField *accountView;
@property (nonatomic, retain) IBOutlet UITextField *UserOutField;
@property (nonatomic, retain) IBOutlet UITextField *ViewingField;
@property (nonatomic, retain) IBOutlet UITextField *PublicField;
@property (nonatomic, retain) IBOutlet UITextField *PrivateField;
@property (nonatomic, retain) IBOutlet UITextField *UnlistedField;
@property (nonatomic, retain) IBOutlet UIImageView *buttonbg;
@property (nonatomic, retain) IBOutlet UIImageView *pickerback;
@property (nonatomic, retain) IBOutlet UILabel *okl;
@property (nonatomic, retain) IBOutlet UIImageView *fail;
@property (nonatomic, retain) IBOutlet UIButton *ok;
@property (nonatomic, retain) IBOutlet UITextView* terms;
-(IBAction)failure:(id)sender;
-(IBAction)cancel:(id)sender;
-(IBAction)cancelSignIn:(id)sender;
-(IBAction)hideUserName:(id)sender;
-(IBAction)hidePassword:(id)sender;
-(IBAction)hideTitle:(id)sender;
-(void)textViewDidBeginEditing:(id)sender;
-(IBAction)displayPicker:(id)sender;
-(IBAction)dismissPicker:(id)sender;
-(IBAction)showTerms:(id)sender;
-(IBAction)signOut:(id)sender;
-(IBAction)CancelOut:(id)sender;
-(IBAction)ToOut:(id)sender;
-(IBAction)Public:(id)sender;
-(IBAction)Private:(id)sender;
-(IBAction)Unlisted:(id)sender;
-(IBAction)textFieldReturn:(id)sender;
@property (nonatomic, retain)IBOutlet UIButton *SignOutButton;
@property (nonatomic, retain)IBOutlet UIButton *cancelOutButton;
@property (nonatomic, retain)IBOutlet UIButton *toOutButton;
@property (nonatomic, retain)IBOutlet UIButton *termsButton;
@property (nonatomic, retain)IBOutlet UILabel *toptitle;
@property (nonatomic, retain)IBOutlet UILabel *movieTitle;
@property (nonatomic, retain)IBOutlet UILabel *descp;
@property (nonatomic, retain)IBOutlet UILabel *tags;
@property (nonatomic, retain)IBOutlet UILabel *catag;
@property (nonatomic, retain)IBOutlet UILabel *account;
@property (nonatomic, retain)IBOutlet UILabel *pub;
@property (nonatomic, retain)IBOutlet UILabel *pub1;
@property (nonatomic, retain)IBOutlet UILabel *unlist;
@property (nonatomic, retain)IBOutlet UILabel *unlist1;
@property (nonatomic, retain)IBOutlet UILabel *priv;
@property (nonatomic, retain)IBOutlet UILabel *priv1;
@property (nonatomic, retain)IBOutlet UILabel *pubdef;
@property (nonatomic, retain)IBOutlet UILabel *unlistdef;
@property (nonatomic, retain)IBOutlet UILabel *privdef;
@property (nonatomic, retain)NSDictionary *pictureDictionary3;
@property (nonatomic, retain)NSDictionary *pictureDictionary4;
@property (nonatomic, retain)IBOutlet UIButton *cancel;
@property (nonatomic, retain) IBOutlet UITextField *number;
@property (nonatomic, copy) NSDictionary *titleTextAttributes;
@property(nonatomic, assign) UIModalTransitionStyle modalTransitionStyle;
@property (nonatomic, retain) IBOutlet UILabel *authfailed;
@property (nonatomic, retain) IBOutlet UILabel *YouTubesignin;
@property (nonatomic, retain) IBOutlet UILabel *YouTubesignout;
@property (nonatomic, retain) IBOutlet UILabel *YouTubesignoutacc;
@property (nonatomic, retain) IBOutlet UITextView *errorfailed;
-(IBAction)publish:(id)sender;
-(IBAction)SignInSave:(id)sender;
这是一个例子。对不起,代码太多了,但我想我应该把所有东西都包括在内以供你查看
答案 0 :(得分:0)
我怀疑问题是由于编译器对于二手SDK而言太新了。新的clang将启用ARC,但旧的SDK不能与ARC一起编译。