2014-09-18 13 views
10

tôi chỉ cập nhật để Xcode 6 và bây giờ trong FacebookSDK.framework> Headers> FBOpenGraph.h tôi có 2 cảnh báo một mà đọcFacebookSDK cho 2 cảnh báo trong xcode6

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

Và thứ hai đọc

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

Cả những cảnh báo này trên dòng dòng 69 trong mã tôi đã thêm một nhận xét ngay trên dòng đó Đây là tập tin .h tôi lấy về

/* 
* 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 

Tôi cũng nhận được lỗi này khi tôi chạy ứng dụng của tôi không chắc chắn những gì nó có nghĩa là một trong hai

registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later. 

enter image description here

Thanks for the help trước !!!

Trả lời

7

Tôi đã gặp vấn đề tương tự.

Vì vậy, tôi đã thay đổi description-copy

Và sau đó description-atomic

Và không có nhiều cảnh báo, bạn cũng có thể thử tải lên một Facebook.SDK mới khi chúng có thể thay đổi nó

Không có vấn đề

1

Đi tới ~/Library/Developer/Xcode và xóa toàn bộ nội dung của thư mục Xcode (Xin lưu ý rằng có một số Lưu trữ Xcode ở đó, do đó hãy đảm bảo bạn sẽ không mất bất kỳ thứ gì bạn cần).

+0

bạn đang nói về công cụ tìm? – iqueqiorio

+0

Có, nhưng thư mục ~/Library bị ẩn theo mặc định. – czaku

+0

khi tôi tìm công cụ tìm và đi Macintosh HD Tôi thấy thư viện và hạt phát triển thì không có mã Xcode – iqueqiorio

5

Đang cập nhật Facebook SDK lên phiên bản mới nhất nên giải quyết vấn đề của bạn, bạn có lẽ sử dụng phiên bản cũ whic không sẵn sàng dành cho iOS 8 SDK

Tải về tại đây - https://developers.facebook.com/docs/ios

Sau khi cài đặt mới FB SDK, bạn nên chỉ cần làm sạch dự án và xây dựng lại mà không có lỗi

2

Tôi đã khắc phục cảnh báo bằng cách chỉ nhận xét ra thuộc tính.

Những cảnh báo này đến từ FBOpenGraphObject.h. Nếu bạn kiểm tra dòng sản xuất chúng, bạn sẽ thấy rằng thuộc tính mô tả được khấu hao bất kỳ và đối tượngDescription sẽ được sử dụng.

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

Tôi khuyên bạn chỉ nên làm theo khuyến nghị của FB. Rất có thể bạn không sử dụng thuộc tính này. Trong trường hợp của tôi, Vì tôi đã không sử dụng nó, nhận xét ra các tài sản loại bỏ các cảnh báo.

Hy vọng điều đó sẽ hữu ích.

+0

Vâng, đây là giải pháp tốt nhất –

1

vừa tắt cảnh báo này

#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 
Các vấn đề liên quan