2014-09-18 50 views
10

2个警告我只更新到Xcode的6现在在FacebookSDK.framework>页眉> FBOpenGraph.h我有2个警告,一个读FacebookSDK给出xcode6

'atomic' attribute on property 'description' does not match the property inherited from NSObject 

而第二读取

'copy' attribute on property 'description' does not match the property inherited from NSObject 

上均代码行线69这些警告我添加了一个评论仅高于该行 这是.h文件,我需要大约

/* 
* Copyright 2010-present Facebook. 
* 
* Licensed under the Apache License, Version 2.0 (the "License"); 
* you may not use this file except in compliance with the License. 
* You may obtain a copy of the License at 
* 
* http://www.apache.org/licenses/LICENSE-2.0 
* 
* Unless required by applicable law or agreed to in writing, software 
* distributed under the License is distributed on an "AS IS" BASIS, 
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
* See the License for the specific language governing permissions and 
* limitations under the License. 
*/ 

#import <Foundation/Foundation.h> 

#import "FBGraphObject.h" 

/*! 
@protocol 

@abstract 
The `FBOpenGraphObject` protocol is the base protocol for use in posting and retrieving Open Graph objects. 
It inherits from the `FBGraphObject` protocol; you may derive custome protocols from `FBOpenGraphObject` in order 
implement typed access to your application's custom objects. 

@discussion 
Represents an Open Graph custom object, to be used directly, or from which to 
derive custom action protocols with custom properties. 
*/ 
@protocol FBOpenGraphObject<FBGraphObject> 

/*! 
@property 
@abstract Typed access to the object's id 
*/ 
@property (retain, nonatomic) NSString    *id; 

/*! 
@property 
@abstract Typed access to the object's type, which is a string in the form mynamespace:mytype 
*/ 
@property (retain, nonatomic) NSString    *type; 

/*! 
@property 
@abstract Typed access to object's title 
*/ 
@property (retain, nonatomic) NSString    *title; 

/*! 
@property 
@abstract Typed access to the object's image property 
*/ 
@property (retain, nonatomic) id     image; 

/*! 
@property 
@abstract Typed access to the object's url property 
*/ 
@property (retain, nonatomic) id     url; 

/*! 
@property 
@abstract Typed access to the object's description property 
*/ 
//******************************************* 
//the line below this is where the warnings are 
//&********************************************* 
@property (retain, nonatomic) id     description; 

/*! 
@property 
@abstract Typed access to action's data, which is a dictionary of custom properties 
*/ 
@property (retain, nonatomic) id<FBGraphObject>  data; 

@end 

,当我跑我的申请,我还收到此错误不知道它意味着要么

registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later. 

enter image description here

感谢您的帮助提前!

回答

7

我有同样的问题。

因此,我改变descriptioncopy

然后descriptionatomic

而且没有更多的警告,你也可以尝试上传新Facebook.SDK,因为他们可能已经

没问题改变了它

1

转到〜/ Library/Developer/Xcode并删除Xcode目录的全部内容(请注意,有一些Xcode档案等等,所以请确保你不会丢失任何你需要的东西)。

+0

你在说Finder吗? – iqueqiorio 2014-09-19 15:18:14

+0

是的,但〜/ Library文件夹默认是隐藏的。 – czaku 2014-09-19 15:24:00

+0

当我在我的发现者,并去macintosh高清我看到库和开发人员的螺母,然后没有Xcode – iqueqiorio 2014-09-19 15:32:45

5

更新的Facebook SDK到最新版本应该可以解决你的问题,你可能正在使用旧版本whic没有准备好iOS 8的SDK

这里下载 - https://developers.facebook.com/docs/ios

你安装新的FB SDK后,你应该只是干净的项目和生成没有错误

2

我修正了警告,只是评论属性

这些警告来自FBOpenGraphObject.h。 如果您检查产生它们的行,您将看到描述属性无论如何折旧,并且将使用objectDescription。

@property (retain, nonatomic) id  Description __attribute__ ((deprecated("use objectDescription instead"))); 

我建议你只是遵循FB的建议。无论如何,你很可能没有使用这个属性。就我而言,由于我没有使用它,因此注释掉该属性将删除警告。

希望它有帮助。

+0

是的,这是最好的解决方案 – 2014-11-07 16:22:27

1

刚刚禁用此警告

#pragma clang diagnostic push 
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" 
@property (retain, atomic) id description __attribute__ ((deprecated("use objectDescription instead"))); 
#pragma clang diagnostic pop