Reputation: 89
Ok with ARC how do we solve this gracefully?
The problem is the code created with WSDL2OBJC.. I fixed all other problems but this one eludes me..
if ([super respondsToSelector:@selector(initWithCoder:)] && ![self isKindOfClass:[super class]]) {
self = [super performSelector:@selector(initWithCoder:) withObject:decoder];
} else {
self = [super init];
}
In WSDL2OBJC they resolved this problem here like this:
"In Targets->Build Phases-> Compile Sources For all the wsdl2objc sources add: -fno-obcj-arc"
But this is actually not a fix on the code.. Only prevents ARC on WSDL2OBJC sources..
Upvotes: 2
Views: 2049
Reputation: 29
try this solution:
self = [super performSelector:NSSelectorFromString(@"initWithCoder:") withObject:aDecoder];
Upvotes: 2
Reputation: 104065
If you know the superclass, can’t you simply drop this mess and call the appropriate initializer directly?
Upvotes: 0