10

I just update to Xcode 6 and now in the FacebookSDK.framework > Headers > FBOpenGraph.h I have 2 warnings one that reads

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

And the second reads

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

Both these warnings on line line 69 in the code I have added a comment just above that line This is the .h file I am taking about

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

I am also getting this error when I run my application not sure what it means either

registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later.

enter image description here

Thanks for the help in advance!!!

jww
  • 97,681
  • 90
  • 411
  • 885
iqueqiorio
  • 1,149
  • 2
  • 35
  • 78

5 Answers5

7

I had the same problem.

So I changed description to copy

And then description to atomic

And no more warnings, you could also try uploading a new Facebook.SDK as they might have changed it

No problem

5

Updating Facebook SDK to newest version should resolve your issues, you are probably using old version whic is not ready for iOS 8 SDK

Download here - https://developers.facebook.com/docs/ios

After you install new FB SDK, you should just Clean project and Build again without errors

matejOS
  • 379
  • 2
  • 9
2

I fixed the warning by just commenting out the property.

These warnings are coming from FBOpenGraphObject.h. If you check the line producing them you will see that the description attribute is anyway depreciated and that objectDescription shall be used.

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

I would suggest you just follow FB recommendation. Most likely you are not using this property anyway. In my case, Since I was not using it, commenting out the property removed the warnings.

Hope it helps.

GrandSteph
  • 2,053
  • 1
  • 16
  • 23
1

Go to ~/Library/Developer/Xcode and remove the whole contents of Xcode directory (Please be aware that there is some Xcode Archives there etc. so make sure you won't loose anything you need).

czaku
  • 829
  • 9
  • 20
  • are you talking about in finder? – iqueqiorio Sep 19 '14 at 15:18
  • Yes, but the ~/Library folder is hidden by default. – czaku Sep 19 '14 at 15:24
  • when I'm in my finder and go macintosh HD I see library and developer nut then no Xcode – iqueqiorio Sep 19 '14 at 15:32
  • It is inside your user directory, so the path is /Users//Library - it is NOT the /Library directory at the top of your disk structure. – czaku Sep 19 '14 at 15:46
  • should I also remove the hidden files in there? Theres files called developer portal and folders called UserData should that all go? Ive added a screen shot of the folder – iqueqiorio Sep 19 '14 at 19:15
  • I removed everything, but you will loose Xcode settings and archives. But that fixed the same issue for me. – czaku Sep 19 '14 at 19:50
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61588/discussion-between-iqueqiorio-and-czaku). – iqueqiorio Sep 19 '14 at 23:33
1

just disabled this warning

#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