0

Working with somebody else's code, I am re-writing implementation (.m file) for an existing interface (.h).

I see some lines like
NSURL *playbackURL = [[self.currentPlaybackURL retain] autorelease];

My new class is giving me errors. Which should be legit because now we have ARC. Probably wasn't there when earlier file was written. Could somebody help me why earlier implementation not giving these errors?

The tricky part here is my new implementation here is for a new target. Both .m files are for individual targets.

But.. The new target is just a duplicate of existing one.

Now what should I do about ARC, should I just change code lines like above to something like:

NSURL *playbackURL = self.currentPlaybackURL;

Or are there any better ways in Xcode to handle cases like this.

1 Answer 1

1

When you copied your target, you might have copied the -fno-objc-arc flags on the (.m file). Please make sure that your new target doesn't have those flags for those (.m files).

You may find those by checking out in build phases >> Compile Sources

Sign up to request clarification or add additional context in comments.

2 Comments

Where do I look for it ?
No not yet Vasanth, give me some time to test. I got busy onto another problem. But I see your point. I will +1 your answer. Will mark answer after I test it. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.