Cannot start application with new Xcode 6

My application works fine until I download the new Xcode, now it stopped by the "SIGABRT signal" error and indicates this:

[PlaceHolder setDescription:]: unrecognized selector sent to instance 0x79838900 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PlaceHolder setDescription:]: unrecognized selector sent to instance 0x79838900' 

I know this information may not be enough to understand what is happening, but I do not know where to start the search. If there were errors in the setter methods, why is my application running earlier? Are there any new changes that prevent the application from starting?

PlaceHolder is an object that stores properties (for example, links to images, text, etc.). In addition, a new โ€œyellowโ€ warning appears - Auto property synthesis will not synthesize property 'description' because it is 'read-write' but it will be synthesized 'read-only' via another property

+5
source share
2 answers

It looks like you have defined the description property. Unfortunately, NSObject already has a description method. Since you are presumably not intentionally trying to override this method in your subclass, this is probably not a safe operation. It seems that in the iOS 7 SDK and Xcode 5, your property has replaced the method with NSObject . On iOS 8, the SDK and Xcode 6 are not (perhaps due to changes in the way the -description method is defined), so you get different behavior.

Try renaming this property to avoid such conflicts. description is a useful debugging tool, and you may not want to abandon this class by accident.

+10
source

Many thanks for the help.

Description is a property of the PlaceHolder class:

 @property (nonatomic, retain) NSString *description; 

The problem was solved simply by @synthesize description; into the implementation file (.m) of the PlaceHolder class. For some reason, the new Xcode synthesizes it using a read-only property, and this causes a SIGBART error because the application tried to write this property (which for some reason was readable).

I hope this information can be useful for someone who is facing a similar problem.

+8
source

Source: https://habr.com/ru/post/1202936/


All Articles